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

Re: OpenGL resolutions



> > 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.
> > 
> 
> 
> Oh no, this would be fine - it's the fact that I start OpenGL,
> guessing some size for the window, Voodoo starts up in <some mode> and
> I can't find out what that <some mode> is... if I know what size the
> actual mode is, I can set the viewport to fill that...
> 
> > 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.

Ah - GLU_SCREEN<foo> returns the size of the /actual/ screen mode - in
the case of a Voodoo running fullscreen, it returns the voodoo mode
that started up when one opens the window. So I can start GL, open a
GLUT windo, ask GLUT what size the screen is, and if the FX_MESA
variable is set to fullscreen I can then resize the window to fill the
"screen" which will fill the voodoo rendered screen..

The windowed renderings can take care of themselves.

Personally I think the issue is that GLUT ought to send you a reshape
event after starting up to say "yeah I know you asked for blahXblah,
but I could only get 600x800.." but it opens a blahXblah windo and
proceeds to pretend we have that size rendering surface when we don't.