PDA

View Full Version : GL_POINTS resize/rotate etc.



mikethebike
12-18-2011, 04:26 AM
Hi
drawing GL_POINTS is ok but when i rotate I get some black points. How should I avoid that? I cannot get such logic.
Many thanks
Michael

mobeen
12-18-2011, 04:36 AM
Hi,
We need more information to help you. Currently, we dont know what you are doing. There can be so many reasons for this some of these which are coming to my mind are
1) maybe you have texturing enabled (try disabling it glDisable(GL_TEXTURE_2D)) or
2) maybe you have lighting enabled (try disabling it glDisable(GL_LIGHTING)) or
3) maybe you are giving wrong params to some function who knows.

Post the relevant code snippet and then we might be able to help.

mikethebike
12-18-2011, 06:16 AM
Basically I do as below. as soon as i move i get black points but not if i comment the 3 lines below.(douuh)

glTranslatef(1123, 813, 0.0f);
glRotatef(Heading, 0.0f , 0.0f, -1.0f);
glTranslatef(-1123, -813, 0.0f);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glPushMatrix();
for( int ly=0; ly< Map_Size; ly++ ){
same for x nested loop
glDisable(GL_TEXTURE_2D);
glBegin(GL_POINTS);
colorize the points
glVertex2f(lx+1059, ly+749);
glEnd();
glPopMatrix();

Many thanks

mobeen
12-18-2011, 10:29 AM
Why are u assigning blend function each render? Is blending enabled? I think you should first turn blending off and then see if u still get the black points.

mikethebike
12-18-2011, 11:21 PM
No, still no luck commenting blending.
I found this but it doesn't really help(yes my background is black):
http://pinyotae.blogspot.com/2009/09/glpoints-qt.html