Commits

Jason McKesson  committed 98ab8e1

Added a single unified premake file for all tutorials.

  • Participants
  • Parent commits e0b9202

Comments (0)

Files changed (12)

File Tut 01 Hello Triangle/premake4.lua

 dofile("../framework/framework.lua")
 
 SetupSolution("Tutorial1")
-SetupProject("Tutorial1", "tut1.cpp")
+dofile("tutorials");

File Tut 01 Hello Triangle/tutorials.lua

+
+SetupProject("Tut 01 Main", "tut1.cpp")

File Tut 02 Playing with Colors/premake4.lua

 dofile("../framework/framework.lua")
 
 SetupSolution("Tutorial2")
-SetupProject("Fragment Position", "FragPosition.cpp",
-	"data/FragPosition.frag", "data/FragPosition.vert")
-	
-SetupProject("Vertex Colors", "VertexColors.cpp",
-	"data/VertexColors.frag", "data/VertexColors.vert")
+dofile("tutorials.lua");

File Tut 02 Playing with Colors/tutorials.lua

+
+SetupProject("Tut 02 Fragment Position", "FragPosition.cpp",
+	"data/FragPosition.frag", "data/FragPosition.vert")
+	
+SetupProject("Tut 02 Vertex Colors", "VertexColors.cpp",
+	"data/VertexColors.frag", "data/VertexColors.vert")

File Tut 03 OpenGLs Moving Triangle/premake4.lua

 dofile("../framework/framework.lua")
 
 SetupSolution("Tutorial3")
-SetupProject("CPU Position Offset", "cpuPositionOffset.cpp")
-SetupProject("Shader Position Offset", "vertPositionOffset.cpp")
-SetupProject("Shader Calc Offset", "vertCalcOffset.cpp")
-SetupProject("Fragment Change Color", "fragChangeColor.cpp")
+dofile("tutorials.lua");

File Tut 03 OpenGLs Moving Triangle/tutorials.lua

+
+SetupProject("Tut 03 CPU Position Offset", "cpuPositionOffset.cpp")
+SetupProject("Tut 03 Shader Position Offset", "vertPositionOffset.cpp")
+SetupProject("Tut 03 Shader Calc Offset", "vertCalcOffset.cpp")
+SetupProject("Tut 03 Fragment Change Color", "fragChangeColor.cpp")

File Tut 04 Objects at Rest/premake4.lua

 dofile("../framework/framework.lua")
 
 SetupSolution("Tutorial4")
-SetupProject("Orthographic Cube", "OrthoCube.cpp",
-	"data/StandardColors.frag", "data/OrthoWithOffset.vert")
-SetupProject("ShaderPerspective", "ShaderPerspective.cpp",
-	"data/StandardColors.frag", "data/ManualPerspective.vert")
-SetupProject("MatrixPerspective", "MatrixPerspective.cpp",
-	"data/StandardColors.frag", "data/MatrixPerspective.vert")
-SetupProject("AspectRatio", "AspectRatio.cpp",
-	"data/StandardColors.frag", "data/MatrixPerspective.vert")
+dofile("tutorials.lua");

File Tut 04 Objects at Rest/tutorials.lua

+
+SetupProject("Tut 04 Orthographic Cube", "OrthoCube.cpp",
+	"data/StandardColors.frag", "data/OrthoWithOffset.vert")
+SetupProject("Tut 04 ShaderPerspective", "ShaderPerspective.cpp",
+	"data/StandardColors.frag", "data/ManualPerspective.vert")
+SetupProject("Tut 04 MatrixPerspective", "MatrixPerspective.cpp",
+	"data/StandardColors.frag", "data/MatrixPerspective.vert")
+SetupProject("Tut 04 AspectRatio", "AspectRatio.cpp",
+	"data/StandardColors.frag", "data/MatrixPerspective.vert")

File Tut 05 Objects in Depth/premake4.lua

 dofile("../framework/framework.lua")
 
 SetupSolution("Tutorial5")
-SetupProject("Overlap No Depth", "OverlapNoDepth.cpp",
-	"data/Standard.frag", "data/Standard.vert")
-SetupProject("Base Vertex with Overlap", "BaseVertexOverlap.cpp",
-	"data/Standard.frag", "data/Standard.vert")
-SetupProject("Depth Buffering", "DepthBuffer.cpp",
-	"data/Standard.frag", "data/Standard.vert")
-SetupProject("Vertex Clipping", "VertexClipping.cpp",
-	"data/Standard.frag", "data/Standard.vert")
-SetupProject("Depth Clamping", "DepthClamping.cpp",
-	"data/Standard.frag", "data/Standard.vert")
+dofile("tutorials.lua");

File Tut 05 Objects in Depth/tutorials.lua

+
+SetupProject("Tut 05 Overlap No Depth", "OverlapNoDepth.cpp",
+	"data/Standard.frag", "data/Standard.vert")
+SetupProject("Tut 05 Base Vertex with Overlap", "BaseVertexOverlap.cpp",
+	"data/Standard.frag", "data/Standard.vert")
+SetupProject("Tut 05 Depth Buffering", "DepthBuffer.cpp",
+	"data/Standard.frag", "data/Standard.vert")
+SetupProject("Tut 05 Vertex Clipping", "VertexClipping.cpp",
+	"data/Standard.frag", "data/Standard.vert")
+SetupProject("Tut 05 Depth Clamping", "DepthClamping.cpp",
+	"data/Standard.frag", "data/Standard.vert")

File Tut 06 Objects in Motion/tutorials.lua

 
-SetupProject("Translation", "Translation.cpp",
+SetupProject("Tut 06 Translation", "Translation.cpp",
 	"data/ColorPassthrough.frag", "data/PosColorLocalTransform.vert")
-SetupProject("Scale", "Scale.cpp",
+SetupProject("Tut 06 Scale", "Scale.cpp",
 	"data/ColorPassthrough.frag", "data/PosColorLocalTransform.vert")
-SetupProject("Rotations", "Rotations.cpp",
+SetupProject("Tut 06 Rotations", "Rotations.cpp",
 	"data/ColorPassthrough.frag", "data/PosColorLocalTransform.vert")

File premake4.lua

+dofile("framework/framework.lua")
+
+SetupSolution("AllTutorials")
+
+local dirList = os.matchdirs("*");
+
+for i, theDir in ipairs(dirList) do
+    local filename = string.format("%s/tutorials.lua", theDir);
+	if(os.isfile(filename)) then
+		dofile(filename)
+	end
+end