Jason McKesson committed 0b2980a

Tut16: SRGB framebuffer rendering active.

Comments (0)

Files changed (1)

Tut 16 Gamma and Textures/Gamma Landscape.cpp

 bool g_drawGammaProgram = false;
 bool g_bDrawCameraPos = false;
+bool g_useGammaDisplay = false;
 //Called to update the display.
 //You should call glutSwapBuffers after all of your rendering to display what you rendered.
 //If you need continuous updates of the screen, call glutPostRedisplay() at the end of the function.
 	glClearColor(0.75f, 0.75f, 1.0f, 1.0f);
+	if(g_useGammaDisplay)
+	else
 	if(g_pSphere && g_pTerrain)
 		g_drawGammaProgram = !g_drawGammaProgram;
 	case 32:
-		g_drawGammaProgram = !g_drawGammaProgram;
+		g_useGammaDisplay = !g_useGammaDisplay;
 	case 't': g_bDrawCameraPos = !g_bDrawCameraPos; break;
-unsigned int defaults(unsigned int displayMode, int &width, int &height) {return displayMode;}
+unsigned int defaults(unsigned int displayMode, int &width, int &height) {return displayMode | GLUT_SRGB;}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.