Jason McKesson avatar Jason McKesson committed 4bd71f7

Tut16: Oxygen ate my tutorial... :{

Comments (0)

Files changed (6)

Documents/Illumination/Tutorial 13.xml

                 <glossterm>interleaving</glossterm>
                 <glossdef>
                     <para>A way of storing vertex attributes in a buffer object. This involves
-                        entwining the attribute data, so that most or all of a vertex's attributes
-                        are spatially adjacent in the buffer object. This is as opposed to giving
-                        each vertex attribute its own array. Interleaving can lead to higher
-                        rendering performance in vertex transfer limited cases.</para>
+                        entwining the attribute data, so that most or all of each vertex's
+                        attributes are spatially adjacent in the buffer object. This is as opposed
+                        to giving each vertex attribute its own array. Interleaving can lead to
+                        higher rendering performance in vertex transfer limited cases.</para>
                 </glossdef>
             </glossentry>
             <glossentry>

Documents/Texturing/Tutorial 14.xml

             </itemizedlist>
         </section>
         <section>
-            <title>Further Research</title>
-            <para/>
-        </section>
-        <section>
             <title>OpenGL Functions of Note</title>
             <glosslist>
                 <glossentry>

Documents/Texturing/Tutorial 15.xml

                 here.</para>
             <para>Indeed, the repeating checkerboard texture was chosen specifically because it
                 highlights the issues in a very obvious way. A more traditional diffuse color
-                texture typically looks much better with reasonable filtering applied.</para>
+                texture typically looks much better with reasonable filtering applied. Also, there
+                is one issue that we are currently missing that will be applied in the next
+                tutorial.</para>
         </section>
         <section>
             <title>A Matter of EXT</title>

Documents/Texturing/Tutorial 16.xml

         </note>
         <para>To see how this can affect rendering, load up the <phrase role="propername">Gamma
                 Checkers</phrase> tutorial.</para>
+        <para/>
     </section>
     <section>
         <?dbhtml filename="Tut16 Free Gamma Correction.html" ?>
             </listitem>
         </itemizedlist>
         <section>
+            <title>Further Research</title>
+            <para/>
+        </section>
+        <section>
             <title>Further Study</title>
             <para>Try doing these things with the given programs.</para>
             <itemizedlist>

Tut 16 Gamma and Textures/Gamma Landscape.cpp

 #include <string>
 #include <vector>
 #include <stack>
+#include <exception>
 #include <math.h>
 #include <stdio.h>
 #include <sstream>
 //View setup.
 glutil::ViewData g_initialView =
 {
-	glm::vec3(0.0f, 0.0f, 0.0f),
-	glm::fquat(0.924f, 0.384f, 0.0f, 0.0f),
+	glm::vec3(-60.257084f, 10.947238f, 62.636356f),
+	glm::fquat(-0.972817f, -0.099283f, -0.211198f, -0.020028f),
 	30.0f,
 	0.0f
 };
 
 int g_currSampler = 0;
 
-bool g_drawGammaProgram = false;
 bool g_bDrawCameraPos = false;
 
 bool g_useGammaDisplay = true;
 		g_pLightEnv = NULL;
 		glutLeaveMainLoop();
 		return;
-	case 'a':
-		g_drawGammaProgram = !g_drawGammaProgram;
-		break;
 	case 32:
 		g_useGammaDisplay = !g_useGammaDisplay;
 		break;
 	case 't': g_bDrawCameraPos = !g_bDrawCameraPos; break;
 	case 'r':
 		{
-			bool isPaused = g_pLightEnv->IsPaused();
-			float elapsed = g_pLightEnv->GetElapsedTime();
-			delete g_pLightEnv;
+			try
+			{
+				LightEnv *pNewEnv = new LightEnv("LightEnv.xml");
+				bool isPaused = g_pLightEnv->IsPaused();
+				float elapsed = g_pLightEnv->GetElapsedTime();
+				delete g_pLightEnv;
+				g_pLightEnv = pNewEnv;
 
-			g_pLightEnv = new LightEnv("LightEnv.xml");
-			g_pLightEnv->SetPause(isPaused);
-			g_pLightEnv->FastForwardTime(elapsed);
+				g_pLightEnv->SetPause(isPaused);
+				g_pLightEnv->FastForwardTime(elapsed);
 
-			printf("Elapsed: %f\n", elapsed);
+				printf("Elapsed: %f\n", elapsed);
+			}
+			catch(std::runtime_error &e)
+			{
+				printf("Parse error in LightEnv.xml:\n%s\n", e.what());
+				break;
+			}
 		}
 		break;
 	case 'p':

Tut 16 Gamma and Textures/LightEnv.xml

 <?xml version="1.0" encoding="UTF-8"?>
-<lightenv atten="50">
+<lightenv atten="60">
     <sun time="48">
         <key time="0" ambient="1 1 1 1.0" intensity="12 12 12 1.0"
 			background="0.65 0.65 1.0 1.0" max-intensity="15" />
         <key time="20" ambient="1 1 1 1.0" intensity="12 12 12 1.0"
 			background="0.65 0.65 1.0 1.0" max-intensity="15" />
     </sun>
-    <light time="10" intensity="2 2 2 1.0">
-        <key>-100.0 25 0.0</key>
-        <key>100.0 25 0.0</key>
+    <light time="24" intensity="3 3 3 1.0">
+		<key>-40.0 40 -90.0</key>
+		<key>-35.0 30 -75.0</key>
+        <key>-30.0 15 -60.0</key>
+        <key>50.0 5 -30.0</key>
+        <key>30.0 5 20.0</key>
+        <key>0.0 0 30.0</key>
+        <key>-20.0 5 50.0</key>
+        <key>-10.0 15 80.0</key>
+        <key>60.0 10 90.0</key>
+        <key>70.0 10 -40.0</key>
+        <key>40.0 30 -80.0</key>
     </light>
+	<light time="12" intensity="2 1 4 1.0">
+		<key>-80 10 70</key>
+		<key>-80 10 40</key>
+		<key>-76 13 30</key>
+		<key>-70 13 8</key>
+		<key>-70 13 8</key>
+		<key>-77 10 3</key>
+		<key>-85 8 8</key>
+		<key>-85 8 8</key>
+		<key>-90 8 20</key>
+		<key>-90 8 40</key>
+	</light>
 </lightenv>
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 ProjectModifiedEvent.java.
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.