diff --git a/lime/graphics/opengl/GLBuffer.hx b/lime/graphics/opengl/GLBuffer.hx index a8ee12458..9291a250e 100644 --- a/lime/graphics/opengl/GLBuffer.hx +++ b/lime/graphics/opengl/GLBuffer.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) import lime.graphics.opengl.GL; @@ -21,4 +21,7 @@ abstract GLBuffer(GLObject) from GLObject to GLObject { #else typedef GLBuffer = js.html.webgl.Buffer; +#end +#else +typedef GLBuffer = Dynamic; #end \ No newline at end of file diff --git a/lime/graphics/opengl/GLES2Context.hx b/lime/graphics/opengl/GLES2Context.hx index e2358cd61..bb0949603 100644 --- a/lime/graphics/opengl/GLES2Context.hx +++ b/lime/graphics/opengl/GLES2Context.hx @@ -91,9 +91,13 @@ EXTENSIONS, type, version) abstract GLES2Context(GLES3Context) from GLES3Context from GLRenderContext to WebGLContext { - @:from private static function fromGL (gl:Class):GLES2Context { + @:from private static function fromGL (gl:#if lime_opengl Class #else Dynamic #end):GLES2Context { + #if lime_opengl return cast GL.context; + #else + return null; + #end } diff --git a/lime/graphics/opengl/GLES3Context.hx b/lime/graphics/opengl/GLES3Context.hx index dcba37d99..e69b3e7a3 100644 --- a/lime/graphics/opengl/GLES3Context.hx +++ b/lime/graphics/opengl/GLES3Context.hx @@ -3201,9 +3201,13 @@ abstract GLES3Context(GLRenderContext) from GLRenderContext to GLRenderContext t } - @:from private static function fromGL (gl:Class):GLES3Context { + @:from private static function fromGL (gl:#if lime_opengl Class #else Dynamic #end):GLES3Context { + #if lime_opengl return cast GL.context; + #else + return null; + #end } diff --git a/lime/graphics/opengl/GLFramebuffer.hx b/lime/graphics/opengl/GLFramebuffer.hx index 9036ea1e7..12bc3f7cf 100644 --- a/lime/graphics/opengl/GLFramebuffer.hx +++ b/lime/graphics/opengl/GLFramebuffer.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) import lime.graphics.opengl.GL; @@ -21,4 +21,7 @@ abstract GLFramebuffer(GLObject) from GLObject to GLObject { #else typedef GLFramebuffer = js.html.webgl.Framebuffer; +#end +#else +typedef GLFramebuffer = Dynamic; #end \ No newline at end of file diff --git a/lime/graphics/opengl/GLProgram.hx b/lime/graphics/opengl/GLProgram.hx index 2758dd678..4c1ed5f53 100644 --- a/lime/graphics/opengl/GLProgram.hx +++ b/lime/graphics/opengl/GLProgram.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) import lime.graphics.opengl.GL; @@ -21,4 +21,7 @@ abstract GLProgram(GLObject) from GLObject to GLObject { #else typedef GLProgram = js.html.webgl.Program; +#end +#else +typedef GLProgram = Dynamic; #end \ No newline at end of file diff --git a/lime/graphics/opengl/GLQuery.hx b/lime/graphics/opengl/GLQuery.hx index 3fa5afd49..ce183988c 100644 --- a/lime/graphics/opengl/GLQuery.hx +++ b/lime/graphics/opengl/GLQuery.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) import lime.graphics.opengl.GL; @@ -22,4 +22,7 @@ abstract GLQuery(GLObject) from GLObject to GLObject { #else @:native("WebGLQuery") extern class GLQuery {} +#end +#else +typedef GLQuery = Dynamic; #end \ No newline at end of file diff --git a/lime/graphics/opengl/GLRenderbuffer.hx b/lime/graphics/opengl/GLRenderbuffer.hx index 64889646e..836ab6a65 100644 --- a/lime/graphics/opengl/GLRenderbuffer.hx +++ b/lime/graphics/opengl/GLRenderbuffer.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) import lime.graphics.opengl.GL; @@ -21,4 +21,7 @@ abstract GLRenderbuffer(GLObject) from GLObject to GLObject { #else typedef GLRenderbuffer = js.html.webgl.Renderbuffer; +#end +#else +typedef GLRenderbuffer = Dynamic; #end \ No newline at end of file diff --git a/lime/graphics/opengl/GLSampler.hx b/lime/graphics/opengl/GLSampler.hx index f881f6a2a..3e0712159 100644 --- a/lime/graphics/opengl/GLSampler.hx +++ b/lime/graphics/opengl/GLSampler.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) import lime.graphics.opengl.GL; @@ -22,4 +22,7 @@ abstract GLSampler(GLObject) from GLObject to GLObject { #else @:native("WebGLSampler") extern class GLSampler {} +#end +#else +typedef GLSampler = Dynamic; #end \ No newline at end of file diff --git a/lime/graphics/opengl/GLShader.hx b/lime/graphics/opengl/GLShader.hx index af50e04eb..4cab12562 100644 --- a/lime/graphics/opengl/GLShader.hx +++ b/lime/graphics/opengl/GLShader.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) import lime.graphics.opengl.GL; @@ -21,4 +21,7 @@ abstract GLShader(GLObject) from GLObject to GLObject { #else typedef GLShader = js.html.webgl.Shader; +#end +#else +typedef GLShader = Dynamic; #end \ No newline at end of file diff --git a/lime/graphics/opengl/GLSync.hx b/lime/graphics/opengl/GLSync.hx index 4ea0ea46b..bdfc91fdb 100644 --- a/lime/graphics/opengl/GLSync.hx +++ b/lime/graphics/opengl/GLSync.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) import lime.graphics.opengl.GL; @@ -22,4 +22,7 @@ abstract GLSync(GLObject) from GLObject to GLObject { #else @:native("WebGLSync") extern class GLSync {} +#end +#else +typedef GLSync = Dynamic; #end \ No newline at end of file diff --git a/lime/graphics/opengl/GLTexture.hx b/lime/graphics/opengl/GLTexture.hx index 8adc1f464..facf5e1a9 100644 --- a/lime/graphics/opengl/GLTexture.hx +++ b/lime/graphics/opengl/GLTexture.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) import lime.graphics.opengl.GL; @@ -21,4 +21,7 @@ abstract GLTexture(GLObject) from GLObject to GLObject { #else typedef GLTexture = js.html.webgl.Texture; +#end +#else +typedef GLTexture = Dynamic; #end \ No newline at end of file diff --git a/lime/graphics/opengl/GLTransformFeedback.hx b/lime/graphics/opengl/GLTransformFeedback.hx index c9b7257d5..b8c855600 100644 --- a/lime/graphics/opengl/GLTransformFeedback.hx +++ b/lime/graphics/opengl/GLTransformFeedback.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) import lime.graphics.opengl.GL; @@ -22,4 +22,7 @@ abstract GLTransformFeedback(GLObject) from GLObject to GLObject { #else @:native("WebGLTransformFeedback") extern class GLTransformFeedback {} +#end +#else +typedef GLTransformFeedback = Dynamic; #end \ No newline at end of file diff --git a/lime/graphics/opengl/GLVertexArrayObject.hx b/lime/graphics/opengl/GLVertexArrayObject.hx index d5978c32b..5efe35973 100644 --- a/lime/graphics/opengl/GLVertexArrayObject.hx +++ b/lime/graphics/opengl/GLVertexArrayObject.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) import lime.graphics.opengl.GL; @@ -22,4 +22,7 @@ abstract GLVertexArrayObject(GLObject) from GLObject to GLObject { #else @:native("WebGLVertexArrayObject") extern class GLVertexArrayObject {} +#end +#else +typedef GLVertexArrayObject = Dynamic; #end \ No newline at end of file diff --git a/lime/graphics/opengl/WebGL2Context.hx b/lime/graphics/opengl/WebGL2Context.hx index b5b29c9f7..f00891a27 100644 --- a/lime/graphics/opengl/WebGL2Context.hx +++ b/lime/graphics/opengl/WebGL2Context.hx @@ -3145,9 +3145,13 @@ abstract WebGL2Context(GLRenderContext) from GLRenderContext to GLRenderContext } - @:from private static function fromGL (gl:Class):WebGL2Context { + @:from private static function fromGL (gl:#if lime_opengl Class #else Dynamic #end):WebGL2Context { + #if lime_opengl return cast GL.context; + #else + return null; + #end } diff --git a/lime/graphics/opengl/WebGLContext.hx b/lime/graphics/opengl/WebGLContext.hx index 0d07295b4..b82c8fe27 100644 --- a/lime/graphics/opengl/WebGLContext.hx +++ b/lime/graphics/opengl/WebGLContext.hx @@ -109,9 +109,13 @@ abstract WebGLContext(WebGL2Context) from GLRenderContext from WebGL2Context { } - @:from private static function fromGL (gl:Class):WebGLContext { + @:from private static function fromGL (gl:#if lime_opengl Class #else Dynamic #end):WebGLContext { + #if lime_opengl return cast GL.context; + #else + return null; + #end }