GLFW fullscreen mode somehow messed up...

I have tried this on both my Windows XP box as well as my brother’s Windows 98 box. The XP is running a GeFarce 5200FX and the 98 is running a GeFarce 4. On both, when running windowed mode, I get everything I should expect. Fullscreen mode, however seems to find video modes that are incompatible. Im trying to find out what version of GLFW im using here… uh… Well, the documentation revision is 1.3, but I think Im using GLFW 2.3… Not sure.

Anyways, I havent tried messing with the video mode stuff, I figured it should have worked right off the bat. I will play around with that, but I want to know if there’s anybody else out there who has come up with a solution (or had the same problem)

I figured out the version, its version 2.4.0.

[This message has been edited by 147-2 (edited 11-07-2003).]

Could you send me the code (you know the address…)? And perhaps a more detailed comment on what’s not working…

Ok, I had a lot to do in the recent days, on top of that I had a lot of program that was messing up, so I needed to pen a program that would display what I was going wrong, without sending you the whole program that Im writing. This little demo program demonstrates the problem I was having…

#include “glfw.h”

#define FULLSCREEN 0

bool quit;

void keyboard(int key, int state)
{
if(key == ‘Q’) quit = true;
}

int main()
{
quit = false;
glfwInit();

glfwOpenWindow(800, 600, 8, 8, 8, 8, 24, 8, FULLSCREEN?GLFW_FULLSCREEN:GLFW_WINDOW);

glfwSetKeyCallback(keyboard);

while(!quit)
{
	glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
	
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	glOrtho(0.0f, 800, 600, 0.0f, -1000.0f, 1000.0f);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
	glColor3f(1,1,0);  // yellow
	glBegin(GL_TRIANGLES);
	glVertex3f(10,10,0);
	glVertex3f(110,110,0);
	glVertex3f(210,10,0);
	glEnd();
	glfwSwapBuffers();
}

return 0;

}

You set FULLSCREEN to 1, and you get a blank screen. If clearcolor is set to something other than black, then you’ll notice that the screen seems to be out of sync with the video card, as if a bad mode was selected. This happens on my Win98 laptop (LCD screens have video modes? no acceleration), on my XP machine (running GeFarce 5200FX), and my brother’s Win98 machine (running GeFarce 4).

The entire project which I created to run this little program can be had here: http://www.bloodyaxes.com/glfwfstest.zip

Thank you for your assistance
Rob

[This message has been edited by 147-2 (edited 11-14-2003).]

[This message has been edited by 147-2 (edited 11-14-2003).]

Hi!

I hacked around for a few minutes, and to me it seemed much like a GL error, not GLFW…

Anyway, i found a solution. Do this right after glfwOpenWindow:

int w,h;
glfwGetWindowSize(&w,&h);
glViewport(0,0,w,h);

It seems as if the initial viewport is wrong for the GLFW fullscreen window. I vaguely recall that something like this has surfaced before, but I can’t remember what the conclusion was.

Until I find a solution for GLFW, this should hopefully be your solution.