PDA

View Full Version : OpenGL ES Cylinder for Android...



esepich
07-06-2013, 11:27 PM
There seems to be a lot of code on developer.android.com that shows how to render a triangle. I am trying to render a cylinder. Is there code available somewhere that outlines how to draw a cylinder for OpenGL ES for the Android?

ClayMontgomery
07-07-2013, 08:19 PM
There seems to be a lot of code on developer.android.com that shows how to render a triangle. I am trying to render a cylinder. Is there code available somewhere that outlines how to draw a cylinder for OpenGL ES for the Android?

I recommend you take a look at the implementation of gluCylinder() in this library:

http://code.google.com/p/glues/

This is C++, but it should be fairly easy to convert portions of it to Java using the OpenGL ES wrapper classes (android.opengl.GLES11).

Regards, Clay