[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: OpenGL resolutions



Katie Lucas wrote:
> 
> > Katie Lucas wrote:
> >
> > > I don't know if I'm missing something obvious or what, but how on
> > > earth do you find out what resolutions OpenGL is capable of on a machine?
> >
> >
> > Have you tried
> >
> > GLuint size[2];
> >
> > glGetIntegerv(GL_MAX_VIEWPORT_DIMS, size);
> >
> > IIRC that should return the maximum width and height the card supports.
> > Working out the maximum depth could be a bit trickier though. I don't have
> > my programming tomes here it work, I'll check them when I get home :)
> 
> Rather annoyingly these seem to return 1600x1200 whatever I run it on....

Yes - that's because it's telling you the maximum viewport size that the
OpenGL driver can support - and NOT the maximum that your CRT can display.

Fundamentally, you can't ask this question of OpenGL.  The reason is that
it is illegal to make *ANY* OpenGL call before you have a display context
open.  At that stage, all the issues of what you *might* be able to do
are subsumed by the fact that you've already done them.

These questions must be asked of GLUT, GLX or X11 - there is no way
OpenGL itself can (or should) answer them.

You can ask GLUT 'GLUT_SCREEN_WIDTH' and 'GLUT_SCREEN_HEIGHT' using
glutGet...but I guess it's not necessarily true that all OpenGL
implementations can support windows that are as big as the screen...
a Voodoo-1 running Mesa's in-a-window hack (for example) is still
limited to it's native resolution.

Bottom-line is I don't know...but I do know that the answer cannot
come from OpenGL itself.


----------------------------- Steve Baker -------------------------------
HomeMail : <sjbaker1@airmail.net>   WorkMail: <sjbaker@link.com>
HomePage : http://web2.airmail.net/sjbaker1
Projects : http://plib.sf.net       http://tuxaqfh.sf.net
           http://prettypoly.sf.net http://tuxkart.sf.net
           http://freeglut.sf.net   http://toobular.sf.net