PDA

View Full Version : GLUT and multiple monitors



jingquan
06-14-2010, 01:25 PM
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(&amp;argc,argv);

glutInitWindowSize(3000, 768);

glutCreateWindow("simple");

glutDisplayFunc(display);

glutMainLoop();

return 0;

}



Any help is apperciated.

Alfonse Reinheart
06-14-2010, 02:12 PM
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.

jingquan
06-15-2010, 08:31 AM
solved with freeGLUT thanks, I linked to old libs.