Added OpenGL 3.0 context creation API entries
[freeglut] / src / freeglut_init.c
index d602a71..bf5b5ac 100644 (file)
@@ -85,7 +85,10 @@ SFG_State fgState = { { -1, -1, GL_FALSE },  /* Position */
                       GL_FALSE,               /* JoysticksInitialised */
                       GL_FALSE,               /* InputDevsInitialised */
                       0,                      /* AuxiliaryBufferNumber */
-                      0                       /* SampleNumber */
+                      0,                      /* SampleNumber */
+                      1,                      /* MajorVersion */
+                      0,                      /* MajorVersion */
+                      0                       /* ContextFlags */
 };
 
 
@@ -418,6 +421,10 @@ void fgDeinitialize( void )
     fgState.JoysticksInitialised = GL_FALSE;
     fgState.InputDevsInitialised = GL_FALSE;
 
+    fgState.MajorVersion = 1;
+    fgState.MinorVersion = 0;
+    fgState.ContextFlags = 0;
+
     fgState.Initialised = GL_FALSE;
 
     fgState.Position.X = -1;
@@ -1076,4 +1083,20 @@ void FGAPIENTRY glutInitDisplayString( const char* displayMode )
     fgState.DisplayMode = glut_state_flag;
 }
 
+/* -- SETTING OPENGL 3.0 CONTEXT CREATION PARAMETERS ---------------------- */
+
+void FGAPIENTRY glutInitContextVersion( int majorVersion, int minorVersion )
+{
+    /* We will make use of these valuse when creating a new OpenGL context... */
+    fgState.MajorVersion = majorVersion;
+    fgState.MinorVersion = minorVersion;
+}
+
+
+void FGAPIENTRY glutInitContextFlags( int flags )
+{
+    /* We will make use of this value when creating a new OpenGL context... */
+    fgState.ContextFlags = flags;
+}
+
 /*** END OF FILE ***/