Here is an approach to draw a regular polygon using Android OpenGL.

by Satya Komatineni » Wed, 08 Jul 2009 06:57:38 GMT

Sponsored Links
 If you are new to OpenGL and also happen to be experimenting with
OpenGL and Android here is an article that I cooked up that explains
how to draw any regular polygon at any origin on the scene.

The design approach is simple enough: start by defining a regular
polygon with the help of a radius, number of sides and its origin.
Then calculate the vertices for each side of the polygon. Use
GL_TRIANGLES to draw multiple triangles to make up the polygon. Then
have the RegularPolygon provide these vertices and necessary indecies
as an array to the drawing class.

You can see the full article and source code at ;reportId=3189&ownerUserId=satya


Other Threads

1. Where can I find stats on Android distribution (number of devices) by cpu?

As a developer of android application that implements part of its
functionality using native code (c++), I would like to prioritize my
effort based on a per cpu brand and architecture (e.g. ARMv6, ARMv7,


2. Camera preview demo

Hi Dude,
             I worked on camera preview for taking live image , Here I
get following Exception /sdcard/1297668185153.jpg (Permission

image is not saved in sd card can anyone tell me  where  i did
mistake .

Thanks in Advance,


3. What parameters are needed send C2DM messages?

4. OpenGL textures fail to load, white image

5. test app in a inactive cell phone

6. When to use an IntentService vs. Service

7. Can Main Activity be conditionally shown based on app launch method?