P
P
Pavel Mikhalovsky2017-01-08 01:42:06
OpenGL
Pavel Mikhalovsky, 2017-01-08 01:42:06

How to increase max point size in opengl?

I am making a vector graphics editor as a task in one of the disciplines at the university.
I use GLUT and the C language (this is specified in the task).
I'm drawing circles as points (using POINTS_SMOOTH) and found that the points have a size limit. How to fix it?
A code snippet that draws a point. (picArray is a structure where I store drawing objects)

glEnable(GL_POINT_SMOOTH);
glPointSize(picArray[i].size);  //Устанавливаем размер
                glBegin(GL_POINTS);
                    glColor3f(picArray[i].r,picArray[i].g,picArray[i].b);
                    glVertex2f(picArray[i].coord[0].x,picArray[i].coord[0].y);
                glEnd();

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Makaleks, 2017-01-12
@pavel9609

Docks
It says that it depends on the platform what maximum size a smoothed point can have, guaranteeing only support for size 1. The paragraph before Notes is everything.
In opengl everything jumps from triangles, so why not use GL_TRIANGLE_FAN ? These calculations will still be - either on your side or on the opengl side. Display lists ( glList ) will allow you to calculate just once for some smoothing (how many parts of the circle to divide into), and glScale will allow you to scale until individual segments become visible. Use vertex arrays ( glDrawElements) so as not to access the video card twenty times for one object, because nobody does that. Everything is described in the OpenGL Red Book , which even has a translation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question