diff --git a/lime/graphics/opengl/GL.hx b/lime/graphics/opengl/GL.hx index 85a83a626..4b83bca04 100644 --- a/lime/graphics/opengl/GL.hx +++ b/lime/graphics/opengl/GL.hx @@ -907,7 +907,9 @@ class GL { #if (js && html5) @:dox(hide) @:noCompletion public static inline function clearDepth (depth:Float):Void { + #if !display context.clearDepth (depth); + #end } #end @@ -1207,7 +1209,9 @@ class GL { #if (js && html5) @:dox(hide) @:noCompletion public static inline function depthRange (zNear:Float, zFar:Float):Void { + #if !display context.depthRange (zNear, zFar); + #end } #end @@ -2051,7 +2055,11 @@ class GL { #if (js && html5) @:dox(hide) @:noCompletion public static inline function getVertexAttribOffset (index:Int, pname:Int):DataPointer { + #if !display return context.getVertexAttribOffset (index, pname); + #else + return cast 0; + #end } #end diff --git a/lime/utils/BytePointer.hx b/lime/utils/BytePointer.hx index 108202e1b..6040e7b7e 100644 --- a/lime/utils/BytePointer.hx +++ b/lime/utils/BytePointer.hx @@ -25,7 +25,7 @@ abstract BytePointer(BytePointerData) from BytePointerData to BytePointerData { if (buffer != null) { #if (js && html5) - bytes = Bytes.ofData (buffer); + bytes = Bytes.ofData (cast buffer); #else bytes = buffer; #end @@ -40,7 +40,7 @@ abstract BytePointer(BytePointerData) from BytePointerData to BytePointerData { } else { #if (js && html5) - this.bytes = Bytes.ofData (bufferView.buffer); + this.bytes = Bytes.ofData (cast bufferView.buffer); #else this.bytes = bufferView.buffer; #end