+void Main::setup_opengl()
+{
+ glEnable(GL_TEXTURE_2D);
+ glEnable(GL_DEPTH_TEST);
+ //glEnable(GL_CULL_FACE);
+
+ //glEnable(GL_POINT_SMOOTH);
+ //glEnable(GL_LINE_SMOOTH);
+ //glEnable(GL_POLYGON_SMOOTH);
+ //glShadeModel(GL_SMOOTH);
+
+ //glEnable(GL_BLEND);
+ //glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glEnable(GL_ALPHA_TEST);
+ glAlphaFunc(GL_GREATER, 0.0);
+
+ glEnable(GL_MULTISAMPLE);
+
+ glClearColor(1.0, 0.0, 0.0, 1.0);
+
+ //glEnable(GL_LIGHTING);
+ //glEnable(GL_LIGHT0);
+
+ //glEnable(GL_COLOR_MATERIAL);
+ //glColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE);
+
+ float amb[] = {0.1f, 0.1f, 0.1f, 1.0f};
+ float dif[] = {0.6f, 0.6f, 0.6f, 1.0f};
+ //glLightModelfv(GL_LIGHT_MODEL_AMBIENT, light);
+ glLightfv(GL_LIGHT0, GL_AMBIENT, amb);
+ glLightfv(GL_LIGHT0, GL_DIFFUSE, dif);
+
+ float spec[] = {1.0f, 1.0f, 1.0f, 1.0f};
+ glLightfv(GL_LIGHT0, GL_SPECULAR, spec);
+}
+