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