Jump to content

  • Log In with Google      Sign In   
  • Create Account


GL_POINTS size????


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
6 replies to this topic

#1 Tjaalie   Members   -  Reputation: 157

Like
0Likes
Like

Posted 19 July 2005 - 03:26 AM

Hello Thread reader, I programm for a while but i just started with OpenGL, and im making some kind of level editor using the GL_POINTS type. So my question is there a way i can change the size of a point drawn with the GL_POINTS type. I know there is some kind of extencion or something but i don't know where i can get some info about it. All you help is apricated. Tjaalie,

Sponsor:

#2 marijnh   Members   -  Reputation: 182

Like
0Likes
Like

Posted 19 July 2005 - 03:50 AM

glPointSize(2.0);

The points will be square, unless you turn on glEnable(GL_POINT_SMOOTH), then they will be round and smooth and pretty.

Edit: Oh yeah, and turn on blending for the round dots, as Fruny notes. Something like this should do that:
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
(Not sure if setting the blendfunc is even necessary.)

#3 Fruny   Moderators   -  Reputation: 1653

Like
0Likes
Like

Posted 19 July 2005 - 03:54 AM

Quote:
The points will be square, unless you turn on glEnable(GL_POINT_SMOOTH), then they will be round and smooth and pretty.


IIRC, you also need to enable alpha blending.

#4 MENTAL   Members   -  Reputation: 382

Like
0Likes
Like

Posted 19 July 2005 - 04:03 AM

I should also point out that this size is fixed, regardless of how far away the point is (so a point at 10km is the same size as one at 1m). If you want your points to get bigger and smaller like other objects then you will need to look at billboards instead.

#5 Tjaalie   Members   -  Reputation: 157

Like
0Likes
Like

Posted 19 July 2005 - 04:15 AM

thanks for your help (all of you),
it works now:D.

Tjaalie,

#6 Dave Astle   Senior Staff   -  Reputation: 2307

Like
0Likes
Like

Posted 19 July 2005 - 06:24 AM

Quote:
Original post by MENTAL
I should also point out that this size is fixed, regardless of how far away the point is (so a point at 10km is the same size as one at 1m). If you want your points to get bigger and smaller like other objects then you will need to look at billboards instead.
You wouldn't need to use billboards, you could just use glPointParameter to set up attenuation.

#7 MENTAL   Members   -  Reputation: 382

Like
0Likes
Like

Posted 26 July 2005 - 01:41 AM

God damnit I wish I paid more attention to the GL specs.

/me goes off to rewrite his particle renderer.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS