Show also how to create the OpenGL3 GLUT window fullscreen.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13024 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
parent
153b175d90
commit
ec88e4a7c0
@ -189,14 +189,21 @@ void display(void)
|
||||
glDrawArrays(GL_TRIANGLES, 0, 3); // draw second object
|
||||
}
|
||||
|
||||
int fullscreen = 0;
|
||||
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
Fl::use_high_res_GL(true);
|
||||
glutInit(&argc, argv);
|
||||
glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | FL_OPENGL3);
|
||||
glutInitWindowSize(400,400);
|
||||
int W = 400, H = 400;
|
||||
if (fullscreen) {
|
||||
int X,Y;
|
||||
Fl::screen_xywh(X,Y,W,H,0);
|
||||
}
|
||||
glutInitWindowSize(W, H);
|
||||
glutCreateWindow("Triangle Test");
|
||||
if (fullscreen) Fl::first_window()->fullscreen();
|
||||
#ifndef __APPLE__
|
||||
GLenum err = glewInit(); // defines pters to functions of OpenGL V 1.2 and above
|
||||
if (err) Fl::error("glewInit() failed returning %u", err);
|
||||
|
Loading…
x
Reference in New Issue
Block a user