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).]