[vox-tech] opengl: lines and points

Peter Jay Salzman p at dirac.org
Sun Jan 30 06:02:53 PST 2005


On Sun 30 Jan 05, 12:09 AM, Richard Harke <rharke at earthlink.net> said:
> On Saturday 29 January 2005 21:49, Peter Jay Salzman wrote:
> >
> > 1. The only point size that appears to be available is the default
> > pointsize of 1, whether I'm dealing with AA or not AA points.  I've
> > verified this with glGetFloatv() and GL_POINT_SIZE_RANGE.
> >
> >    If there are any GL programmers out there, I'm curious what point size
> >    ranges you have available on your system.
> >
> >
> > 2. Same problems with lines.  It appears that the only available width is
> >    1.  I can make them thicker by drawing lines next to each other, but
> >    the only width available on my system, both AA and non-AA, is 1.  Again,
> >    I'm curious what other people have available to them.
>
> You seem to have a very limited implementation. I don't recall the exact 
> number but my system provides a large range of point sizes and line widths.
 
I'm sorry to ask, but are you making this up out of the air, or do you
really know this for sure?

I'm only asking because I was under the impression that we both use Debian
on x86, so we should have the same system.  If you COULD recall the exact
number, that would be really, really helpful.

Here's some code to print out your max and min point sizes.  On my Debian
testing system, the max and min sizes are 1.0 and 1.0.  I can verify this
because glPointSize() doesn't seem to have an effect on point sizes.

It's entirely possible (maybe even probable) that there's an error in my
code.  If you see one, I'd really appreciate it if you could tell me.
Unfortunately, the results of glPointSize() just confirm what I see with
glGetFloatv( GL_POINT_SIZE )....

Here's the code....



#include <stdio.h>
#include <GL/glut.h>

int main(int argc, char *argv[])
{
	GLfloat size[2];
	GLfloat grain;

	glutInit(&argc, argv);
	glutInitDisplayMode( GLUT_DOUBLE | GLUT_RGB );
	glutInitWindowSize( 250, 250 );
	glutInitWindowPosition( 100, 100 );
	glutCreateWindow( argv[0] );

	glDisable( GL_SMOOTH );
	glGetFloatv( GL_POINT_SIZE_RANGE, size );
	glGetFloatv( GL_POINT_SIZE_GRANULARITY, &grain );

	printf("Without AA:\n");
	printf("Min pnt size: %f, Max pnt size: %f\n", size[0], size[1]);
	printf("Granularity: %f\n", grain);

	glEnable( GL_SMOOTH );
	glGetFloatv( GL_POINT_SIZE_RANGE, size );
	glGetFloatv( GL_POINT_SIZE_GRANULARITY, &grain );

	printf("With AA:\n");
	printf("Min pnt size: %f, Max pnt size: %f\n", size[0], size[1]);
	printf("Granularity: %f\n", grain);

	return 0;
}


More information about the vox-tech mailing list