#### Archived

This topic is now archived and is closed to further replies.

# why isn't this creating a dot?

This topic is 5643 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

glBegin(GL_POINTS); // glColor3f(1.0f, 1.0f, 1.0f); glVertex3f( -1.0f, 1.0f, -2.0f); glEnd(); that isn''t creating a dot or i can''t see it, the background is black btw

##### Share on other sites
many reasons eg the camera is pointed in the wrong direction is a common cause
btw never use a black background try glClearColor(0,0.5,1,1) which is what i use, it will save u time ultimatly.
eg if lighting is enabled + u havent set a normal for the point the point will appear black + looking for a black point on a black background is ...

http://uk.geocities.com/sloppyturds/gotterdammerung.html

##### Share on other sites
Zedzeek you have no clue what you are talking about, have you?

##### Share on other sites
Try calling glPointSize(5.0) before the code to increase the ''size'' of the point.

" Do we need us? "

##### Share on other sites
quote:
Original post by noVum
Zedzeek you have no clue what you are talking about, have you?

ehm.. not to question your judgment, but zed is a freakin GL guru.

##### Share on other sites
zedzeek > Points don''t have normals.

Shadow > Give what code you have for positioning the camera. If there is none, you should try glVertex3f(0,0,-2); and see if it shows up. You might just be off the screen?

------------
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155
"It''s all part of the conspiracy of conspirators conspiring to conspire their own conspiracies..."

##### Share on other sites
quote:
Original post by noVum
Zedzeek you have no clue what you are talking about, have you?

What a foolish thing to say. Look at how long he''s been a member of the damn site! I mean, thats not to mention how long he''s most likely been doing openGL. BTW, you''ve only been here for a few months and your telling veterans that they don''t know what they are talking about! Fool

At any rate, the points that zedzeek are valid and important. The reason he was suggested not to use a black background is becuase it ultimately causes problems because accidentally making things black (or white for that matter) are easy, so its wise to use an off color like grey so that you''ll always see whatever it is that you''re creating.

As for the normals on the points, I have no comment because I''m not sure about it.

Now, for my piece of advise. After taking the other things that were mentioned under consideration, make the point at (0, 0, -5) because than you know that, if you haven''t moved the camera, you''ll see it in the middle of the screen. After you see it you can try moving it

Ok, I''m done. Good luck!

"With my feet upon the ground I lose myself between the sounds and open wide to suck it in, I feel it move across my skin. I''m reaching up and reaching out. I''m reaching for the random or what ever will bewilder me, what ever will bewilder me. And following our will and wind we may just go where no one''s been. We''ll ride the spiral to the end and may just go where no one''s been." - Maynard James Keenan
[TheBlackJester ]
[Wildfire Studios ]

##### Share on other sites
>>zedzeek > Points don''t have normals<<

true, but in opengl any vertices that come after a normal command will ''get'' these normals (the verts can be for anything points,lines,mesh whatever)
opengl doesnt check if the normals are correct, this causes a lot of difficulties when ppl have to calculate the correct normals for a landscape ie u give opengl incorrect normals + the lighting will appear wrong.

try this
enable lighting
glBegin( GL_POINTS );
glNormal3f(0,0,1);
glVertex3f(0,0,0);
glNormal3f(0,0,-1);
glVertex3f(1,0,0);
glEnd();

they should appear different colours

http://uk.geocities.com/sloppyturds/gotterdammerung.html

##### Share on other sites
Okay first off I am sorry it has taken me so long to get to my post. I need to have a black background because this game is, at this point, in space. I need white points to look like stars. As of right now i have not enabled lighting, I don''t think you understand how simple this game is supposed to be, right now it''s a triangle that translates across the screen when the arrow keys are hit. Pertay cool eh?

anyway nothign i have done has seemed to work, I can''t get friggin white spots on the black friggin screen

##### Share on other sites
Okay first off I am sorry it has taken me so long to get to my post. I need to have a black background because this game is, at this point, in space. I need white points to look like stars. As of right now i have not enabled lighting, I don''t think you understand how simple this game is supposed to be, right now it''s a triangle that translates across the screen when the arrow keys are hit. Pertay cool eh?

anyway nothign i have done has seemed to work, I can''t get friggin white spots on the black friggin screen

##### Share on other sites
EDIT;
I can now get it to make dots, but I can''t seem to make white dots of different sizes within the same begin/end() calls
i.e

  void DrawBackGround() { 	glColor3f(1.0, 1.0f, 1.0f);	glBegin(GL_POINTS);		glVertex3f(0,0,-1);	glPointSize(5.0);	glVertex3f(1,0,-10);	glEnd();}

##### Share on other sites
Try using 2 glBegin()like this

void DrawScene()
{
glColor3f(1.0f, 1.0f, 1.0f);

glPointSize(2.0f); // smaller one

glBegin(GL_POINTS);

glVertex3f(0.0f, 0.0f, -1.0f)

glEnd();

glPointSize(5.0f); // bigger one

glBegin(GL_POINTS);

glVertex3f(1.0f, 0.0f, -10.0f);

glEnd();
}

Bye

##### Share on other sites
Thou shalt not change any state, whilst within a Begin/End block, which canst be pushed upon the state stack.