2
0
ncannasse 8 жил өмнө
parent
commit
3983ecbca5

+ 5 - 1
h3d/impl/DirectXDriver.hx

@@ -1,5 +1,7 @@
 package h3d.impl;
 package h3d.impl;
 
 
+#if hldx
+
 import h3d.impl.Driver;
 import h3d.impl.Driver;
 import dx.Driver;
 import dx.Driver;
 
 
@@ -402,4 +404,6 @@ class DirectXDriver extends h3d.impl.Driver {
 		dx.Driver.drawIndexed(ntriangles * 3, startIndex, 0);
 		dx.Driver.drawIndexed(ntriangles * 3, startIndex, 0);
 	}
 	}
 
 
-}
+}
+
+#end

+ 1 - 0
hxsl/HlslOut.hx

@@ -20,6 +20,7 @@ class HlslOut {
 		m.set(Vec2, "float2");
 		m.set(Vec2, "float2");
 		m.set(Vec3, "float3");
 		m.set(Vec3, "float3");
 		m.set(Vec4, "float4");
 		m.set(Vec4, "float4");
+		m.set(LReflect, "reflect");
 		for( g in m )
 		for( g in m )
 			KWDS.set(g, true);
 			KWDS.set(g, true);
 		m;
 		m;

+ 5 - 5
samples/AdjustColor.hx

@@ -29,15 +29,15 @@ class AdjustColor extends SampleApp {
 			bmps.push(bmp);
 			bmps.push(bmp);
 		}
 		}
 
 
-		addSlider("Hue", -180, 180, function() return hue, function(s) hue = s);
-		addSlider("Saturation", -100, 100, function() return sat, function(s) sat = s);
-		addSlider("Brightness", -100, 100, function() return bright, function(s) bright = s);
-		addSlider("Contrast", -100, 100, function() return contrast, function(s) contrast = s);
+		addSlider("Hue", function() return hue, function(s) hue = s, -180, 180);
+		addSlider("Saturation", function() return sat, function(s) sat = s, -100, 100);
+		addSlider("Brightness", function() return bright, function(s) bright = s, -100, 100);
+		addSlider("Contrast", function() return contrast, function(s) contrast = s, -100, 100);
 	}
 	}
 
 
 	override function update(dt:Float) {
 	override function update(dt:Float) {
 		for( b in bmps )
 		for( b in bmps )
-			b.adjustColor(sat / 100, bright / 100, hue * Math.PI / 180, contrast / 100);
+			b.adjustColor({ saturation : sat / 100, lightness : bright / 100, hue : hue * Math.PI / 180, contrast : contrast / 100 });
 	}
 	}
 
 
 	public static function main() {
 	public static function main() {

+ 1 - 1
samples/Bounds.hx

@@ -33,7 +33,7 @@ class Bounds extends hxd.App {
 		tf.text = "Some quite long rotating text";
 		tf.text = "Some quite long rotating text";
 		tf.x = -5;
 		tf.x = -5;
 		tf.y = 15;
 		tf.y = 15;
-		tf.filter = true;
+		tf.smooth = true;
 	}
 	}
 
 
 	override function update(dt:Float) {
 	override function update(dt:Float) {

+ 2 - 0
samples/Generator.hx

@@ -15,6 +15,8 @@ class Generator {
 				if( f != name ) name = f+"/"+name;
 				if( f != name ) name = f+"/"+name;
 				var pass = false;
 				var pass = false;
 				Sys.println(name);
 				Sys.println(name);
+				if( StringTools.endsWith(name,"_hl") )
+					d = "-lib hlsdl "+d;
 				try {
 				try {
 					if( Sys.command("haxe "+d) == 0 ) pass = true;
 					if( Sys.command("haxe "+d) == 0 ) pass = true;
 				} catch( e : Dynamic ) {
 				} catch( e : Dynamic ) {

+ 0 - 1
samples/templates/__name_hl.hxml

@@ -1,7 +1,6 @@
 -lib heaps
 -lib heaps
 -cp ../..
 -cp ../..
 -hl ::name::.hl
 -hl ::name::.hl
--lib hlsdl
 -main ::main::
 -main ::main::
 -D windowSize=1024x768
 -D windowSize=1024x768
 ::params::
 ::params::

+ 1 - 1
samples/templates/__name_hl.hxproj

@@ -43,7 +43,7 @@
   <hiddenPaths>
   <hiddenPaths>
   </hiddenPaths>
   </hiddenPaths>
   <!-- Executed before build -->
   <!-- Executed before build -->
-  <preBuildCommand>haxe ::name::_hl.hxml</preBuildCommand>
+  <preBuildCommand>haxe -lib hlsdl ::name::_hl.hxml</preBuildCommand>
   <!-- Executed after build -->
   <!-- Executed after build -->
   <postBuildCommand alwaysRun="False" />
   <postBuildCommand alwaysRun="False" />
   <!-- Other project options -->
   <!-- Other project options -->