Jump to content
  • Advertisement
Sign in to follow this  
GRAPHIC GEEK

OpenGL How to get smooth points instead of square points in OpenGL

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

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi everyone,


I am using GLUT in ubuntu 10.10, when i try to draw smooth points in OPENGL using below code i am not getting circular points, instead of that
i am getting square points


void draw_points()
{
GLfloat v1[2] = {0.25,0.25};
glClear(GL_COLOR_BUFFER_BIT);
glColor3f(0.8, 0.5, 0.0);
glPointSize(5.0f); //setting the size of the points
glEnable( GL_POINT_SPRITE ); // GL_POINT_SPRITE_ARB if you're
glEnable( GL_POINT_SMOOTH ); // using the functionality as an extension.
glEnable( GL_BLEND );
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );

glBegin(GL_POINTS);
glVertex2fv(v1);
glVertex2f(0.75,0.25);
glVertex2f(0.85,0.50);
glVertex2f(0.75,0.75);
glVertex2f(0.25,0.75);
glVertex2f(0.15,0.50);
glEnd();
glFlush();

}


please tell me where i am going wrong

thanks a lot in advance,

GG

Share this post


Link to post
Share on other sites
Advertisement
Google is your friend. I just googled [color=#000000][size=2]

GL_POINT_SMOOTH

and I found a whole bunch of results. Here's one that looks promising:

http://stackoverflow.com/questions/1513811/getting-smooth-big-points-in-opengl

Share this post


Link to post
Share on other sites
Try to enable FSAA but imo it would be easier to either map a texture or draw a small filled circle with 1x1 vertices.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!