Timeline for Game Code Design for Rendering
Current License: CC BY-SA 2.5
6 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 14, 2011 at 18:54 | vote | accept | NebulaFox | ||
Mar 8, 2011 at 3:47 | comment | added | NebulaFox | It's more about how then when, and I think you answered that in your first comment - the handlers. I am just making sure that I don't have to stop or interrupt the render thread. And that it is okay to load resources while rendering where it's to be expected, like after tapping a button. | |
Mar 8, 2011 at 2:58 | comment | added | PatrickB | If your question is "when can I, on the render thread, define new resources", I'd say check the manpages for the OpenGL ES function. link Also, use glGetError() to find out what the problem is, don't guess! | |
Mar 8, 2011 at 2:47 | comment | added | PatrickB |
The points at which you are able to load resources (e.g. glGenTextures()) are well defined, specifically after successfully calling eglMakeCurrent(). Since your render thread must create resources and the other threads define what must be loaded, you have to use some kind of communication. Generally, resource handles are used to reference these, for example: handle = loadTexture("file.png"); //signal renderer to load a texture. queueState(SET_TEXTURE, handle); queueDraw(model);
|
|
Mar 8, 2011 at 2:26 | comment | added | NebulaFox | Are you suggesting then that I should be able to load textures, buffers, at any point as long it is on OpenGL ES thread? It's more the memory allocating stuff I am having problems with when it comes to rendering. | |
Mar 8, 2011 at 2:08 | history | answered | PatrickB | CC BY-SA 2.5 |