l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2005 Jan 30 09:58

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] opengl: lines and points
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] opengl: lines and points

On Sun 30 Jan 05, 12:09 AM, Richard Harke <rharke@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;
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
O'Reilly and Associates
For numerous book donations.