Set the default number of samples per pixel to 4 and actually use the value set
[freeglut] / src / freeglut_init.c
index d602a71..768f89e 100644 (file)
@@ -84,8 +84,11 @@ SFG_State fgState = { { -1, -1, GL_FALSE },  /* Position */
                       NULL,                   /* ProgramName */
                       GL_FALSE,               /* JoysticksInitialised */
                       GL_FALSE,               /* InputDevsInitialised */
-                      0,                      /* AuxiliaryBufferNumber */
-                      0                       /* SampleNumber */
+                      1,                      /* AuxiliaryBufferNumber */
+                      4,                      /* 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 ***/