Newbie help! OpenGL

Started by
13 comments, last by Trenki 16 years, 5 months ago
Hi Guys, I'm very new to OpenGL and co, so forgive me if I ask some really draft questions! How do make a dot about 8 pixels in size. thanks
Advertisement
Quote:Original post by shaolinf
Hi Guys,

I'm very new to OpenGL and co, so forgive me if I ask some really draft questions!

How do make a dot about 8 pixels in size.

thanks
Take a look at glBegin() and glEnd() (you'll want to use the GL_POINTS enum), glVertex2*(), and glPointSize().

If you need more info than that, you may need to clarify your question a bit.
Thanks for the reply. Can you give me an example of that code in implementation please ?
Sugar ?

	glPointSize (8);	glBegin (GL_POINTS);		glVertex2f (0.0f,0.0f);	glEnd ();


This renders a pixel to the center of the screen.

If you prefer, there are alternative routines that you can use besides the glVertex2f version (For example, glVetex2i() (For integers), glVertex2iv() (Integers), et al.
Ah ha, thanks!
Ok, so I've created 2 of those squares with different co-ordinates on the screen. If I wanted to randomly move them about, how would I do that?
Transform them into different places in world space before you render them.
What does that mean and how do I do that ?
This is all you need.
_______________________My computer stats:Xcode 3.1.2Mac OS 10.5.8---Visual C++ 2008 Express EditionWindows XP---NetBeansUbuntu 9.04---Help needed here!

This topic is closed to new replies.

Advertisement