17
votes
OpenGL - How come drawing sprites takes so much performance
Your GPU can probably render even 100k sprites without issues, but you need to do it smart. Sprites and other geometry must be supplied to a GPU in batches grouped by the same texture, shader and ...
5
votes
Accepted
How to update vertex buffer in DirectX 12
This is an old question, so I'm not sure how relevant this answer will be now, but...
In DirectX 11 there are "4 kinds" of resources indicated by their ...
3
votes
Accepted
Can GPU draw from one VB and upload to another VB at the same time? (OpenGL)
What you need is buffer orphaning.
Before uploading new data, you first orphan the old buffer by passing NULL to a glBufferData() call.
This will avoid the ...
3
votes
Accepted
The types of buffers typically used in robust WebGL/OpenGL apps
If you set up an project with your idea, - what you want to archive as a final result. You also need to question yourself, how to structure different data. With the question you asked, everything can ...
2
votes
OpenGL glVertexAttribFormat vs glVertexAttribPointer
Strides cannot be zero.
Try:
int strides[] = { (int)sizeof(vec3), (int)sizeof(vec3)};
glBindVertexBuffers(0, 2, ptrs, offsets, strides); //comment
Otherwise, ...
2
votes
OpenGL - How come drawing sprites takes so much performance
The way you are batching your sprites might be suboptimal. If you're using glDrawElements() to render a batch of multiple sprites, then that can only mean you're ...
2
votes
Accepted
OpenGL C++ Drawing particles instanced performance
Found my mistake at the initialization of the color buffer.
instead of
GLsizei datasize = sizeof(GLfloat);
it should be
...
2
votes
What is the proper strategy to manage vertex buffers?
If there was just one "proper strategy" or "best way", the API would give you only that one option to ensure everyone got the best outcome.
But that's not how gamedev works. ...
1
vote
Cannot Draw a triangle without VAO on MacOS
Above a certain GL version Macs only support OpenGL core profiles, which require VAOs. This is perfectly legal, but it does mean that code written for other platforms, where compatibility profiles are ...
1
vote
Accepted
How do rendering pipelines improve the performance of updating all the vertices every frame?
Usually games and game engines will upload vertices, textures and other render-relevant data to the graphic card once by putting it into buffers. Those then stay in the GPU RAM until the game tells ...
1
vote
Accepted
How to use textures in 2D games in WebGL
You probably will want to use textures. Looking at the image you posted, I would probably make the door one texture, have another one for the lights, the wreath another, the pumpkins another, etc. ...
1
vote
A question about SharpDx Colored Cube
Finally, I found what the problem is.
My indeces is an array which type is int, so during my render period, I should set my index buffer format 32byte such as Format.R32_UInt, rather than Format....
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
vertex-buffer × 71opengl × 34
directx11 × 15
index-buffer × 11
c++ × 9
shaders × 9
vertex-arrays × 9
directx × 6
vbo × 6
c# × 5
xna × 5
rendering × 5
vertex-attribute × 5
sharpdx × 4
instancing × 4
textures × 3
graphics × 3
glsl × 3
webgl × 3
vao × 3
unity × 2
monogame × 2
hlsl × 2
lwjgl × 2
game-loop × 2