Delphi – OpenGl Star drawing

delphiopengl

I'm really new to OpenGL, which is a really bad thing to me 😐
I need to draw a star(sort of) with openGl but I'm not really sure where I should start.

The results should be something like this:

Is there an easy way to do this?

Best Answer

the easiest way would be to draw a texture mapped quad with a "star" texture. You can read a tutorial on texture mapping here: http://nehe.gamedev.net/data/lessons/lesson.asp?lesson=06

That tutorial teaches how to draw a cube using textures. You just have to draw a single face, instead of all six.

The tutorial is written in C++, but near the end you can download the source of a Delphi version.

There are other effects you might want to add later, such as transparency. You can also read about that in the NeHe site. It has a lot of useful tutorials on OpenGL. It's a great place to learn OpenGL.