瀏覽代碼

hl gl fixes

Nicolas Cannasse 9 年之前
父節點
當前提交
aa4704958b
共有 3 個文件被更改,包括 4 次插入4 次删除
  1. 2 2
      h3d/impl/GlDriver.hx
  2. 1 1
      hxd/fmt/fbx/HMDOut.hx
  3. 1 1
      hxd/impl/UInt16.hx

+ 2 - 2
h3d/impl/GlDriver.hx

@@ -223,7 +223,7 @@ class GlDriver extends Driver {
 		case Globals:
 		case Globals:
 			if( s.globals != null ) {
 			if( s.globals != null ) {
 				#if hxsdl
 				#if hxsdl
-				gl.uniform4fv(s.globals, buf.globals.toData(), 0, s.shader.globalsSize);
+				gl.uniform4fv(s.globals, @:privateAccess (cast buf.globals.toData() : hl.types.ArrayBase.ArrayF32).bytes, 0, s.shader.globalsSize * 4);
 				#else
 				#else
 				var a = new Float32Array(buf.globals.toData()).subarray(0, s.shader.globalsSize * 4);
 				var a = new Float32Array(buf.globals.toData()).subarray(0, s.shader.globalsSize * 4);
 				gl.uniform4fv(s.globals, a);
 				gl.uniform4fv(s.globals, a);
@@ -232,7 +232,7 @@ class GlDriver extends Driver {
 		case Params:
 		case Params:
 			if( s.params != null ) {
 			if( s.params != null ) {
 				#if hxsdl
 				#if hxsdl
-				gl.uniform4fv(s.params, buf.params.toData(), 0, s.shader.paramsSize);
+				gl.uniform4fv(s.params, @:privateAccess (cast buf.params.toData() : hl.types.ArrayBase.ArrayF32).bytes, 0, s.shader.paramsSize * 4);
 				#else
 				#else
 				var a = new Float32Array(buf.params.toData()).subarray(0, s.shader.paramsSize * 4);
 				var a = new Float32Array(buf.params.toData()).subarray(0, s.shader.paramsSize * 4);
 				gl.uniform4fv(s.params, a);
 				gl.uniform4fv(s.params, a);

+ 1 - 1
hxd/fmt/fbx/HMDOut.hx

@@ -88,7 +88,7 @@ class HMDOut extends BaseLibrary {
 
 
 		g.bounds = new h3d.col.Bounds();
 		g.bounds = new h3d.col.Bounds();
 		var tmpBuf = new haxe.ds.Vector(stride);
 		var tmpBuf = new haxe.ds.Vector(stride);
-		var vertexRemap = [];
+		var vertexRemap = new Array<Int>();
 		var index = geom.getPolygons();
 		var index = geom.getPolygons();
 		var count = 0, matPos = 0, stri = 0;
 		var count = 0, matPos = 0, stri = 0;
 		var lookup = new Map();
 		var lookup = new Map();

+ 1 - 1
hxd/impl/UInt16.hx

@@ -1,3 +1,3 @@
 package hxd.impl;
 package hxd.impl;
 
 
-typedef UInt16 = #if cpp cpp.UInt16 #else Int #end;
+typedef UInt16 = #if cpp cpp.UInt16 #elseif hl hl.types.I16 #else Int #end;