You're not guaranteed GL11 so what you'll want to do is write something that happens in your Renderer.onSurfaceCreated() call. Check the GL version and then check extensions. I have a class I call GraphicsConfiguration which has a bunch of booleans of what's supported and what's not as well as the determined levels of quality/ detail to use. All of my drawing code uses the GraphicsConfiguration to get all of that info.
For instance, if GL version is 1.1 Common, VBOs are supported so you can use glBufferData. If 1.0, you have to check for vertex_buffer_object extension. If that doesn't exist, then the platform doesn't support them and you must use regular buffered arrays. I created a class to deal with that, so all I do is load data into that class and it uses VBOs or direct, depending on the capabilities defined in my GraphicsConfiguration. I also do all of my resource loading in the onDrawFrame call. On Dec 30, 12:58 pm, Philip <[email protected]> wrote: > Hi all, > > I am new to Android and trying to port some games on the new platform > from iPhone developed using OpenGL. I was wondering when all the ext > 1.1 will be supported on Android. In particular, I am interested to > use glPointSizePointerOES(int type, int stride, int offset). Right > now, only glPointSizePointerOES(int type, int stride, Buffer pointer) > can be accessed thru the GL11 interface. > > I am also curious to know if the glBufferData(GLenum target, > GLsizeiptr size, const GLvoid * data, GLenum usage) can be coupled > to vertex, color and pointsize arrays, making the task of creating > these data simpler than using NIO buffers all over the code. > > I also would like someone to confirm that if I am using GLSurfaceView, > my onchanged, oncreated and ondraw callbacks in the registered > renderer are the only places I can access the GL10/11 context. That's > a big change from the iPhone where the context is always accessible > from the GL thread. In particular, if I want to create textures on the > fly, it seems that the only way is to check if the texture name is > binded (>0) and if not, take a hit on the first draw by allocating its > texture name. Am I doing this right? > > Thanks for your help in advance. > > Phil -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

