GLUT and multiple monitors

Hi,

I came across this patch for GLUT that should enable support extending the window beyond native resolution.

I dont know if I’m doing it right as it didn’t work for me (can’t stretch the window across to the other monitor).

LINK: http://www.realmtech.net/opengl/glut.php

More resources: http://dee.cz/glut/

My simple test app:


#include <iostream>

#include <GL/glut.h>

using namespace std;

 

void display(void)

{

glClear(GL_COLOR_BUFFER_BIT); 

glBegin(GL_POLYGON);

glVertex2f(-0.5, -0.5);

glVertex2f(-0.5, 0.5);

glVertex2f(0.5, 0.5);

glVertex2f(0.5, -0.5);

glEnd();

glFlush(); 

}

 

int main(int argc, char **argv)

{

glutInit(&argc,argv);

glutInitWindowSize(3000, 768);

glutCreateWindow("simple"); 

glutDisplayFunc(display);

glutMainLoop();

return 0;

}


Any help is apperciated.

Have you tried FreeGLUT? I don’t know about its multi-monitor capabilities. But it is a project in active development, rather than a couple of patches from the wild.

solved with freeGLUT thanks, I linked to old libs.