Jason McKesson avatar Jason McKesson committed 927734f

Builds with GLSDK 0.3.1 now.

Comments (0)

Files changed (47)

Tut 01 Hello Triangle/tut1.cpp

 	{
 	  case 27:
 		  glutLeaveMainLoop();
-		  break;
+		  return;
 	}
 }
 

Tut 02 Playing with Colors/FragPosition.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 02 Playing with Colors/VertexColors.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 03 OpenGLs Moving Triangle/cpuPositionOffset.cpp

 	{
 	  case 27:
 		  glutLeaveMainLoop();
-		  break;
+		  return;
 	}
 }
 

Tut 03 OpenGLs Moving Triangle/fragChangeColor.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 03 OpenGLs Moving Triangle/vertCalcOffset.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 03 OpenGLs Moving Triangle/vertPositionOffset.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 04 Objects at Rest/AspectRatio.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 04 Objects at Rest/MatrixPerspective.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 04 Objects at Rest/OrthoCube.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 04 Objects at Rest/ShaderPerspective.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 05 Objects in Depth/BaseVertexOverlap.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 05 Objects in Depth/DepthBuffer.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 05 Objects in Depth/DepthClamping.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	case 32:
 		if(bDepthClampingActive)
 			glDisable(GL_DEPTH_CLAMP);

Tut 05 Objects in Depth/OverlapNoDepth.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 05 Objects in Depth/VertexClipping.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 06 Objects in Motion/Hierarchy.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	case 'a': g_armature.AdjBase(true); break;
 	case 'd': g_armature.AdjBase(false); break;
 	case 'w': g_armature.AdjUpperArm(false); break;

Tut 06 Objects in Motion/Rotations.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 06 Objects in Motion/Scale.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 06 Objects in Motion/Translation.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	}
 }
 

Tut 07 World in Motion/World Scene.cpp

 	{
 	case 27:
 		delete g_pConeMesh;
+		g_pConeMesh = NULL;
 		delete g_pCylinderMesh;
+		g_pCylinderMesh = NULL;
 		delete g_pCubeTintMesh;
+		g_pCubeTintMesh = NULL;
 		delete g_pCubeColorMesh;
+		g_pCubeColorMesh = NULL;
+		delete g_pPlaneMesh;
+		g_pPlaneMesh = NULL;
 		glutLeaveMainLoop();
-		break;
+		return;
 	case 'w': g_camTarget.z -= 4.0f; break;
 	case 's': g_camTarget.z += 4.0f; break;
 	case 'd': g_camTarget.x += 4.0f; break;

Tut 07 World in Motion/World With UBO.cpp

 		delete g_pPlaneMesh;
 		g_pPlaneMesh = NULL;
 		glutLeaveMainLoop();
-		break;
+		return;
 	case 'w': g_camTarget.z -= 4.0f; break;
 	case 's': g_camTarget.z += 4.0f; break;
 	case 'd': g_camTarget.x += 4.0f; break;

Tut 08 Getting Oriented/CameraRelative.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	case 'w': OffsetOrientation(glm::vec3(1.0f, 0.0f, 0.0f), SMALL_ANGLE_INCREMENT); break;
 	case 's': OffsetOrientation(glm::vec3(1.0f, 0.0f, 0.0f), -SMALL_ANGLE_INCREMENT); break;
 

Tut 08 Getting Oriented/GimbalLock.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	case 'w': g_angles.fAngleX += SMALL_ANGLE_INCREMENT; break;
 	case 's': g_angles.fAngleX -= SMALL_ANGLE_INCREMENT; break;
 

Tut 08 Getting Oriented/Interpolation.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	case 32:
 		{
 			bool bSlerp = g_orient.ToggleSlerp();

Tut 08 Getting Oriented/QuaternionYPR.cpp

 	{
 	case 27:
 		glutLeaveMainLoop();
-		break;
+		return;
 	case 'w': OffsetOrientation(glm::vec3(1.0f, 0.0f, 0.0f), SMALL_ANGLE_INCREMENT); break;
 	case 's': OffsetOrientation(glm::vec3(1.0f, 0.0f, 0.0f), -SMALL_ANGLE_INCREMENT); break;
 

Tut 09 Lights on/Ambient Lighting.cpp

 		delete g_pPlaneMesh;
 		delete g_pCylinderMesh;
 		glutLeaveMainLoop();
-		break;
+		return;
 
 	case 32:
 		g_bDrawColoredCyl = !g_bDrawColoredCyl;

Tut 09 Lights on/Basic Lighting.cpp

 		delete g_pPlaneMesh;
 		delete g_pCylinderMesh;
 		glutLeaveMainLoop();
-		break;
+		return;
 		
 	case 32:
 		g_bDrawColoredCyl = !g_bDrawColoredCyl;

Tut 09 Lights on/Scale and Lighting.cpp

 		delete g_pPlaneMesh;
 		delete g_pCylinderMesh;
 		glutLeaveMainLoop();
-		break;
+		return;
 
 	case 32:
 		g_bScaleCyl = !g_bScaleCyl;

Tut 10 Plane Lights/Fragment Attenuation.cpp

 		delete g_pCylinderMesh;
 		delete g_pCubeMesh;
 		glutLeaveMainLoop();
-		break;
+		return;
 		
 	case 32:
 		g_bDrawColoredCyl = !g_bDrawColoredCyl;

Tut 10 Plane Lights/Fragment Point Lighting.cpp

 		delete g_pCylinderMesh;
 		delete g_pCubeMesh;
 		glutLeaveMainLoop();
-		break;
+		return;
 		
 	case 32:
 		g_bDrawColoredCyl = !g_bDrawColoredCyl;

Tut 10 Plane Lights/Vertex Point Lighting.cpp

 		delete g_pCylinderMesh;
 		delete g_pCubeMesh;
 		glutLeaveMainLoop();
-		break;
+		return;
 		
 	case 32:
 		g_bDrawColoredCyl = !g_bDrawColoredCyl;

Tut 11 Shinies/Blinn vs Phong Lighting.cpp

 		delete g_pCylinderMesh;
 		delete g_pCubeMesh;
 		glutLeaveMainLoop();
-		break;
+		return;
 
 	case 32:
 		g_bDrawColoredCyl = !g_bDrawColoredCyl;

Tut 11 Shinies/Gaussian Specular Lighting.cpp

 		delete g_pCylinderMesh;
 		delete g_pCubeMesh;
 		glutLeaveMainLoop();
-		break;
+		return;
 		
 	case 32:
 		g_bDrawColoredCyl = !g_bDrawColoredCyl;

Tut 11 Shinies/Phong Lighting.cpp

 		delete g_pCylinderMesh;
 		delete g_pCubeMesh;
 		glutLeaveMainLoop();
-		break;
+		return;
 		
 	case 32:
 		g_bDrawColoredCyl = !g_bDrawColoredCyl;

Tut 12 Dynamic Range/Gamma Correction.cpp

 		delete g_pScene;
 		g_pScene = NULL;
 		glutLeaveMainLoop();
-		break;
+		return;
 		
 	case 'p': g_lights.TogglePause(g_eTimerMode); break;
 	case '-': g_lights.RewindTime(g_eTimerMode, 1.0f); break;

Tut 12 Dynamic Range/HDR Lighting.cpp

 		delete g_pScene;
 		g_pScene = NULL;
 		glutLeaveMainLoop();
-		break;
+		return;
 		
 	case 'p': g_lights.TogglePause(g_eTimerMode); break;
 	case '-': g_lights.RewindTime(g_eTimerMode, 1.0f); break;

Tut 12 Dynamic Range/Scene Lighting.cpp

 		delete g_pScene;
 		g_pScene = NULL;
 		glutLeaveMainLoop();
-		break;
+		return;
 		
 	case 'p': g_lights.TogglePause(g_eTimerMode); break;
 	case '-': g_lights.RewindTime(g_eTimerMode, 1.0f); break;

Tut 13 Impostors/BasicImpostor.cpp

 		g_pPlaneMesh = NULL;
 		g_pSphereMesh = NULL;
 		glutLeaveMainLoop();
-		break;
+		return;
 
 	case 'p': g_sphereTimer.TogglePause(); break;
 	case '-': g_sphereTimer.Rewind(0.5f); break;

Tut 13 Impostors/GeomImpostor.cpp

 		g_pPlaneMesh = NULL;
 		g_pSphereMesh = NULL;
 		glutLeaveMainLoop();
-		break;
+		return;
 
 	case 'p': g_sphereTimer.TogglePause(); break;
 	case '-': g_sphereTimer.Rewind(0.5f); break;

Tut 14 Textures Are Not Pictures/Basic Texture.cpp

 		g_pObjectMesh = NULL;
 		g_pCubeMesh = NULL;
 		glutLeaveMainLoop();
-		break;
+		return;
 
 	case 'p': g_lightTimer.TogglePause(); break;
 	case '-': g_lightTimer.Rewind(0.5f); break;

Tut 14 Textures Are Not Pictures/Material Texture.cpp

 	    filename.append("main.dds");
 	    
 		pImageSet.reset(glimg::loaders::dds::LoadFromFile(filename.c_str()));
-		std::auto_ptr<glimg::SingleImage> pImage(pImageSet->GetImage(0, 0, 0));
+		glimg::SingleImage image = pImageSet->GetImage(0, 0, 0);
 
-		glimg::Dimensions dims = pImage->GetDimensions();
+		glimg::Dimensions dims = image.GetDimensions();
 
 		glGenTextures(1, &g_shineTexture);
 		glBindTexture(GL_TEXTURE_2D, g_shineTexture);
 		glTexImage2D(GL_TEXTURE_2D, 0, GL_R8, dims.width, dims.height, 0,
-			GL_RED, GL_UNSIGNED_BYTE, pImage->GetImageData());
+			GL_RED, GL_UNSIGNED_BYTE, image.GetImageData());
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
 		glBindTexture(GL_TEXTURE_2D, 0);
 		g_pCubeMesh = NULL;
 		g_pPlaneMesh = NULL;
 		glutLeaveMainLoop();
-		break;
+		return;
 
 	case 'p': g_lightTimer.TogglePause(); break;
 	case '-': g_lightTimer.Rewind(0.5f); break;

Tut 14 Textures Are Not Pictures/Perspective Interpolation.cpp

 		delete g_pRealHallway;
 		delete g_pFauxHallway;
 		glutLeaveMainLoop();
-		break;
+		return;
 
 	case 's':
 	case 'S':

Tut 15 Many Images/Many Images.cpp

 
 		for(int mipmapLevel = 0; mipmapLevel < pImageSet->GetMipmapCount(); mipmapLevel++)
 		{
-			std::auto_ptr<glimg::SingleImage> pImage(pImageSet->GetImage(mipmapLevel, 0, 0));
-			glimg::Dimensions dims = pImage->GetDimensions();
+			glimg::SingleImage image = pImageSet->GetImage(mipmapLevel, 0, 0);
+			glimg::Dimensions dims = image.GetDimensions();
 
 			glTexImage2D(GL_TEXTURE_2D, mipmapLevel, GL_RGB8, dims.width, dims.height, 0,
-				GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, pImage->GetImageData());
+				GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, image.GetImageData());
 		}
 
 		glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_BASE_LEVEL, 0);
 		g_pPlane = NULL;
 		g_pCorridor = NULL;
 		glutLeaveMainLoop();
-		break;
+		return;
 	case 32:
 		g_useMipmapTexture = !g_useMipmapTexture;
 		break;

framework/framework.cpp

 #include <sstream>
 #include <string.h>
 #include <glload/gl_3_3.h>
-#include <glload/gll.h>
+#include <glload/gll.hpp>
 #include <GL/freeglut.h>
 #include "framework.h"
 #include "directories.h"
 	glutReshapeFunc(reshape);
 	glutKeyboardFunc(keyboard);
 	glutMainLoop();
+	printf("here!\n");
 	return 0;
 }

framework/framework.lua

+
+dofile("../glsdk/links.lua")
 
 local myPath = os.getcwd();
 
 		targetdir "../framework/lib"
 		objdir "../framework/lib"
 
-		includedirs {"../freeglut-2.6.0/include", "../glload/include",
-			"../glimg/include", "../glm-0.9.2.3", "../tinyxml",
-			"../framework"}
+		includedirs {"../tinyxml", "../framework"}
+		
+		UseLibs {"glload", "glimage", "glm", "freeglut"}
 		
 		configuration "Debug"
 			defines {"DEBUG", "_DEBUG"}
 		
 		files {...}
 
-		includedirs {"../freeglut-2.6.0/include", "../glload/include",
-			"../glimg/include", "../glm-0.9.2.3", "../tinyxml"}
+		UseLibs {"glload", "glimage", "glm", "freeglut"}
+
+		includedirs {"../tinyxml"}
 			
 		links "framework"
 
 		configuration "Debug"
 			defines {"DEBUG", "_DEBUG"}
 			flags "Symbols"
-			libdirs {"../glload/lib", "../glimg/lib", "../tinyxml/lib"}
-			links "glloadD"
-			links "glimgD"
+			libdirs {"../tinyxml/lib"}
 			links "tinyxml_pmD"
 			targetname(projName .. "D")
 		
 		configuration "Release"
 			defines {"RELEASE", "NDEBUG"};
 			flags {"OptimizeSpeed", "NoFramePointer", "ExtraWarnings", "NoEditAndContinue"};
-			libdirs {"../glload/lib", "../glimg/lib", "../tinyxml/lib"}
-			links "glload"
-			links "glimg"
+			libdirs {"../tinyxml/lib"}
 			links "tinyxml_pm"
 			targetname(projName)
 
+		configuration {"windows"}
+			links {"glu32", "opengl32", "gdi32", "winmm", "user32"}
 
-        configuration {"Debug", "windows"}
-			links "../freeglut-2.6.0/VisualStudio2008Static/debug/freeglut_static"
-        configuration {"Release", "windows"}
-			links "../freeglut-2.6.0/VisualStudio2008Static/release/freeglut_static"
-        configuration {"linux"}
-            libdirs {"../freeglut-2.6.0/src/.libs"}
-			links "glut"
+	    configuration "linux"
+	        links {"GL", "GLU"}
+
 end
 

get_externals.lua

 local externals =
 {
 	{
-		"OpenGL SDK 0.3.0",		--The name of the component.
+		"OpenGL SDK 0.3.1",		--The name of the component.
 		"glsdk",					--The output directory to copy the component's data.
 		"glsdk.7z",				--The filename that will be created in the download director.
-		"glsdk_0.3.0",			--If the zip file has a base directory, then name it here. If it doesn't, then just use ""
-		[==[http://downloads.sourceforge.net/project/glsdk/GLSDK%200.3.0/glsdk_0.3.0.7z?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fglsdk%2Ffiles%2FGLSDK%25200.3.0%2F&ts=1317700021&use_mirror=cdnetworks-us-2]==]
+		"glsdk_0.3.1",			--If the zip file has a base directory, then name it here. If it doesn't, then just use ""
+		[==[https://downloads.sourceforge.net/project/glsdk/GLSDK%200.3.0/glsdk_0.3.1.7z?r=&ts=1317702283&use_mirror=master]==],
+		
+		--Files/ to delete, relative to the output directory of this component.
+		{
+			"docs",
+			"examples",
+			"glfw",
+			"freeglut/progs",
+			"freeglut/doc",
+			"freeglut/VisualStudio2008",
+			"freeglut/VisualStudio2008Static",
+			"glm/bench",
+			"glm/doc",
+			"glm/test",
+			"glm/util",
+		}
 	},
 }
 
 		pathSrc = pathSrc / ext[4]
 	end
 
+	--Copy to final directory.
 	local pathOut = ufs.path(".\\" .. ext[2]);
 	ufs.create_directory(pathOut);
 	RecursiveCopy(pathSrc, pathOut);
+	
+	--Remove extraneous files/directories
+	if(ext[6]) then
+		for i, filename in ipairs(ext[6]) do
+			local pathFile = pathOut / filename;
+			print("deleting:", pathFile);
+			ufs.remove_all(pathFile);
+		end
+	end
 end
 
 ufs.remove_all(ufs.path(decompressDir));
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.