summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2018-08-21 09:26:01 +0000
committerManolo Gouy <Manolo>2018-08-21 09:26:01 +0000
commitec88e4a7c0987dda13915d44f3efffe20909881b (patch)
treeec5dbaf3da8c68c0aa3fff9faee4b556b97418d1 /examples
parent153b175d907cdc506f3b3de159ebca7830b7e2e3 (diff)
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
Diffstat (limited to 'examples')
-rw-r--r--examples/OpenGL3-glut-test.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/examples/OpenGL3-glut-test.cxx b/examples/OpenGL3-glut-test.cxx
index 9ec8c4989..8c1094fcf 100644
--- a/examples/OpenGL3-glut-test.cxx
+++ b/examples/OpenGL3-glut-test.cxx
@@ -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);