[Bf-committers] Themes, vertex size

Matthew H. Plough bf-committers@blender.org
Sat, 6 Dec 2003 14:47:19 -0500


John K. Walton wrote:
> the slider user preference works ok on an sgi O2, but the vertices are
> square :-)

Vertices are also drawn square on my system (3Dlabs Wildcat VP 760); OpenGL
is designed to draw square points by default. I wrote a cheap arcade-style
game in OpenGL, and was able to draw round points by turning blending off
and turning on point antialiasing [ glEnable(GL_POINT_SMOOTH) ]. The OpenGL
Programming Guide says that you should also use an alpha function that
passes "only fragments with alpha greater than 0.5," (page 578) but I did
not find that necessary.

With respect to the point sizing issue:
I looked through the OpenGL programming guide for information about this
problem.  There is some information that may be useful on page 51:

The call:
float range[2];
glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, range);
will get the maximum and minimum size that an aliased point can be drawn.

The call:
float range[2];
glGetFloatv(GL_SMOOTH_POINT_SIZE_RANGE);
will get the maximum and minimum size that an antialiased point can be
drawn.

*However*, on my cygwin distribution, GL_ALIASED_POINT_SIZE_RANGE and
GL_SMOOTH_POINT_SIZE_RANGE are commented out in gl.h, so I must use
GL_POINT_SIZE_RANGE instead.  This might show that a particular OpenGL
implementation can't draw large points, but with ATI's illustrious drivers,
one can never be sure whether it's lying or not.  I had a similar problem
running my cheap game on an ATI Rage II at my school, but if I recall
correctly, I am fairly sure that it would draw point sizes up to 5 or so.

At one point, there was a problem in Tuhopuu where it looked like the point
size was not getting initialized at program start, so vertices were always
drawn with size 1 until the user changed the value on the slider, but that
looks fixed now.  Could a similar issue exist in BF?

I hope this helps some.

Cheers,
Matthew H. Plough