Tag Info

Hot answers tagged


Rules of thumb: Keep communications with the GPU at a minimum String comparisons are not known to be especially fast Here are my test results: At 10000 uniforms per frame set using a pre-located uniform ID (as many characters as you need), we get 554 FPS on average. At 10000 uniforms per frame, with the uniform ID being looked up each time (7 ...


Use a lightmap. A lightmap is an array in memory which is as large as your map and represents the light level of each tile. When you create/remove a light source, add/subtract its light intensity from the surrounding lightmap values. As long as no lightsources move, keep the lightmap as it is. No matter how many light sources you have, the overhead per ...


Turns out, I was doing something really wrong. The problem was in the gameloop where I updated the components. for (auto component : _componentList){ // ^ not reference -> lots of ctor/dtor calls -> low fps if(component) component->Update();


Your points seem reasonable. For static elements that are set up once and never change, you can certainly pack them into a GL_STATIC_DRAW buffer and keep it alive for as long as needed. If you still have to move these static elements around in the screen, then this approach is not very interesting anymore because each would need a transformation matrix that ...

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