OpenGL ES Loading
- by kuroutadori
I want to know what is the norm of loading rendering code.
Take a button. When the application is loaded, a texture is loaded which has the image of the button on it. When the button is tapped, it then adds a loader into a queue, which is loaded on render thread. It then loads up an array buffer with vertexes and tex coords when render is called. It then adds to a render tree. Then it renders.
the render function looks like this
void render()
{
update();
mBaseRenderer->render();
}
update() is when the queue is checked to see if anything needs loading.
mBaseRenderer->render() is the render tree.
What I am asking then is, should I even have the update() there at all and instead have everything preloaded before it renders?
If I can have it loaded when need, for instance when there is tap, then how can it be done (My current code causes an dequeueing buffer error (Unknown error: -75) which I assume is to do with OpenGL ES and the context)?