OpenGL (es)

Recently, I've acquired the need to do some low level graphics work with Android...and that means OpenGL ES. To this date, I've never been able to find a decent tutorial that steps above the 'copy this code here and click run' routine that we all know and loathe. Does anyone know of a tutorial series that actually follows a real use-case as opposed to simply dumping code into a main method? Perhaps some type of introduction into how to go about encapsulating OpenGL into a manageable model? As of now, I plan to form a type of scene graph to transverse over, but I am very confused as to how to sort the nodes for rendering to make as few changes to the OpenGL state as needed. I got this idea from an answer on stack overflow, but both unfortunately, and not very surprisingly, the post on stack overflow simply said 'here's what to do, now do it' without any clues as to how one might accomplish that. There seems to be a void area between the "OpenGL basics" and "OpenGL Finished Projects" that no one seems to think are important enough to talk about. Help. :(
closed account (o1vk4iN6)
Well what, once you know the basics you just add on what you want to do. Everything is visual so if you want more fancy looking stuff that's more so the shader part of it. Shaders do more then just textures though, they control the vertex positions as well so you can do stuff like distorting a model and such. Not sure what you mean by finished project, unless you mean something like a game ?
Thanks for the reply, xerzi. By "finished" I mean any non-trivial, well designed, object oriented project that is ready to be considered for release. Basically, I am looking for general design patterns that work well with the OpenGL API. For example, I have a model that I consider to be a 'button' that's encapsulated within a 3D menu. How would I dynamically find the best order in which to render elements of such a menu? Sort by texture? Color overlay? Since the GUI is generated dynamically, I can't blob all of the rendering into a single method in an optimized order. I'm convinced that whatever I cobble together invent will likely be sub-standard, so I'd really like to research how others are doing it.


It occurs to me that I might be subjecting myself to pre-optimization, but I'm not exactly sure of the limitations of the Android platform.
Last edited on
closed account (o1vk4iN6)
I don't think the order matters by texture or color overlay, how would the ordering be optimized, but more like if you are drawing 2 objects that are the same, you should draw them in sequence rather then drawing a different object inbetween so that you don't need to resend certain values to the gpu registers. I guess it depends on what you are drawing. I mean if you are drawing 2 boxes it doesn't really matter.
Last edited on
Topic archived. No new replies allowed.