Skip to main content
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 ...
HankMoody's user avatar
  • 308
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 ...
Chuck Walbourn's user avatar
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 ...
Bram's user avatar
  • 3,744
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 ...
nabr's user avatar
  • 56
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, ...
Stephane Hockenhull's user avatar
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 ...
Yoan Lecoq's user avatar
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 ...
moepmoep12's user avatar
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. ...
DMGregory's user avatar
  • 139k
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 ...
Maximus Minimus's user avatar
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 ...
Philipp's user avatar
  • 122k
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. ...
user1118321's user avatar
  • 2,642
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....
tedyage's user avatar
  • 23

Only top scored, non community-wiki answers of a minimum length are eligible