PDA

View Full Version : GLUT window opends without the title bar



DesignerX
08-09-2008, 09:45 AM
I just started to learn opengl and tried to open a simple window using glut.

problem is that the window is opened without the title bar. just a blank square with no border of a standard window.

How can I make the borders appear (I have no need in a menu bar, only the title bar)

The code :

#include <stdlib.h>
#include <GL/glut.h>


void renderScene(void);

int main(int argc, char **argv) {

glutInit(&argc, argv);
glutInitWindowPosition(-1, -1);
glutInitWindowSize(500, 500);
glutInitDisplayMode(GLUT_RGB | GLUT_SINGLE | GLUT_DEPTH);

glutCreateWindow("A Simple Window");
glutDisplayFunc(renderScene);
glutMainLoop();

return 0;
}

void renderScene(void) {
glClear(GL_COLOR_BUFFER_BIT);
glFlush();
}




thx.

dletozeun
08-09-2008, 01:17 PM
Can you inform us on what environment you are working on, I don't think this is due to GLUT, as far as I know, there is not even a function that could make appear/disappear the window title bar.

Do you use compiz?

DesignerX
08-10-2008, 03:26 AM
I work with linux ubuntu. Could it be a problem with the glut libs ?

Other tried and it worked on their side.

dletozeun
08-10-2008, 05:05 AM
I don't think the problem is with glut. I already had a similar bug when running a glut application with compiz enabled and an ATI card.

Try to disable compiz if you have an ATI card.

DesignerX
08-10-2008, 07:56 AM
Guess what, I have an ATI card :)
What is compiz and how can I disable it ?

thx alot.

dletozeun
08-10-2008, 08:57 AM
Compiz is a window manager that uses hardware acceleration via opengl. It enables many effects like 3d desktop. You will find more information googling.

To disable/enable it graphically, install the compiz-swith package with synatic. Or try this in command line:

killall compiz.real && killall compiz && metacity --replace --display :0 &