Roi Atalla avatar Roi Atalla committed 67166da

Playing around with values.

Comments (0)

Files changed (4)

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter12/LightManager.java

+package com.ra4king.opengl.arcsynthesis.gl33.chapter12;
+
+import com.ra4king.opengl.util.math.Vector4;
+
+public class LightManager {
+	public final int NUMBER_OF_LIGHTS = 4;
+	public final int NUMBER_OF_POINT_LIGHTS = NUMBER_OF_LIGHTS - 1;
+	
+	private class PerLight {
+		private Vector4 cameraSpaceLightPos;
+		private Vector4 lightIntensity;
+	}
+	
+	private class LightBlock {
+		private Vector4 ambientIntensity;
+		private float lightAttenuation;
+		private float[] padding = new float[3];
+		private PerLight[] lights = new PerLight[NUMBER_OF_LIGHTS];
+	}
+	
+	private class LightBlockHDR {
+		private Vector4 ambientIntensity;
+		private float lightAttenuation;
+		private float maxIntensity;
+		private float[] padding = new float[2];
+		private PerLight[] lights = new PerLight[NUMBER_OF_LIGHTS];
+	}
+	
+	private class LightBlockGamma {
+		private Vector4 ambientIntensity;
+		private float lightAttenuation;
+		private float maxIntensity;
+		private float gamma;
+		private float padding;
+		private PerLight[] lights = new PerLight[NUMBER_OF_LIGHTS];
+	}
+	
+	private class SunlightValue {
+		private float normTime;
+		private Vector4 ambient;
+		private Vector4 sunlightIntensity;
+		private Vector4 backgroundColor;
+	}
+	
+	private class SunlightValueHDR {
+		private float normTime;
+		private Vector4 ambient;
+		private Vector4 sunlightIntensity;
+		private Vector4 backgroundColor;
+		private float maxIntensity;
+	}
+	
+	private enum TimerTypes {
+		TIMER_SUN, TIMER_LIGHTS, TIMER_ALL
+	}
+}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter12/Scene.java

+package com.ra4king.opengl.arcsynthesis.gl33.chapter12;
+
+public class Scene {
+	
+}

src/main/java/com/ra4king/opengl/arcsynthesis/gl33/chapter12/example1/Example12_1.java

+package com.ra4king.opengl.arcsynthesis.gl33.chapter12.example1;
+
+import com.ra4king.opengl.GLProgram;
+
+public class Example12_1 extends GLProgram {
+	public static void main(String[] args) {
+		new Example12_1().run(true);
+	}
+	
+	public Example12_1() {
+		super("Example 12.1", 500, 500, true);
+	}
+	
+	@Override
+	public void init() {
+		
+	}
+	
+	@Override
+	public void render() {
+		
+	}
+}

src/main/java/com/ra4king/opengl/superbible/osb4/chapter3/Example3_14.java

 
 public class Example3_14 extends GLProgram {
 	public static void main(String[] args) {
-		new Example3_14().run(new PixelFormat(8,16,8));
+		new Example3_14().run(new PixelFormat(8,0,1));
 	}
 	
 	private float x, y, size = 50;
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.