Some adjustments for when lime_opengl is not defined
This commit is contained in:
@@ -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
|
||||
@@ -91,9 +91,13 @@ EXTENSIONS, type, version)
|
||||
abstract GLES2Context(GLES3Context) from GLES3Context from GLRenderContext to WebGLContext {
|
||||
|
||||
|
||||
@:from private static function fromGL (gl:Class<GL>):GLES2Context {
|
||||
@:from private static function fromGL (gl:#if lime_opengl Class<GL> #else Dynamic #end):GLES2Context {
|
||||
|
||||
#if lime_opengl
|
||||
return cast GL.context;
|
||||
#else
|
||||
return null;
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -3201,9 +3201,13 @@ abstract GLES3Context(GLRenderContext) from GLRenderContext to GLRenderContext t
|
||||
}
|
||||
|
||||
|
||||
@:from private static function fromGL (gl:Class<GL>):GLES3Context {
|
||||
@:from private static function fromGL (gl:#if lime_opengl Class<GL> #else Dynamic #end):GLES3Context {
|
||||
|
||||
#if lime_opengl
|
||||
return cast GL.context;
|
||||
#else
|
||||
return null;
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -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
|
||||
@@ -3145,9 +3145,13 @@ abstract WebGL2Context(GLRenderContext) from GLRenderContext to GLRenderContext
|
||||
}
|
||||
|
||||
|
||||
@:from private static function fromGL (gl:Class<GL>):WebGL2Context {
|
||||
@:from private static function fromGL (gl:#if lime_opengl Class<GL> #else Dynamic #end):WebGL2Context {
|
||||
|
||||
#if lime_opengl
|
||||
return cast GL.context;
|
||||
#else
|
||||
return null;
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -109,9 +109,13 @@ abstract WebGLContext(WebGL2Context) from GLRenderContext from WebGL2Context {
|
||||
}
|
||||
|
||||
|
||||
@:from private static function fromGL (gl:Class<GL>):WebGLContext {
|
||||
@:from private static function fromGL (gl:#if lime_opengl Class<GL> #else Dynamic #end):WebGLContext {
|
||||
|
||||
#if lime_opengl
|
||||
return cast GL.context;
|
||||
#else
|
||||
return null;
|
||||
#end
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user