The tag has no wiki summary.

learn more… | top users | synonyms

1
vote
1answer
92 views

Draw selected instances of VAO (glDrawArraysInstanced)

I'm using glDrawArraysInstanced to draw multiple instances of a tree at different positions to generate a forest. Is there a way to draw selected instances? For example: I got 100 trees with ...
0
votes
0answers
93 views

Help with instancing: seg fault with glVertexAttribDivisor

I'm trying to get the basics of instancing in OpenGL 3.3 and failing miserably. I'm starting with the Jason McKesson's Depth Buffering tutorial, then modifying it so that only the ...
0
votes
1answer
123 views

When should I use instancing versus a constant buffer?

I've heard something about instancing and understood it's useful for drawing the same object many times with slight changes. It's faster because you call the draw function once per frame and update ...
2
votes
1answer
218 views

Draw call optimization for multiple meshes in DirectX11

I have a large scene in a B3D model, which includes about 120 meshes as in the following pictures: Each mesh contain a vertex buffer and material information such as diffuse, specular, ambient... ...
14
votes
3answers
1k views

Using instancing for everything?

Instancing improves performance (significantly) when rendering multiple (hunders? thousands?) copies of the same mesh at once. But how much overhead does it have when rendering exactly one copy with ...
0
votes
1answer
118 views

why is glVertexAttribDivisor crashing?

I am trying to render some trees with instancing. This is rather weird, but before sleeping yesterday night, I checked the code, and it was in a running state, when I got up this morning, it is ...
0
votes
1answer
90 views

Frustum culling + instancing

I've implemented instancing in my app and right now I have an instance buffer holding position data for all instances. But I'd like to also implement frustum culling which would cull some of the ...
0
votes
1answer
145 views

XNA and HLSL shaders - Instancing using World Matrix array

I have posted this question on StackOverflow and was directed here, so I'll just copy the question: I am attempting to improvise some sort of hardware instancing in my game. I wish to draw multiple ...
0
votes
1answer
342 views

Instancing with the SharpDX toolkit

I am starting on the graphical portion of my project and before I begin I need to get Instancing working. I can do instancing with SharpDX, but not with the Toolkit Models. The main reason I want to ...
0
votes
0answers
40 views

IndexedInstanced logic

I'm using SharpDX.Toolkit with three buffers: two vertex and one index buffer. The first vertex buffer is bound to slot 0 for per-vertex data with following data: static VertexPosition[] vertexData = ...
2
votes
2answers
361 views

Implementing Geometry Instancing in DirectX

I have a project that I'm doing in Managed DirectX (DX9) where I want to render lots of grass. My current method (many draw calls) is slow, but I've heard Geometry Instancing can fix that. I know ...
-1
votes
1answer
185 views

SharpDX instancing with D3D11

Could anybody provide working code using SharpDX with D3D11, which does instancing and uses SharpDX's content pipeline? I have several problems there. I came to understand that one should use a ...
0
votes
2answers
280 views

Batching elements

I don't understand exactly how batching works. What I have understood: Batching is useful to regroup similar elements together and draw them in one draw call (performance++), currently drawing an ...
0
votes
1answer
303 views

Hardware instancing for voxel engine

i just did the tutorial on Hardware Instancing from this source: http://www.float4x4.net/index.php/2011/07/hardware-instancing-for-pc-in-xna-4-with-textures/. Somewhere between 900.000 and 1.000.000 ...
-2
votes
1answer
667 views

How to draw millions of cubes without idle , model instancing in XNA?

I work for a project in the style of game "Minecraft". I started using the "Model Instancing" in order to generate a large number of cubes possessing an identical model. So far so good. My problem is ...
1
vote
2answers
851 views

How (update,set, apply) dynamically color on a model of a XNA project?

I encounter a problem for set a background color on my model instantiated. I can change the texture but not change color. Is there a parameter for change the color ? Or change the opacity ? I am ...
3
votes
3answers
2k views

How to Bind Multiple Shapes/Models to One Vertex Buffer?

If I have two Vertex Arrays, one for Square, and one for Triangle; what is the best way to bind them to the VertexBuffer? What are the patterns used to write multiple vertices to the VertexBuffer? ...
1
vote
2answers
143 views

What's a good way to programmatically manage a cloneable entity?

Say you have missiles or rockets that a player can fire. What's a good way to programmatically manage the cloning of a base rocket, for example? I can think of 2 ways to do it: Player has a ...
2
votes
1answer
323 views

OpenGL Fast-Object Instancing Error

I have some code that loops through a set of objects and renders instances of those objects. The list of objects that needs to be rendered is stored as a std::map>, where an object of class ...
0
votes
1answer
57 views

Scrolling though objects then creating a new instace of this object

In my game when pressing the right mouse button you will place an object on the ground. all objects have the same super class (GameObject). I have a field called selected and will be equal to one ...
1
vote
1answer
367 views

How should I share variables between instances/classes?

I'm making a game using LOVE, so everything is programmed in Lua. I've been experimenting with using classes and object orientation recently. I've found out that a nice system to use is having most of ...
1
vote
0answers
486 views

Microsoft XNA code sample wont work with blender model

I downloaded this code sample and integrated it into my game http://xbox.create.msdn.com/en-US/education/catalog/sample/mesh_instancing It works with the model that they supplied, but throws and ...
0
votes
1answer
708 views

XNA: Instancing Cubes, Each Side Different Texture

I am trying to make thousands of instanced cubes, each with a unique texture on each side. Am I going to have to split each cube into 6 instanced faces, or can I unwrap it in such a way the the ...
7
votes
2answers
585 views

Particles/instancing groups in an Entity/Component system

I've been playing with an entity/component/system design recently, and I've come across a couple of stumbling blocks. Instancing Let's say I have a few hundred "things" (asteroids, chickens, ...
0
votes
1answer
283 views

Instancing pixel shader parameters — pass instance data through vertex shader?

I'm working on a deferred shader, and I want to use instancing to draw point lights. From what I understand, I can send the instance data through the vertex shader and pass it through unchanged to ...