views:

722

answers:

2

Hi,

I can see how to render wireframe primitives in open gl. By using glPolygonMode, however this call seems to be missing from Open GL ES.

Does anyone know how to render primitives in wireframe on Open GL ES?

Thanks Rich

A: 

I'm not entirely certain, my exposure to OpenGL ES is just enough to it dangerous for me to play with, but my impression of how it works is:

glEnableClientState(GL_TEXTURE_COORD_ARRAY);

Turns on drawing full textures. Rather than doing that, if you use

glEnableClientState(GL_COLOR_ARRAY);

and use the color array instead of the texture array, then it will simply draw lines instead of fill textures. I think.

Ed Marty
thanks for the reply, however I'm not sure how this relates to wireframe?
Rich
Is not a wireframe just the lines that create the polygons? You must create polygons using points then fill them with textures to get the textured look. If you create polygons then draw the outline of the polygons instead, that will indeed be a wireframe.
Ed Marty
+1  A: 

It not possible to render wireframe in OpenGL ES. You can draw using lines/line strip instead of triangles but some of the lines will be lost. It's not real wireframe but it can help you see some problems. In OpenGL(not ES) you can change the way polygons are rendered using glPolygonMode, but this is not supported in OpenGL ES

Felics