I m working on an OpenGL project in which I want to draw a star. It doesn t necessarily have to be a 3d looking star (2d looking is fine). I have the xyz coordinates for the center of the star and I know the size I d like it to be. I don t do much OpenGL/3d math programming, so any help here would be much appreciated.
EDIT: More detail: I m not sure if this is possible but can I draw a 2D looking star at some point in 3d space? I tried simple with a square and tried something like:
gl.glTranslated(x, y, z);
gl.glBegin(GL.GL_QUADS);
gl.glVertex2D(x-size,y-size);
gl.glVertex2D(x-size,y+size);
gl.glVertex2D(x+size,y+size);
gl.glVertex2D(x+size,y-size);
gl.glEnd();
The square did not seem to be at the correct depth even though I translated to the x,y,z. It appeared to be closer to the front of the screen than it should be. Is it possible to translate a 2d shape in 3d like this?
thanks,
Jeff