diff --git a/docs/api/build.hxml b/docs/api/build.hxml index 031d1bdf7..00776c23a 100644 --- a/docs/api/build.hxml +++ b/docs/api/build.hxml @@ -1,146 +1,16 @@ -# Generate platform-specific XML for documentation output - --xml xml/Flash.xml --swf obj/docs --swf-version 17.0 --D display --D doc_gen --D lime-doc-gen --D lime_opengl -ImportAll --lib lime ---no-output - +hxml/flash.hxml --next - --xml xml/Windows.xml --cpp obj/docs --D display --D native --D lime-cffi --D windows --D doc_gen --D lime-doc-gen -ImportAll --lib lime ---no-output - +hxml/windows.hxml --next - --xml xml/Mac.xml --cpp obj/docs --D display --D native --D lime-cffi --D mac --D doc_gen --D lime-doc-gen -ImportAll --lib lime ---no-output - +hxml/mac.hxml --next - --xml xml/Linux.xml --cpp obj/docs --D display --D native --D lime-cffi --D linux --D doc_gen --D lime-doc-gen -ImportAll --lib lime ---no-output - -# --next - -# -xml xml/Neko.xml -# -neko obj/docs -# -D display -# -D native -# -D lime-cffi -# -D doc_gen -# ImportAll -# -lib lime -# --no-output - +hxml/linux.hxml --next - --xml xml/iOS.xml --cpp obj/docs --D display --D native --D lime-cffi --D ios --D doc_gen --D lime-doc-gen -ImportAll --lib lime ---no-output - +hxml/ios.hxml --next - --xml xml/Android.xml --cpp obj/docs --D display --D native --D lime-cffi --D android --D doc_gen --D lime-doc-gen -ImportAll --lib lime ---no-output - -#--next -# -#-xml xml/BlackBerry.xml -#-cpp obj/docs -#-D display -#-D native -#-D lime-cffi -#-D blackberry -#ImportAll -#-lib lime -#--no-output -# -#--next -# -#-xml xml/Tizen.xml -#-cpp obj/docs -#-D display -#-D native -#-D lime-cffi -#-D tizen -#ImportAll -#-lib lime -#--no-output -# -#--next -# -#-xml xml/Firefox OS.xml -#-cpp obj/docs -#-D display -#-D html5 -#-D firefoxos -#ImportAll -#-lib lime -#--no-output -# +hxml/android.hxml --next - --xml xml/HTML5.xml --js obj/docs --D display --D html5 --D doc_gen --D lime-doc-gen --D lime_opengl -ImportAll --lib lime ---no-output - +hxml/html5.hxml --next -cmd haxelib run dox -i xml -in lime --title "Lime API Reference" -D website "http://lime.software" -D logo "/images/logo.png" -D textColor 0x777777 -theme ../../assets/docs-theme --toplevel-package lime diff --git a/docs/api/hxml/android.hxml b/docs/api/hxml/android.hxml new file mode 100644 index 000000000..4fc70d048 --- /dev/null +++ b/docs/api/hxml/android.hxml @@ -0,0 +1,11 @@ +-xml xml/Android.xml +-cpp obj/docs +-D display +-D native +-D lime-cffi +-D android +-D doc_gen +-D lime-doc-gen +ImportAll +-lib lime +--no-output \ No newline at end of file diff --git a/docs/api/hxml/flash.hxml b/docs/api/hxml/flash.hxml new file mode 100644 index 000000000..764c4e0aa --- /dev/null +++ b/docs/api/hxml/flash.hxml @@ -0,0 +1,9 @@ +-xml xml/Flash.xml +-swf obj/docs +-swf-version 17.0 +-D display +-D doc_gen +-D lime-doc-gen +ImportAll +-lib lime +--no-output \ No newline at end of file diff --git a/docs/api/hxml/html5.hxml b/docs/api/hxml/html5.hxml new file mode 100644 index 000000000..dd261eb80 --- /dev/null +++ b/docs/api/hxml/html5.hxml @@ -0,0 +1,9 @@ +-xml xml/HTML5.xml +-js obj/docs +-D display +-D html5 +-D doc_gen +-D lime-doc-gen +ImportAll +-lib lime +--no-output \ No newline at end of file diff --git a/docs/api/hxml/ios.hxml b/docs/api/hxml/ios.hxml new file mode 100644 index 000000000..52c12d1a9 --- /dev/null +++ b/docs/api/hxml/ios.hxml @@ -0,0 +1,11 @@ +-xml xml/iOS.xml +-cpp obj/docs +-D display +-D native +-D lime-cffi +-D ios +-D doc_gen +-D lime-doc-gen +ImportAll +-lib lime +--no-output \ No newline at end of file diff --git a/docs/api/hxml/linux.hxml b/docs/api/hxml/linux.hxml new file mode 100644 index 000000000..8e1705df2 --- /dev/null +++ b/docs/api/hxml/linux.hxml @@ -0,0 +1,11 @@ +-xml xml/Linux.xml +-cpp obj/docs +-D display +-D native +-D lime-cffi +-D linux +-D doc_gen +-D lime-doc-gen +ImportAll +-lib lime +--no-output \ No newline at end of file diff --git a/docs/api/hxml/mac.hxml b/docs/api/hxml/mac.hxml new file mode 100644 index 000000000..54c401cd5 --- /dev/null +++ b/docs/api/hxml/mac.hxml @@ -0,0 +1,11 @@ +-xml xml/Mac.xml +-cpp obj/docs +-D display +-D native +-D lime-cffi +-D mac +-D doc_gen +-D lime-doc-gen +ImportAll +-lib lime +--no-output \ No newline at end of file diff --git a/docs/api/hxml/windows.hxml b/docs/api/hxml/windows.hxml new file mode 100644 index 000000000..fe7620ef9 --- /dev/null +++ b/docs/api/hxml/windows.hxml @@ -0,0 +1,11 @@ +-xml xml/Windows.xml +-cpp obj/docs +-D display +-D native +-D lime-cffi +-D windows +-D doc_gen +-D lime-doc-gen +ImportAll +-lib lime +--no-output \ No newline at end of file diff --git a/src/lime/_internal/backend/native/NativeWindow.hx b/src/lime/_internal/backend/native/NativeWindow.hx index ce161a777..0542d438e 100644 --- a/src/lime/_internal/backend/native/NativeWindow.hx +++ b/src/lime/_internal/backend/native/NativeWindow.hx @@ -145,7 +145,7 @@ class NativeWindow { useHardware = true; - #if !mobile + #if lime_opengl context.gl = gl; #end @@ -376,9 +376,9 @@ class NativeWindow { switch (parent.context.type) { - case OPENGL: + case OPENGL, OPENGLES, WEBGL: - var gl = parent.context.gl; + var gl = parent.context.webgl; var windowWidth = Std.int (parent.__width * parent.__scale); var windowHeight = Std.int (parent.__height * parent.__scale); diff --git a/src/lime/_internal/macros/DefineMacro.hx b/src/lime/_internal/macros/DefineMacro.hx index 56f6650d2..754e78e6c 100644 --- a/src/lime/_internal/macros/DefineMacro.hx +++ b/src/lime/_internal/macros/DefineMacro.hx @@ -31,11 +31,14 @@ class DefineMacro { } else if (Context.defined ("js")) { - if (!Context.defined ("nodejs") && !Context.defined ("display")) { + if (!Context.defined ("nodejs")) { Compiler.define ("html5"); Compiler.define ("web"); - Compiler.define ("lime-opengl"); + Compiler.define ("lime-canvas"); + Compiler.define ("lime-dom"); + Compiler.define ("lime-howlerjs"); + Compiler.define ("lime-webgl"); } @@ -43,12 +46,31 @@ class DefineMacro { Compiler.define ("native"); + if (Context.defined ("ios") || Context.defined ("android") || Context.defined ("tizen")) { + + Compiler.define ("mobile"); + if (!Context.defined ("nocffi")) Compiler.define ("lime-opengles"); + + } else if (Context.defined ("emscripten")) { + + Compiler.define ("web"); + if (!Context.defined ("nocffi")) Compiler.define ("lime-opengles"); + + } else { + + Compiler.define ("desktop"); + if (!Context.defined ("nocffi")) Compiler.define ("lime-opengl"); + + } + if (!Context.defined ("nocffi")) { Compiler.define ("lime-cffi"); + + Compiler.define ("lime-openal"); + Compiler.define ("lime-cairo"); Compiler.define ("lime-curl"); Compiler.define ("lime-harfbuzz"); - Compiler.define ("lime-opengl"); Compiler.define ("lime-vorbis"); } diff --git a/src/lime/app/Future.hx b/src/lime/app/Future.hx index 9e576a027..22b1ed40f 100644 --- a/src/lime/app/Future.hx +++ b/src/lime/app/Future.hx @@ -5,6 +5,39 @@ import lime.system.System; import lime.system.ThreadPool; import lime.utils.Log; + +/** + `Future` is an implementation of Futures and Promises, with the exception that + in addition to "success" and "failure" states (represented as "complete" and "error"), + Lime `Future` introduces "progress" feedback as well to increase the value of + `Future` values. + + ``` + var future = Image.loadFromFile ("image.png"); + future.onComplete (function (image) { trace ("Image loaded"); }); + future.onProgress (function (loaded, total) { trace ("Loading: " + loaded + ", " + total); }); + future.onError (function (error) { trace (error); }); + + Image.loadFromFile ("image.png").then (function (image) { + + return Future.withValue (image.width); + + }).onComplete (function (width) { trace (width); }) + ``` + + `Future` values can be chained together for asynchronous processing of values. + + If an error occurs earlier in the chain, the error is propagated to all `onError` callbacks. + + `Future` will call `onComplete` callbacks, even if completion occurred before registering the + callback. This resolves race conditions, so even functions that return immediately can return + values using `Future`. + + `Future` values are meant to be immutable, if you wish to update a `Future`, you should create one + using a `Promise`, and use the `Promise` interface to influence the error, complete or progress state + of a `Future`. +**/ + #if !lime_debug @:fileXml('tags="haxe,release"') @:noDebug @@ -16,9 +49,24 @@ import lime.utils.Log; /*@:generic*/ class Future { + /** + If the `Future` has finished with an error state, the `error` value + **/ public var error (default, null):Dynamic; + + /** + Whether the `Future` finished with a completion state + **/ public var isComplete (default, null):Bool; + + /** + Whether the `Future` finished with an error state + **/ public var isError (default, null):Bool; + + /** + If the `Future` has finished with a completion state, the completion `value` + **/ public var value (default, null):T; @:noCompletion private var __completeListeners:ArrayVoid>; @@ -26,6 +74,11 @@ import lime.utils.Log; @:noCompletion private var __progressListeners:ArrayInt->Void>; + /** + Create a new `Future` instance + @param work (Optional) A function to execute + @param async (Optional) If a function is specified, whether to execute it asynchronously where supported + **/ public function new (work:Void->T = null, async:Bool = false) { if (work != null) { @@ -58,6 +111,9 @@ import lime.utils.Log; } + /** + Create a new `Future` instance based on complete and (optionally) error and/or progress `Event` instances + **/ public static function ofEvents (onComplete:EventVoid>, onError:EventVoid> = null, onProgress:EventInt->Void> = null):Future { var promise = new Promise (); @@ -71,6 +127,13 @@ import lime.utils.Log; } + /** + Register a listener for when the `Future` completes. + + If the `Future` has already completed, this is called immediately with the result + @param listener A callback method to receive the result value + @return The current `Future` + **/ public function onComplete (listener:T->Void):Future { if (listener != null) { @@ -98,6 +161,13 @@ import lime.utils.Log; } + /** + Register a listener for when the `Future` ends with an error state. + + If the `Future` has already ended with an error, this is called immediately with the error value + @param listener A callback method to receive the error value + @return The current `Future` + **/ public function onError (listener:Dynamic->Void):Future { if (listener != null) { @@ -125,6 +195,13 @@ import lime.utils.Log; } + /** + Register a listener for when the `Future` updates progress. + + If the `Future` is already completed, this will not be called. + @param listener A callback method to receive the progress value + @return The current `Future` + **/ public function onProgress (listener:Int->Int->Void):Future { if (listener != null) { @@ -144,6 +221,11 @@ import lime.utils.Log; } + /** + Attempts to block on an asynchronous `Future`, returning when it is completed. + @param waitTime (Optional) A timeout before this call will stop blocking + @return This current `Future` + **/ public function ready (waitTime:Int = -1):Future { #if js @@ -189,6 +271,11 @@ import lime.utils.Log; } + /** + Attempts to block on an asynchronous `Future`, returning the completion value when it is finished. + @param waitTime (Optional) A timeout before this call will stop blocking + @return The completion value, or `null` if the request timed out or blocking is not possible + **/ public function result (waitTime:Int = -1):Null { ready (waitTime); @@ -206,6 +293,10 @@ import lime.utils.Log; } + /** + Chains two `Future` instances together, passing the result from the first + as input for creating/returning a new `Future` instance of a new or the same type + **/ public function then (next:T->Future):Future { if (isComplete) { @@ -241,6 +332,11 @@ import lime.utils.Log; } + /** + Creates a `Future` instance which has finished with an error value + @param error The error value to set + @return A new `Future` instance + **/ public static function withError (error:Dynamic):Future { var future = new Future (); @@ -251,6 +347,11 @@ import lime.utils.Log; } + /** + Creates a `Future` instance which has finished with a completion value + @param error The completion value to set + @return A new `Future` instance + **/ public static function withValue (value:T):Future { var future = new Future (); diff --git a/src/lime/app/Module.hx b/src/lime/app/Module.hx index 3c5710828..a1fd6f98c 100644 --- a/src/lime/app/Module.hx +++ b/src/lime/app/Module.hx @@ -4,6 +4,13 @@ package lime.app; import lime.ui.Window; import lime.utils.Preloader; + +/** + `Module` instances can be added to a running `Application`, + simplifying support for adding new components, such as a renderer, + input handler or higher-level framework. +**/ + #if !lime_debug @:fileXml('tags="haxe,release"') @:noDebug @@ -19,6 +26,9 @@ class Module implements IModule { public var onExit = new EventVoid> (); + /** + Creates a new `Module` instance + **/ public function new () { diff --git a/src/lime/app/Promise.hx b/src/lime/app/Promise.hx index 67df70d02..09c2b4f38 100644 --- a/src/lime/app/Promise.hx +++ b/src/lime/app/Promise.hx @@ -1,6 +1,46 @@ package lime.app; +/** + `Promise` is an implementation of Futures and Promises, with the exception that + in addition to "success" and "failure" states (represented as "complete" and "error"), + Lime `Future` introduces "progress" feedback as well to increase the value of + `Future` values. + + While `Future` is meant to be read-only, `Promise` can be used to set the state of a future + for receipients of it's `Future` object. For example: + + ``` + function examplePromise ():Future { + + var promise = new Promise (); + + var progress = 0, total = 10; + var timer = new Timer (100); + timer.run = function () { + + promise.progress (progress, total); + progress++; + + if (progress == total) { + + promise.complete ("Done!"); + timer.stop (); + + } + + }; + + return promise.future; + + } + + var future = examplePromise (); + future.onComplete (function (message) { trace (message); }); + future.onProgress (function (loaded, total) { trace ("Progress: " + loaded + ", " + total); }); + ``` +**/ + #if !lime_debug @:fileXml('tags="haxe,release"') @:noDebug @@ -13,8 +53,24 @@ package lime.app; class Promise { + /** + The `Future` associated with this `Promise`. + + All subsequent calls to set an error, completion or progress state + will update the status and notify listeners to this `Future` + **/ public var future (default, null):Future; + + /** + Whether the `Promise` (and related `Future`) has finished with a completion state. + This will be `false` if the `Promise` has not been resolved with a completion or error state. + **/ public var isComplete (get, null):Bool; + + /** + Whether the `Promise` (and related `Future`) has finished with an error state. + This will be `false` if the `Promise` has not been resolved with a completion or error state. + **/ public var isError (get, null):Bool; @@ -31,6 +87,9 @@ class Promise { #end + /** + Create a new `Promise` instance + **/ public function new () { future = new Future (); @@ -38,6 +97,11 @@ class Promise { } + /** + Resolves this `Promise` with a completion state + @param data The completion value + @return The current `Promise` + **/ public function complete (data:T):Promise { if (!future.isError) { @@ -64,6 +128,12 @@ class Promise { } + /** + Resolves this `Promise` with the complete, error and/or progress state + of another `Future` + @param future The `Future` to use to resolve this `Promise` + @return The current `Promise` + **/ public function completeWith (future:Future):Promise { future.onComplete (complete); @@ -75,7 +145,11 @@ class Promise { } - + /** + Resolves this `Promise` with an error state + @param msg The error value + @return The current `Promise` + **/ public function error (msg:Dynamic):Promise { if (!future.isComplete) { @@ -102,6 +176,12 @@ class Promise { } + /** + Sends progress updates to the related `Future` + @param progress A progress value + @param total A total value. This should be equal or greater to the `progress` value + @return The current `Promise` + **/ public function progress (progress:Int, total:Int):Promise { if (!future.isError && !future.isComplete) { diff --git a/src/lime/graphics/CairoRenderContext.hx b/src/lime/graphics/CairoRenderContext.hx index 65b39e0ca..2ea2500d0 100644 --- a/src/lime/graphics/CairoRenderContext.hx +++ b/src/lime/graphics/CairoRenderContext.hx @@ -1,10 +1,10 @@ -package lime.graphics; #if (sys && lime_cairo && !doc_gen) +package lime.graphics; #if (!lime_doc_gen || lime_cairo) import lime.graphics.cairo.Cairo; @:access(lime.graphics.RenderContext) -@:forward() +@:forward abstract CairoRenderContext(Cairo) from Cairo to Cairo { @@ -20,23 +20,4 @@ abstract CairoRenderContext(Cairo) from Cairo to Cairo { } -#else - - -@:forward() - - -abstract CairoRenderContext(Dynamic) from Dynamic to Dynamic { - - - @:from private static function fromRenderContext (context:RenderContext):CairoRenderContext { - - return null; - - } - - -} - - #end \ No newline at end of file diff --git a/src/lime/graphics/Canvas2DRenderContext.hx b/src/lime/graphics/Canvas2DRenderContext.hx index e0d7ce6bc..639726168 100644 --- a/src/lime/graphics/Canvas2DRenderContext.hx +++ b/src/lime/graphics/Canvas2DRenderContext.hx @@ -1,4 +1,4 @@ -package lime.graphics; #if (js && html5 && !doc_gen) +package lime.graphics; #if (lime_doc_gen && lime_canvas) #if (lime_canvas && (lime_doc_gen || !doc_gen)) import js.html.CanvasRenderingContext2D; @@ -39,4 +39,5 @@ abstract Canvas2DRenderContext(Dynamic) from Dynamic to Dynamic { } +#end #end \ No newline at end of file diff --git a/src/lime/graphics/DOMRenderContext.hx b/src/lime/graphics/DOMRenderContext.hx index ebaf32423..fd94e6307 100644 --- a/src/lime/graphics/DOMRenderContext.hx +++ b/src/lime/graphics/DOMRenderContext.hx @@ -1,10 +1,10 @@ -package lime.graphics; #if (js && html5 && !doc_gen) +package lime.graphics; #if (lime_doc_gen && lime_dom) #if (lime_dom && (lime_doc_gen || !doc_gen)) import js.html.Element; @:access(lime.graphics.RenderContext) -@:forward() +@:forward abstract DOMRenderContext(Element) from Element to Element { @@ -23,7 +23,7 @@ abstract DOMRenderContext(Element) from Element to Element { #else -@:forward() +@:forward abstract DOMRenderContext(Dynamic) from Dynamic to Dynamic { @@ -39,4 +39,5 @@ abstract DOMRenderContext(Dynamic) from Dynamic to Dynamic { } +#end #end \ No newline at end of file diff --git a/src/lime/graphics/FlashRenderContext.hx b/src/lime/graphics/FlashRenderContext.hx index d38ac523e..ec4a9f7d7 100644 --- a/src/lime/graphics/FlashRenderContext.hx +++ b/src/lime/graphics/FlashRenderContext.hx @@ -1,10 +1,10 @@ -package lime.graphics; #if (flash && !doc_gen) +package lime.graphics; #if (lime_doc_gen && flash) #if (flash && (lime_doc_gen || !doc_gen)) import flash.display.Sprite; @:access(lime.graphics.RenderContext) -@:forward() +@:forward abstract FlashRenderContext(Sprite) from Sprite to Sprite { @@ -23,7 +23,8 @@ abstract FlashRenderContext(Sprite) from Sprite to Sprite { #else -@:forward() +@:forward + abstract FlashRenderContext(Dynamic) from Dynamic to Dynamic { @@ -38,4 +39,5 @@ abstract FlashRenderContext(Dynamic) from Dynamic to Dynamic { } +#end #end \ No newline at end of file diff --git a/src/lime/graphics/OpenGLES2RenderContext.hx b/src/lime/graphics/OpenGLES2RenderContext.hx index e94385cdc..555d95f9c 100644 --- a/src/lime/graphics/OpenGLES2RenderContext.hx +++ b/src/lime/graphics/OpenGLES2RenderContext.hx @@ -1,4 +1,4 @@ -package lime.graphics; #if (sys && lime_cffi && lime_opengl && !doc_gen) +package lime.graphics; #if (!lime_doc_gen || lime_opengl || lime_opengles) #if (sys && lime_cffi && lime_opengl && !doc_gen) import lime.graphics.opengl.*; @@ -91,7 +91,7 @@ vertexAttrib3fv, vertexAttrib4f, vertexAttrib4fv, vertexAttribPointer, viewport, EXTENSIONS, type, version) -abstract OpenGLES2RenderContext(OpenGLES3RenderContext) from OpenGLES3RenderContext from OpenGLRenderContext { +abstract OpenGLES2RenderContext(OpenGLES3RenderContext) from OpenGLES3RenderContext #if (!lime_doc_gen && lime_opengl) from OpenGLRenderContext #end { @:from private static function fromGL (gl:Class):OpenGLES2RenderContext { @@ -136,11 +136,13 @@ abstract OpenGLES2RenderContext(Dynamic) from Dynamic to Dynamic { } + #if (!lime_doc_gen && lime_opengl) @:from private static function fromOpenGLRenderContext (gl:OpenGLRenderContext):OpenGLES2RenderContext { return null; } + #end @:from private static function fromRenderContext (context:RenderContext):OpenGLES2RenderContext { @@ -160,4 +162,5 @@ abstract OpenGLES2RenderContext(Dynamic) from Dynamic to Dynamic { } +#end #end \ No newline at end of file diff --git a/src/lime/graphics/OpenGLES3RenderContext.hx b/src/lime/graphics/OpenGLES3RenderContext.hx index f3d702d65..743649337 100644 --- a/src/lime/graphics/OpenGLES3RenderContext.hx +++ b/src/lime/graphics/OpenGLES3RenderContext.hx @@ -1,15 +1,22 @@ -package lime.graphics; #if (sys && lime_cffi && lime_opengl && !doc_gen) +package lime.graphics; #if (!lime_doc_gen || lime_opengl || lime_opengles) #if (sys && lime_cffi && lime_opengl && !doc_gen) import haxe.Int64; import haxe.io.Bytes; +import lime._internal.backend.native.NativeOpenGLRenderContext; import lime.graphics.opengl.*; import lime.utils.DataPointer; import lime.utils.Float32Array; import lime.utils.Int32Array; +@:forward + +#if (lime_doc_gen) +abstract OpenGLES3RenderContext(NativeOpenGLRenderContext) from NativeOpenGLRenderContext { +#else abstract OpenGLES3RenderContext(OpenGLRenderContext) from OpenGLRenderContext { +#end private static var __extensions:String; @@ -3261,4 +3268,5 @@ abstract OpenGLES3RenderContext(Dynamic) from Dynamic to Dynamic { } +#end #end \ No newline at end of file diff --git a/src/lime/graphics/OpenGLRenderContext.hx b/src/lime/graphics/OpenGLRenderContext.hx index 0b4285649..97d57d52c 100644 --- a/src/lime/graphics/OpenGLRenderContext.hx +++ b/src/lime/graphics/OpenGLRenderContext.hx @@ -1,4 +1,4 @@ -package lime.graphics; #if (sys && lime_cffi && lime_opengl && !doc_gen) +package lime.graphics; #if (!lime_doc_gen || lime_opengl) #if (sys && lime_cffi && lime_opengl && !doc_gen) import lime._internal.backend.native.NativeOpenGLRenderContext; @@ -39,4 +39,5 @@ abstract OpenGLRenderContext(Dynamic) from Dynamic to Dynamic { } +#end #end \ No newline at end of file diff --git a/src/lime/graphics/RenderContext.hx b/src/lime/graphics/RenderContext.hx index c9c0cdb6e..bf9f78071 100644 --- a/src/lime/graphics/RenderContext.hx +++ b/src/lime/graphics/RenderContext.hx @@ -9,17 +9,46 @@ class RenderContext { public var attributes (default, null):RenderContextAttributes; + + #if (!lime_doc_gen || native) public var cairo (default, null):CairoRenderContext; + #end + + #if (!lime_doc_gen || (js && html5)) public var canvas2D (default, null):Canvas2DRenderContext; + #end + + #if (!lime_doc_gen || (js && html5)) public var dom (default, null):DOMRenderContext; + #end + + #if (!lime_doc_gen || flash) public var flash (default, null):FlashRenderContext; + #end + + #if (!lime_doc_gen || (native && desktop)) public var gl (default, null):OpenGLRenderContext; + #end + + #if (!lime_doc_gen || native) public var gles2 (default, null):OpenGLES2RenderContext; + #end + + #if (!lime_doc_gen || native) public var gles3 (default, null):OpenGLES3RenderContext; + #end + public var type (default, null):RenderContextType; public var version (default, null):String; + + #if (!lime_doc_gen || native || (js && html5)) public var webgl (default, null):WebGLRenderContext; + #end + + #if (!lime_doc_gen || native || (js && html5)) public var webgl2 (default, null):WebGL2RenderContext; + #end + public var window (default, null):Window; diff --git a/src/lime/graphics/WebGL2RenderContext.hx b/src/lime/graphics/WebGL2RenderContext.hx index 153f5befe..fa7024220 100644 --- a/src/lime/graphics/WebGL2RenderContext.hx +++ b/src/lime/graphics/WebGL2RenderContext.hx @@ -1,4 +1,4 @@ -package lime.graphics; #if (js && html5 && !doc_gen) +package lime.graphics; #if (lime_webgl && !doc_gen) import lime._internal.backend.html5.HTML5WebGL2RenderContext; @@ -312,13 +312,6 @@ abstract WebGL2RenderContext(HTML5WebGL2RenderContext) from HTML5WebGL2RenderCon } - @:from private static function fromOpenGLES3RenderContext (gl:OpenGLES3RenderContext):WebGL2RenderContext { - - return (gl:OpenGLRenderContext); - - } - - @:from private static function fromRenderContext (context:RenderContext):WebGL2RenderContext { return context.webgl2; @@ -336,7 +329,7 @@ abstract WebGL2RenderContext(HTML5WebGL2RenderContext) from HTML5WebGL2RenderCon } -#elseif (sys && lime_opengl && !doc_gen) +#elseif (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) import haxe.Int64; @@ -353,8 +346,11 @@ import lime.utils.UInt32Array; @:access(lime.graphics.RenderContext) +#if !doc_gen abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to OpenGLRenderContext { - +#else +abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic { +#end private static var __tempPointer = new BytePointer (); @@ -2528,6 +2524,13 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } + public inline function isSync (sync:GLSync):Bool { + + return this.isSync (sync); + + } + + public inline function isTexture (texture:GLTexture):Bool { return this.isTexture (texture); @@ -2771,7 +2774,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform1fv (location:GLUniformLocation, v:Float32Array):Void { + public inline function uniform1fv (location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform1fv (location, v != null ? v.length : 0, v); @@ -2785,7 +2788,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform1iv (location:GLUniformLocation, v:Int32Array):Void { + public inline function uniform1iv (location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform1iv (location, v != null ? v.length : 0, v); @@ -2799,7 +2802,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform1uiv (location:GLUniformLocation, v:UInt32Array):Void { + public inline function uniform1uiv (location:GLUniformLocation, v:UInt32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform1uiv (location, v != null ? v.length : 0, v); @@ -2813,7 +2816,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform2fv (location:GLUniformLocation, v:Float32Array):Void { + public inline function uniform2fv (location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform2fv (location, v != null ? v.length >> 1 : 0, v); @@ -2827,7 +2830,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform2iv (location:GLUniformLocation, v:Int32Array):Void { + public inline function uniform2iv (location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform2iv (location, v != null ? v.length >> 1 : 0, v); @@ -2841,7 +2844,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform2uiv (location:GLUniformLocation, v:UInt32Array):Void { + public inline function uniform2uiv (location:GLUniformLocation, v:UInt32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform2uiv (location, v != null ? v.length >> 1 : 0, v); @@ -2855,7 +2858,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform3fv (location:GLUniformLocation, v:Float32Array):Void { + public inline function uniform3fv (location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform3fv (location, v != null ? Std.int (v.length / 3) : 0, v); @@ -2869,7 +2872,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform3iv (location:GLUniformLocation, v:Int32Array):Void { + public inline function uniform3iv (location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform3iv (location, v != null ? Std.int (v.length / 3) : 0, v); @@ -2883,7 +2886,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform3uiv (location:GLUniformLocation, v:UInt32Array):Void { + public inline function uniform3uiv (location:GLUniformLocation, v:UInt32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform3uiv (location, v != null ? Std.int (v.length / 3) : 0, v); @@ -2897,7 +2900,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform4fv (location:GLUniformLocation, v:Float32Array):Void { + public inline function uniform4fv (location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform4fv (location, v != null ? v.length >> 2 : 0, v); @@ -2911,7 +2914,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform4iv (location:GLUniformLocation, v:Int32Array):Void { + public inline function uniform4iv (location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform4iv (location, v != null ? v.length >> 2 : 0, v); @@ -2925,7 +2928,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function uniform4uiv (location:GLUniformLocation, v:UInt32Array):Void { + public inline function uniform4uiv (location:GLUniformLocation, v:UInt32Array, ?srcOffset:Int, ?srcLength:Int):Void { this.uniform4uiv (location, v != null ? v.length >> 2 : 0, v); @@ -3078,7 +3081,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function vertexAttrib1fv (indx:Int, values:Float32Array):Void { + public inline function vertexAttrib1fv (indx:Int, values:#if (!lime_webgl && !doc_gen) DataPointer #else Float32Array #end):Void { this.vertexAttrib1fv (indx, values); @@ -3092,7 +3095,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function vertexAttrib2fv (indx:Int, values:Float32Array):Void { + public inline function vertexAttrib2fv (indx:Int, values:#if (!lime_webgl && !doc_gen) DataPointer #else Float32Array #end):Void { this.vertexAttrib2fv (indx, values); @@ -3106,7 +3109,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function vertexAttrib3fv (indx:Int, values:Float32Array):Void { + public inline function vertexAttrib3fv (indx:Int, values:#if (!lime_webgl && !doc_gen) DataPointer #else Float32Array #end):Void { this.vertexAttrib3fv (indx, values); @@ -3120,7 +3123,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function vertexAttrib4fv (indx:Int, values:Float32Array):Void { + public inline function vertexAttrib4fv (indx:Int, values:#if (!lime_webgl && !doc_gen) DataPointer #else Float32Array #end):Void { this.vertexAttrib4fv (indx, values); @@ -3141,7 +3144,7 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function vertexAttribI4iv (indx:Int, values:Float32Array):Void { + public inline function vertexAttribI4iv (indx:Int, values:#if (!lime_webgl && !doc_gen) DataPointer #else Float32Array #end):Void { this.vertexAttribI4iv (indx, values); @@ -3155,13 +3158,20 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } - public inline function vertexAttribI4uiv (indx:Int, values:Float32Array):Void { + public inline function vertexAttribI4uiv (indx:Int, values:#if (!lime_webgl && !doc_gen) DataPointer #else Float32Array #end):Void { this.vertexAttribI4uiv (indx, values); } + public inline function vertexAttribIPointer (index:Int, size:Int, type:Int, stride:Int, offset:DataPointer):Void { + + this.vertexAttribIPointer (index, size, type, stride, offset); + + } + + public inline function vertexAttribPointer (indx:Int, size:Int, type:Int, normalized:Bool, stride:Int, offset:DataPointer):Void { this.vertexAttribPointer (indx, size, type, normalized, stride, offset); @@ -3190,11 +3200,13 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } + #if (!lime_doc_gen && (lime_opengl || lime_opengles)) @:from private static function fromOpenGLES3RenderContext (gl:OpenGLES3RenderContext):WebGL2RenderContext { return cast gl; } + #end @:from private static function fromGL (gl:Class):WebGL2RenderContext { @@ -3207,46 +3219,4 @@ abstract WebGL2RenderContext(OpenGLRenderContext) from OpenGLRenderContext to Op } -#else - - -import lime.graphics.opengl.GL; - -@:forward() - - -abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic { - - - @:from private static function fromGL (gl:Class):WebGL2RenderContext { - - return null; - - } - - - @:from private static function fromOpenGLES3RenderContext (gl:OpenGLES3RenderContext):WebGL2RenderContext { - - return null; - - } - - - @:from private static function fromRenderContext (context:RenderContext):WebGL2RenderContext { - - return null; - - } - - - @:from private static function toWebGLRenderContext (gl:WebGLRenderContext):WebGL2RenderContext { - - return null; - - } - - -} - - #end \ No newline at end of file diff --git a/src/lime/graphics/WebGLRenderContext.hx b/src/lime/graphics/WebGLRenderContext.hx index 88eda5655..d0e5a9006 100644 --- a/src/lime/graphics/WebGLRenderContext.hx +++ b/src/lime/graphics/WebGLRenderContext.hx @@ -1,4 +1,4 @@ -package lime.graphics; +package lime.graphics; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) import lime.graphics.opengl.*; @@ -131,6 +131,7 @@ abstract WebGLRenderContext(WebGL2RenderContext) { } + #if (!lime_doc_gen && lime_opengl) @:from private static function fromOpenGLContext (gl:OpenGLRenderContext):WebGLRenderContext { #if (sys && lime_cffi && lime_opengl) @@ -140,8 +141,10 @@ abstract WebGLRenderContext(WebGL2RenderContext) { #end } + #end + #if (!lime_doc_gen && (lime_opengl || lime_opengles)) @:from private static function fromOpenGLES2Context (gl:OpenGLES2RenderContext):WebGLRenderContext { #if (sys && lime_cffi && lime_opengl) @@ -151,8 +154,10 @@ abstract WebGLRenderContext(WebGL2RenderContext) { #end } + #end + #if (!lime_doc_gen && (lime_opengl || lime_opengles)) @:from private static function fromOpenGLES3Context (gl:OpenGLES3RenderContext):WebGLRenderContext { #if (sys && lime_cffi && lime_opengl) @@ -162,6 +167,10 @@ abstract WebGLRenderContext(WebGL2RenderContext) { #end } + #end -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/Cairo.hx b/src/lime/graphics/cairo/Cairo.hx index 9ee97394e..08b60b1a7 100644 --- a/src/lime/graphics/cairo/Cairo.hx +++ b/src/lime/graphics/cairo/Cairo.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) import lime._internal.backend.native.NativeCFFI; @@ -926,4 +926,7 @@ class Cairo { } -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoAntialias.hx b/src/lime/graphics/cairo/CairoAntialias.hx index d84583afa..831e61d53 100644 --- a/src/lime/graphics/cairo/CairoAntialias.hx +++ b/src/lime/graphics/cairo/CairoAntialias.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoAntialias(Int) from Int to Int from UInt to UInt { @@ -11,4 +11,7 @@ package lime.graphics.cairo; public var GOOD = 5; public var BEST = 6; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoContent.hx b/src/lime/graphics/cairo/CairoContent.hx index 4dd872717..f138a72dd 100644 --- a/src/lime/graphics/cairo/CairoContent.hx +++ b/src/lime/graphics/cairo/CairoContent.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoContent(Int) from Int to Int from UInt to UInt { @@ -7,4 +7,7 @@ package lime.graphics.cairo; public var ALPHA = 0x2000; public var COLOR_ALPHA = 0x3000; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoExtend.hx b/src/lime/graphics/cairo/CairoExtend.hx index 320cc0c9e..76cab8312 100644 --- a/src/lime/graphics/cairo/CairoExtend.hx +++ b/src/lime/graphics/cairo/CairoExtend.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoExtend(Int) from Int to Int from UInt to UInt { @@ -8,4 +8,7 @@ package lime.graphics.cairo; public var REFLECT = 2; public var PAD = 3; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoFTFontFace.hx b/src/lime/graphics/cairo/CairoFTFontFace.hx index 55b7b0ae1..36d62d833 100644 --- a/src/lime/graphics/cairo/CairoFTFontFace.hx +++ b/src/lime/graphics/cairo/CairoFTFontFace.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) import lime._internal.backend.native.NativeCFFI; @@ -32,4 +32,7 @@ abstract CairoFTFontFace(CairoFontFace) from CairoFontFace to CairoFontFace from } -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoFillRule.hx b/src/lime/graphics/cairo/CairoFillRule.hx index b61e8eb0a..01539b1d1 100644 --- a/src/lime/graphics/cairo/CairoFillRule.hx +++ b/src/lime/graphics/cairo/CairoFillRule.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoFillRule(Int) from Int to Int from UInt to UInt { @@ -6,4 +6,7 @@ package lime.graphics.cairo; public var WINDING = 0; public var EVEN_ODD = 1; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoFilter.hx b/src/lime/graphics/cairo/CairoFilter.hx index 1bb31cc97..ffd11f52d 100644 --- a/src/lime/graphics/cairo/CairoFilter.hx +++ b/src/lime/graphics/cairo/CairoFilter.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoFilter(Int) from Int to Int from UInt to UInt { @@ -10,4 +10,7 @@ package lime.graphics.cairo; public var BILINEAR = 4; public var GAUSSIAN = 5; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoFontFace.hx b/src/lime/graphics/cairo/CairoFontFace.hx index 4b16157ed..273a11e9a 100644 --- a/src/lime/graphics/cairo/CairoFontFace.hx +++ b/src/lime/graphics/cairo/CairoFontFace.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) import lime._internal.backend.native.NativeCFFI; @@ -28,4 +28,7 @@ abstract CairoFontFace(CFFIPointer) from CFFIPointer to CFFIPointer { } -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoFontOptions.hx b/src/lime/graphics/cairo/CairoFontOptions.hx index 35267a40e..dc833c46a 100644 --- a/src/lime/graphics/cairo/CairoFontOptions.hx +++ b/src/lime/graphics/cairo/CairoFontOptions.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || native) import lime._internal.backend.native.NativeCFFI; @@ -124,4 +124,7 @@ abstract CairoFontOptions(CFFIPointer) from CFFIPointer to CFFIPointer { } -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoFormat.hx b/src/lime/graphics/cairo/CairoFormat.hx index dae930903..91845d4a3 100644 --- a/src/lime/graphics/cairo/CairoFormat.hx +++ b/src/lime/graphics/cairo/CairoFormat.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoFormat(Int) from Int to Int from UInt to UInt { @@ -11,4 +11,7 @@ package lime.graphics.cairo; public var RGB16_565 = 4; public var RGB30 = 5; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoGlyph.hx b/src/lime/graphics/cairo/CairoGlyph.hx index e21363cd5..3cbb4f504 100644 --- a/src/lime/graphics/cairo/CairoGlyph.hx +++ b/src/lime/graphics/cairo/CairoGlyph.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) #if !lime_debug @@ -24,4 +24,7 @@ class CairoGlyph { } -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoHintMetrics.hx b/src/lime/graphics/cairo/CairoHintMetrics.hx index 4961f14e4..d1619bc50 100644 --- a/src/lime/graphics/cairo/CairoHintMetrics.hx +++ b/src/lime/graphics/cairo/CairoHintMetrics.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoHintMetrics(Int) from Int to Int from UInt to UInt { @@ -7,4 +7,7 @@ package lime.graphics.cairo; public var OFF = 1; public var ON = 2; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoHintStyle.hx b/src/lime/graphics/cairo/CairoHintStyle.hx index 1a3a2a217..531b56db0 100644 --- a/src/lime/graphics/cairo/CairoHintStyle.hx +++ b/src/lime/graphics/cairo/CairoHintStyle.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoHintStyle(Int) from Int to Int from UInt to UInt { @@ -9,4 +9,7 @@ package lime.graphics.cairo; public var MEDIUM = 3; public var FULL = 4; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoImageSurface.hx b/src/lime/graphics/cairo/CairoImageSurface.hx index 74a5f347c..27c57e328 100644 --- a/src/lime/graphics/cairo/CairoImageSurface.hx +++ b/src/lime/graphics/cairo/CairoImageSurface.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) import lime._internal.backend.native.NativeCFFI; @@ -113,4 +113,7 @@ import lime.utils.DataPointer; } -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoLineCap.hx b/src/lime/graphics/cairo/CairoLineCap.hx index d92a13c1f..c7b7d07ac 100644 --- a/src/lime/graphics/cairo/CairoLineCap.hx +++ b/src/lime/graphics/cairo/CairoLineCap.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoLineCap(Int) from Int to Int from UInt to UInt { @@ -7,4 +7,7 @@ package lime.graphics.cairo; public var ROUND = 1; public var SQUARE = 2; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoLineJoin.hx b/src/lime/graphics/cairo/CairoLineJoin.hx index 03ea5b83d..1eebb5d29 100644 --- a/src/lime/graphics/cairo/CairoLineJoin.hx +++ b/src/lime/graphics/cairo/CairoLineJoin.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoLineJoin(Int) from Int to Int from UInt to UInt { @@ -7,4 +7,7 @@ package lime.graphics.cairo; public var ROUND = 1; public var BEVEL = 2; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoOperator.hx b/src/lime/graphics/cairo/CairoOperator.hx index 64dd8df7a..1880ee228 100644 --- a/src/lime/graphics/cairo/CairoOperator.hx +++ b/src/lime/graphics/cairo/CairoOperator.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoOperator(Int) from Int to Int from UInt to UInt { @@ -33,4 +33,7 @@ package lime.graphics.cairo; public var HSL_COLOR = 27; public var HSL_LUMINOSITY = 28; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoPattern.hx b/src/lime/graphics/cairo/CairoPattern.hx index 4e97f50a4..dfca26cd9 100644 --- a/src/lime/graphics/cairo/CairoPattern.hx +++ b/src/lime/graphics/cairo/CairoPattern.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) import lime._internal.backend.native.NativeCFFI; @@ -186,4 +186,7 @@ abstract CairoPattern(CFFIPointer) from CFFIPointer to CFFIPointer { } -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoStatus.hx b/src/lime/graphics/cairo/CairoStatus.hx index 55a8cda78..976482500 100644 --- a/src/lime/graphics/cairo/CairoStatus.hx +++ b/src/lime/graphics/cairo/CairoStatus.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoStatus(Int) from Int to Int from UInt to UInt { @@ -43,4 +43,7 @@ package lime.graphics.cairo; public var DEVICE_FINISHED = 37; public var JBIG2_GLOBAL_MISSING = 38; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoSubpixelOrder.hx b/src/lime/graphics/cairo/CairoSubpixelOrder.hx index 7ac4d85a3..fc4c7d7ca 100644 --- a/src/lime/graphics/cairo/CairoSubpixelOrder.hx +++ b/src/lime/graphics/cairo/CairoSubpixelOrder.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) @:enum abstract CairoSubpixelOrder(Int) from Int to Int from UInt to UInt { @@ -9,4 +9,7 @@ package lime.graphics.cairo; public var VRGB = 3; public var VBGR = 4; -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/cairo/CairoSurface.hx b/src/lime/graphics/cairo/CairoSurface.hx index bae5f3992..2c0fa3d7f 100644 --- a/src/lime/graphics/cairo/CairoSurface.hx +++ b/src/lime/graphics/cairo/CairoSurface.hx @@ -1,4 +1,4 @@ -package lime.graphics.cairo; +package lime.graphics.cairo; #if (!lime_doc_gen || lime_cairo) import lime._internal.backend.native.NativeCFFI; @@ -19,4 +19,7 @@ abstract CairoSurface(CFFIPointer) from CFFIPointer to CFFIPointer { } -} \ No newline at end of file +} + + +#end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GL.hx b/src/lime/graphics/opengl/GL.hx index bc259e640..0040c2394 100644 --- a/src/lime/graphics/opengl/GL.hx +++ b/src/lime/graphics/opengl/GL.hx @@ -1,4 +1,4 @@ -package lime.graphics.opengl; +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) import haxe.io.Bytes; @@ -805,7 +805,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function bufferData (target:Int, size:Int, srcData:DataPointer, usage:Int):Void { context.bufferData (target, size, srcData, usage); @@ -814,7 +814,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function bufferDataWEBGL (target:Int, srcData:Dynamic, usage:Int, ?srcOffset:Int, ?length:Int):Void { context.bufferData (target, srcData, usage, srcOffset, length); @@ -823,7 +823,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function bufferSubData (target:Int, dstByteOffset:Int, size:Int, srcData:DataPointer):Void { context.bufferSubData (target, dstByteOffset, size, srcData); @@ -832,7 +832,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function bufferSubDataWEBGL (target:Int, dstByteOffset:Int, srcData:Dynamic, ?srcOffset:Int, ?length:Int):Void { context.bufferSubData (target, dstByteOffset, srcData, srcOffset, length); @@ -862,7 +862,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function clearBufferfv (buffer:Int, drawbuffer:Int, value:DataPointer):Void { context.clearBufferfv (buffer, drawbuffer, value); @@ -871,7 +871,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function clearBufferfvWEBGL (buffer:Int, drawbuffer:Int, values:Dynamic, ?srcOffset:Int):Void { context.clearBufferfv (buffer, drawbuffer, values, srcOffset); @@ -880,7 +880,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function clearBufferiv (buffer:Int, drawbuffer:Int, value:DataPointer):Void { context.clearBufferiv (buffer, drawbuffer, value); @@ -889,7 +889,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function clearBufferivWEBGL (buffer:Int, drawbuffer:Int, values:Dynamic, ?srcOffset:Int):Void { context.clearBufferiv (buffer, drawbuffer, values, srcOffset); @@ -898,7 +898,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function clearBufferuiv (buffer:Int, drawbuffer:Int, value:DataPointer):Void { context.clearBufferuiv (buffer, drawbuffer, value); @@ -907,7 +907,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function clearBufferuivWEBGL (buffer:Int, drawbuffer:Int, values:Dynamic, ?srcOffset:Int):Void { context.clearBufferuiv (buffer, drawbuffer, values, srcOffset); @@ -923,7 +923,7 @@ class GL { } - #if (js && html5) + #if lime_webgl public static inline function clearDepth (depth:Float):Void { context.clearDepth (depth); @@ -932,7 +932,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function clearDepthf (depth:Float):Void { context.clearDepthf (depth); @@ -969,7 +969,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function compressedTexImage2D (target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, imageSize:Int, data:DataPointer):Void { context.compressedTexImage2D (target, level, internalformat, width, height, border, imageSize, data); @@ -978,7 +978,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function compressedTexImage2DWEBGL (target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, srcData:Dynamic, ?srcOffset:Int, ?srcLengthOverride:Int):Void { context.compressedTexImage2D (target, level, internalformat, width, height, border, srcData, srcOffset, srcLengthOverride); @@ -987,7 +987,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function compressedTexImage3D (target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, imageSize:Int, data:DataPointer):Void { context.compressedTexImage3D (target, level, internalformat, width, height, depth, border, imageSize, data); @@ -996,7 +996,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function compressedTexImage3DWEBGL (target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, srcData:Dynamic, ?srcOffset:Int, ?srcLengthOverride:Int):Void { context.compressedTexImage3D (target, level, internalformat, width, height, depth, border, srcData, srcOffset, srcLengthOverride); @@ -1005,7 +1005,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function compressedTexSubImage2D (target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, imageSize:Int, data:DataPointer):Void { context.compressedTexSubImage2D (target, level, xoffset, yoffset, width, height, format, imageSize, data); @@ -1014,7 +1014,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function compressedTexSubImage2DWEBGL (target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, srcData:Dynamic, ?srcOffset:Int, ?srcLengthOverride:Int):Void { context.compressedTexSubImage2D (target, level, xoffset, yoffset, width, height, format, srcData, srcOffset, srcLengthOverride); @@ -1023,7 +1023,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function compressedTexSubImage3D (target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int, format:Int, imageSize:Int, data:DataPointer):Void { context.compressedTexSubImage3D (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); @@ -1032,7 +1032,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function compressedTexSubImage3DWEBGL (target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int, format:Int, srcData:Dynamic, ?srcOffset:Int, ?srcLengthOverride:Int):Void { context.compressedTexSubImage3D (target, level, xoffset, yoffset, zoffset, width, height, depth, format, srcData, srcOffset, srcLengthOverride); @@ -1041,7 +1041,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function copyBufferSubData (readTarget:Int, writeTarget:Int, readOffset:DataPointer, writeOffset:DataPointer, size:Int):Void { context.copyBufferSubData (readTarget, writeTarget, readOffset, writeOffset, size); @@ -1239,7 +1239,7 @@ class GL { } - #if (js && html5) + #if lime_webgl public static inline function depthRange (zNear:Float, zFar:Float):Void { context.depthRange (zNear, zFar); @@ -1248,7 +1248,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function depthRangef (zNear:Float, zFar:Float):Void { context.depthRangef (zNear, zFar); @@ -1418,7 +1418,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getActiveUniformBlocki (program:GLProgram, uniformBlockIndex:Int, pname:Int):Int { return context.getActiveUniformBlocki (program, uniformBlockIndex, pname); @@ -1427,7 +1427,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getActiveUniformBlockiv (program:GLProgram, uniformBlockIndex:Int, pname:Int, params:DataPointer):Void { context.getActiveUniformBlockiv (program, uniformBlockIndex, pname, params); @@ -1457,7 +1457,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getActiveUniformsiv (program:GLProgram, uniformIndices:Array, pname:Int, params:DataPointer):Void { context.getActiveUniformsiv (program, uniformIndices, pname, params); @@ -1480,7 +1480,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getBoolean (pname:Int):Bool { return context.getBoolean (pname); @@ -1489,7 +1489,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getBooleanv (pname:Int, params:DataPointer):Void { context.getBooleanv (pname, params); @@ -1505,7 +1505,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getBufferParameteri (target:Int, pname:Int):Int { return context.getBufferParameteri (target, pname); @@ -1514,7 +1514,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getBufferParameteri64v (target:Int, pname:Int, params:DataPointer):Void { context.getBufferParameteri64v (target, pname, params); @@ -1523,7 +1523,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getBufferParameteriv (target:Int, pname:Int, data:DataPointer):Void { context.getBufferParameteriv (target, pname, data); @@ -1532,7 +1532,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getBufferPointerv (target:Int, pname:Int):DataPointer { return context.getBufferPointerv (target, pname); @@ -1541,7 +1541,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getBufferSubData (target:Int, offset:DataPointer, size:Int, data:DataPointer):Void { context.getBufferSubData (target, offset, size, data); @@ -1550,7 +1550,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function getBufferSubDataWEBGL (target:Int, srcByteOffset:DataPointer, dstData:Dynamic, ?srcOffset:Dynamic, ?length:Int):Void { context.getBufferSubData (target, srcByteOffset, dstData, srcOffset, length); @@ -1580,7 +1580,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getFloat (pname:Int):Float { return context.getFloat (pname); @@ -1589,7 +1589,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getFloatv (pname:Int, params:DataPointer):Void { context.getFloatv (pname, params); @@ -1612,7 +1612,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getFramebufferAttachmentParameteri (target:Int, attachment:Int, pname:Int):Int { return context.getFramebufferAttachmentParameteri (target, attachment, pname); @@ -1621,7 +1621,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getFramebufferAttachmentParameteriv (target:Int, attachment:Int, pname:Int, params:DataPointer):Void { context.getFramebufferAttachmentParameteriv (target, attachment, pname, params); @@ -1637,7 +1637,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getInteger (pname:Int):Int { return context.getInteger (pname); @@ -1646,7 +1646,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getInteger64 (pname:Int):Int64 { return context.getInteger64 (pname); @@ -1655,7 +1655,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getInteger64i (pname:Int):Int64 { return context.getInteger64i (pname); @@ -1664,7 +1664,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getInteger64i_v (pname:Int, index:Int, params:DataPointer):Void { context.getInteger64i_v (pname, index, params); @@ -1673,7 +1673,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getInteger64v (pname:Int, params:DataPointer):Void { context.getInteger64v (pname, params); @@ -1682,7 +1682,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getIntegeri_v (pname:Int, index:Int, params:DataPointer):Void { context.getIntegeri_v (pname, index, params); @@ -1691,7 +1691,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getIntegerv (pname:Int, params:DataPointer):Void { context.getIntegerv (pname, params); @@ -1700,7 +1700,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getInternalformati (target:Int, internalformat:Int, pname:Int):Int { return context.getInternalformati (target, internalformat, pname); @@ -1709,7 +1709,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getInternalformativ (target:Int, internalformat:Int, pname:Int, bufSize:Int, params:DataPointer):Void { context.getInternalformativ (target, internalformat, pname, bufSize, params); @@ -1732,7 +1732,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getProgrami (program:GLProgram, pname:Int):Int { return context.getProgrami (program, pname); @@ -1741,7 +1741,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getProgramiv (program:GLProgram, pname:Int, params:DataPointer):Void { context.getProgramiv (program, pname, params); @@ -1750,7 +1750,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getProgramBinary (program:GLProgram, binaryFormat:Int):Bytes { return context.getProgramBinary (program, binaryFormat); @@ -1780,7 +1780,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getQueryi (target:Int, pname:Int):Int { return context.getQueryi (target, pname); @@ -1789,7 +1789,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getQueryiv (target:Int, pname:Int, params:DataPointer):Void { context.getQueryiv (target, pname, params); @@ -1798,7 +1798,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getQueryObjectui (query:GLQuery, pname:Int):Int { return context.getQueryObjectui (query, pname); @@ -1807,7 +1807,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getQueryObjectuiv (query:GLQuery, pname:Int, params:DataPointer):Void { context.getQueryObjectuiv (query, pname, params); @@ -1830,7 +1830,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getRenderbufferParameteri (target:Int, pname:Int):Int { return context.getRenderbufferParameteri (target, pname); @@ -1839,7 +1839,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getRenderbufferParameteriv (target:Int, pname:Int, params:DataPointer):Void { context.getRenderbufferParameteriv (target, pname, params); @@ -1855,7 +1855,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getSamplerParameterf (sampler:GLSampler, pname:Int):Float { return context.getSamplerParameterf (sampler, pname); @@ -1864,7 +1864,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getSamplerParameterfv (sampler:GLSampler, pname:Int, params:DataPointer):Void { context.getSamplerParameterfv (sampler, pname, params); @@ -1873,7 +1873,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getSamplerParameteri (sampler:GLSampler, pname:Int):Int { return context.getSamplerParameteri (sampler, pname); @@ -1882,7 +1882,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getSamplerParameteriv (sampler:GLSampler, pname:Int, params:DataPointer):Void { context.getSamplerParameteriv (sampler, pname, params); @@ -1891,7 +1891,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getShaderi (shader:GLShader, pname:Int):Int { return context.getShaderi (shader, pname); @@ -1900,7 +1900,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getShaderiv (shader:GLShader, pname:Int, params:DataPointer):Void { context.getShaderiv (shader, pname, params); @@ -1937,7 +1937,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getString (name:Int):String { return context.getString (name); @@ -1946,7 +1946,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getStringi (name:Int, index:Int):String { return context.getStringi (name, index); @@ -1969,7 +1969,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getSyncParameteri (sync:GLSync, pname:Int):Int { return context.getSyncParameteri (sync, pname); @@ -1978,7 +1978,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getSyncParameteriv (sync:GLSync, pname:Int, params:DataPointer):Void { context.getSyncParameteriv (sync, pname, params); @@ -1994,7 +1994,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getTexParameterf (target:Int, pname:Int):Float { return context.getTexParameterf (target, pname); @@ -2003,7 +2003,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getTexParameterfv (target:Int, pname:Int, params:DataPointer):Void { context.getTexParameterfv (target, pname, params); @@ -2012,7 +2012,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getTexParameteri (target:Int, pname:Int):Int { return context.getTexParameteri (target, pname); @@ -2021,7 +2021,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getTexParameteriv (target:Int, pname:Int, params:DataPointer):Void { context.getTexParameteriv (target, pname, params); @@ -2044,7 +2044,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getUniformf (program:GLProgram, location:GLUniformLocation):Float { return context.getUniformf (program, location); @@ -2053,7 +2053,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getUniformfv (program:GLProgram, location:GLUniformLocation, params:DataPointer):Void { context.getUniformfv (program, location, params); @@ -2062,7 +2062,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getUniformi (program:GLProgram, location:GLUniformLocation):Int { return context.getUniformi (program, location); @@ -2071,7 +2071,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getUniformiv (program:GLProgram, location:GLUniformLocation, params:DataPointer):Void { context.getUniformiv (program, location, params); @@ -2080,7 +2080,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getUniformui (program:GLProgram, location:GLUniformLocation):Int { return context.getUniformui (program, location); @@ -2089,7 +2089,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getUniformuiv (program:GLProgram, location:GLUniformLocation, params:DataPointer):Void { context.getUniformuiv (program, location, params); @@ -2126,7 +2126,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function getVertexAttribf (index:Int, pname:Int):Float { return context.getVertexAttribf (index, pname); @@ -2135,7 +2135,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getVertexAttribfv (index:Int, pname:Int, params:DataPointer):Void { context.getVertexAttribfv (index, pname, params); @@ -2144,7 +2144,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getVertexAttribi (index:Int, pname:Int):Int { return context.getVertexAttribi (index, pname); @@ -2153,7 +2153,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getVertexAttribIi (index:Int, pname:Int):Int { return context.getVertexAttribIi (index, pname); @@ -2162,7 +2162,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getVertexAttribIiv (index:Int, pname:Int, params:DataPointer):Void { context.getVertexAttribIiv (index, pname, params); @@ -2171,7 +2171,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getVertexAttribIui (index:Int, pname:Int):Int { return context.getVertexAttribIui (index, pname); @@ -2180,7 +2180,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getVertexAttribIuiv (index:Int, pname:Int, params:DataPointer):Void { context.getVertexAttribIuiv (index, pname, params); @@ -2189,7 +2189,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getVertexAttribiv (index:Int, pname:Int, params:DataPointer):Void { context.getVertexAttribiv (index, pname, params); @@ -2198,7 +2198,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function getVertexAttribOffset (index:Int, pname:Int):DataPointer { return context.getVertexAttribOffset (index, pname); @@ -2207,7 +2207,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function getVertexAttribPointerv (index:Int, pname:Int):DataPointer { return context.getVertexAttribPointerv (index, pname); @@ -2342,7 +2342,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function mapBufferRange (target:Int, offset:DataPointer, length:Int, access:Int):DataPointer { return context.mapBufferRange (target, offset, length, access); @@ -2372,7 +2372,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function programBinary (program:GLProgram, binaryFormat:Int, binary:DataPointer, length:Int):Void { context.programBinary (program, binaryFormat, binary, length); @@ -2381,7 +2381,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function programParameteri (program:GLProgram, pname:Int, value:Int):Void { context.programParameteri (program, pname, value); @@ -2397,7 +2397,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function readPixels (x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:BytePointer):Void { context.readPixels (x, y, width, height, format, type, pixels); @@ -2406,7 +2406,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function readPixelsWEBGL (x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:Dynamic, ?dstOffset:Int):Void { context.readPixels (x, y, width, height, format, type, pixels, dstOffset); @@ -2415,7 +2415,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function releaseShaderCompiler ():Void { context.releaseShaderCompiler (); @@ -2473,7 +2473,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function shaderBinary (shaders:Array, binaryformat:Int, binary:DataPointer, length:Int):Void { context.shaderBinary (shaders, binaryformat, binary, length); @@ -2531,7 +2531,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function texImage2D (target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int, type:Int, data:DataPointer):Void { context.texImage2D (target, level, internalformat, width, height, border, format, type, data); @@ -2540,7 +2540,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function texImage2DWEBGL (target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Dynamic, ?format:Int, ?type:Int, ?srcData:Dynamic, ?srcOffset:Int):Void { context.texImage2D (target, level, internalformat, width, height, border, format, type, srcData, srcOffset); @@ -2549,7 +2549,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function texImage3D (target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, format:Int, type:Int, data:DataPointer):Void { context.texImage3D (target, level, internalformat, width, height, depth, border, format, type, data); @@ -2558,7 +2558,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function texImage3DWEBGL (target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, format:Int, type:Int, srcData:Dynamic, ?srcOffset:Int):Void { context.texImage3D (target, level, internalformat, width, height, depth, border, format, type, srcData, srcOffset); @@ -2595,7 +2595,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function texSubImage2D (target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, type:Int, pixels:ArrayBufferView):Void { context.texSubImage2D (target, level, xoffset, yoffset, width, height, format, type, pixels); @@ -2604,7 +2604,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function texSubImage2DWEBGL (target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Dynamic, ?type:Int, ?srcData:Dynamic, ?srcOffset:Int):Void { context.texSubImage2D (target, level, xoffset, yoffset, width, height, format, type, srcData, srcOffset); @@ -2613,7 +2613,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function texSubImage3D (target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int, format:Int, type:Int, data:DataPointer):Void { context.texSubImage3D (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); @@ -2622,7 +2622,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function texSubImage3DWEBGL (target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, width:Int, height:Int, depth:Int, format:Int, type:Int, source:Dynamic, ?srcOffset:Int):Void { context.texSubImage3D (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, source, srcOffset); @@ -2645,7 +2645,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform1fv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform1fv (location, count, v); @@ -2654,7 +2654,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform1fvWEBGL (location:GLUniformLocation, data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform1fv (location, data, srcOffset, srcLength); @@ -2670,7 +2670,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform1iv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform1iv (location, count, v); @@ -2679,7 +2679,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform1ivWEBGL (location:GLUniformLocation, ?data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform1iv (location, data, srcOffset, srcLength); @@ -2695,7 +2695,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform1uiv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform1uiv (location, count, v); @@ -2704,7 +2704,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform1uivWEBGL (location:GLUniformLocation, data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform1uiv (location, data, srcOffset, srcLength); @@ -2720,7 +2720,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform2fv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform2fv (location, count, v); @@ -2729,7 +2729,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform2fvWEBGL (location:GLUniformLocation, data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform2fv (location, data, srcOffset, srcLength); @@ -2745,7 +2745,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform2iv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform2iv (location, count, v); @@ -2754,7 +2754,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform2ivWEBGL (location:GLUniformLocation, data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform2iv (location, data, srcOffset, srcLength); @@ -2770,7 +2770,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform2uiv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform2uiv (location, count, v); @@ -2779,7 +2779,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform2uivWEBGL (location:GLUniformLocation, data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform2uiv (location, data, srcOffset, srcLength); @@ -2795,7 +2795,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform3fv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform3fv (location, count, v); @@ -2804,7 +2804,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform3fvWEBGL (location:GLUniformLocation, data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform3fv (location, data, srcOffset, srcLength); @@ -2820,7 +2820,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform3iv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform3iv (location, count, v); @@ -2829,7 +2829,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform3ivWEBGL (location:GLUniformLocation, data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform3iv (location, data, srcOffset, srcLength); @@ -2845,7 +2845,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform3uiv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform3uiv (location, count, v); @@ -2854,7 +2854,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform3uivWEBGL (location:GLUniformLocation, data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform3uiv (location, data, srcOffset, srcLength); @@ -2870,7 +2870,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform4fv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform4fv (location, count, v); @@ -2879,7 +2879,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform4fvWEBGL (location:GLUniformLocation, data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform4fv (location, data, srcOffset, srcLength); @@ -2895,7 +2895,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform4iv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform4iv (location, count, v); @@ -2904,7 +2904,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform4ivWEBGL (location:GLUniformLocation, data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform4iv (location, data, srcOffset, srcLength); @@ -2920,7 +2920,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniform4uiv (location:GLUniformLocation, count:Int, v:DataPointer):Void { context.uniform4uiv (location, count, v); @@ -2929,7 +2929,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniform4uivWEBGL (location:GLUniformLocation, data:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniform4uiv (location, data, srcOffset, srcLength); @@ -2945,7 +2945,7 @@ class GL { } - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniformMatrix2fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { context.uniformMatrix2fv (location, count, transpose, v); @@ -2954,7 +2954,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniformMatrix2fvWEBGL (location:GLUniformLocation, transpose:Bool, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniformMatrix2fv (location, transpose, v, srcOffset, srcLength); @@ -2963,7 +2963,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniformMatrix2x3fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { context.uniformMatrix2x3fv (location, count, transpose, v); @@ -2972,7 +2972,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniformMatrix2x3fvWEBGL (location:GLUniformLocation, transpose:Bool, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniformMatrix2x3fv (location, transpose, v, srcOffset, srcLength); @@ -2981,7 +2981,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniformMatrix2x4fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { context.uniformMatrix2x4fv (location, count, transpose, v); @@ -2990,7 +2990,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniformMatrix2x4fvWEBGL (location:GLUniformLocation, transpose:Bool, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniformMatrix2x4fv (location, transpose, v, srcOffset, srcLength); @@ -2999,7 +2999,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniformMatrix3fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { context.uniformMatrix3fv (location, count, transpose, v); @@ -3008,7 +3008,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniformMatrix3fvWEBGL (location:GLUniformLocation, transpose:Bool, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniformMatrix3fv (location, transpose, v, srcOffset, srcLength); @@ -3017,7 +3017,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniformMatrix3x2fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { context.uniformMatrix3x2fv (location, count, transpose, v); @@ -3026,7 +3026,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniformMatrix3x2fvWEBGL (location:GLUniformLocation, transpose:Bool, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniformMatrix3x2fv (location, transpose, v, srcOffset, srcLength); @@ -3035,7 +3035,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniformMatrix3x4fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { context.uniformMatrix3x4fv (location, count, transpose, v); @@ -3044,7 +3044,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniformMatrix3x4fvWEBGL (location:GLUniformLocation, transpose:Bool, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniformMatrix3x4fv (location, transpose, v, srcOffset, srcLength); @@ -3053,7 +3053,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniformMatrix4fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { context.uniformMatrix4fv (location, count, transpose, v); @@ -3062,7 +3062,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniformMatrix4fvWEBGL (location:GLUniformLocation, transpose:Bool, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniformMatrix4fv (location, transpose, v, srcOffset, srcLength); @@ -3071,7 +3071,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniformMatrix4x2fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { context.uniformMatrix4x2fv (location, count, transpose, v); @@ -3080,7 +3080,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniformMatrix4x2fvWEBGL (location:GLUniformLocation, transpose:Bool, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniformMatrix4x2fv (location, transpose, v, srcOffset, srcLength); @@ -3089,7 +3089,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function uniformMatrix4x3fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { context.uniformMatrix4x3fv (location, count, transpose, v); @@ -3098,7 +3098,7 @@ class GL { #end - #if (js && html5) + #if lime_webgl public static inline function uniformMatrix4x3fvWEBGL (location:GLUniformLocation, transpose:Dynamic, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void { context.uniformMatrix4x3fv (location, transpose, v, srcOffset, srcLength); @@ -3107,7 +3107,7 @@ class GL { #end - #if sys + #if (lime_opengl || lime_opengles) public static inline function unmapBuffer (target:Int):Bool { return context.unmapBuffer (target); @@ -3139,12 +3139,14 @@ class GL { public static inline function vertexAttrib1fv (index:Int, v:DataPointer):Void { + #if !doc_gen context.vertexAttrib1fv (index, v); + #end } - #if (js && html5) + #if lime_webgl public static inline function vertexAttrib1fvWEBGL (index:Int, v:Dynamic):Void { context.vertexAttrib1fv (index, v); @@ -3162,12 +3164,14 @@ class GL { public static inline function vertexAttrib2fv (index:Int, v:DataPointer):Void { + #if !doc_gen context.vertexAttrib2fv (index, v); + #end } - #if (js && html5) + #if lime_webgl public static inline function vertexAttrib2fvWEBGL (index:Int, v:Dynamic):Void { context.vertexAttrib2fv (index, v); @@ -3185,12 +3189,14 @@ class GL { public static inline function vertexAttrib3fv (index:Int, v:DataPointer):Void { + #if !doc_gen context.vertexAttrib3fv (index, v); + #end } - #if (js && html5) + #if lime_webgl public static inline function vertexAttrib3fvWEBGL (index:Int, v:Dynamic):Void { context.vertexAttrib3fv (index, v); @@ -3208,12 +3214,14 @@ class GL { public static inline function vertexAttrib4fv (index:Int, v:DataPointer):Void { + #if !doc_gen context.vertexAttrib4fv (index, v); + #end } - #if (js && html5) + #if lime_webgl public static inline function vertexAttrib4fvWEBGL (index:Int, v:Dynamic):Void { context.vertexAttrib4fv (index, v); @@ -3238,12 +3246,14 @@ class GL { public static inline function vertexAttribI4iv (index:Int, v:DataPointer):Void { + #if !doc_gen context.vertexAttribI4iv (index, v); + #end } - #if (js && html5) + #if lime_webgl public static inline function vertexAttribI4ivWEBGL (index:Int, v:Dynamic):Void { context.vertexAttribI4iv (index, v); @@ -3261,12 +3271,14 @@ class GL { public static inline function vertexAttribI4uiv (index:Int, v:DataPointer):Void { + #if !doc_gen context.vertexAttribI4uiv (index, v); + #end } - #if (js && html5) + #if lime_webgl public static inline function vertexAttribI4uivWEBGL (index:Int, v:Dynamic):Void { context.vertexAttribI4uiv (index, v); @@ -3373,4 +3385,7 @@ class GL { var TRANSFORM_FEEDBACK = 11; } +#end + + #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLActiveInfo.hx b/src/lime/graphics/opengl/GLActiveInfo.hx index f29619c5b..c2b3c0fc8 100644 --- a/src/lime/graphics/opengl/GLActiveInfo.hx +++ b/src/lime/graphics/opengl/GLActiveInfo.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if (!js || !html5) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if (!lime_webgl || display) #if !lime_debug @@ -18,4 +19,5 @@ typedef GLActiveInfo = { #else typedef GLActiveInfo = js.html.webgl.ActiveInfo; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLBuffer.hx b/src/lime/graphics/opengl/GLBuffer.hx index 9291a250e..1e28d0af8 100644 --- a/src/lime/graphics/opengl/GLBuffer.hx +++ b/src/lime/graphics/opengl/GLBuffer.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if ((lime_opengl || lime_opengles) && !display) import lime.graphics.opengl.GL; @@ -19,9 +20,9 @@ abstract GLBuffer(GLObject) from GLObject to GLObject { } -#else +#elseif (lime_webgl && !display) typedef GLBuffer = js.html.webgl.Buffer; -#end #else typedef GLBuffer = Dynamic; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLContextAttributes.hx b/src/lime/graphics/opengl/GLContextAttributes.hx index 5672f04d4..47250f7e8 100644 --- a/src/lime/graphics/opengl/GLContextAttributes.hx +++ b/src/lime/graphics/opengl/GLContextAttributes.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if (!js || !html5) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if (!lime_webgl || display) #if !lime_debug @@ -21,4 +22,5 @@ typedef GLContextAttributes = { #else typedef GLContextAttributes = js.html.webgl.ContextAttributes; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLFramebuffer.hx b/src/lime/graphics/opengl/GLFramebuffer.hx index 12bc3f7cf..219b13759 100644 --- a/src/lime/graphics/opengl/GLFramebuffer.hx +++ b/src/lime/graphics/opengl/GLFramebuffer.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if ((lime_opengl || lime_opengles) && !display) import lime.graphics.opengl.GL; @@ -19,9 +20,9 @@ abstract GLFramebuffer(GLObject) from GLObject to GLObject { } -#else +#elseif (lime_webgl && !display) typedef GLFramebuffer = js.html.webgl.Framebuffer; -#end #else typedef GLFramebuffer = Dynamic; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLProgram.hx b/src/lime/graphics/opengl/GLProgram.hx index ed5e3531a..2d7596c9c 100644 --- a/src/lime/graphics/opengl/GLProgram.hx +++ b/src/lime/graphics/opengl/GLProgram.hx @@ -1,5 +1,5 @@ -package lime.graphics.opengl; #if lime_opengl - +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if !display import lime.graphics.opengl.GL; import lime.graphics.opengl.GLShader; @@ -7,14 +7,14 @@ import lime.graphics.WebGLRenderContext; import lime.utils.Log; -#if (!js || !html5 || display) +#if !lime_webgl @:forward(id, refs) abstract GLProgram(GLObject) from GLObject to GLObject { #else @:forward() abstract GLProgram(js.html.webgl.Program) from js.html.webgl.Program to js.html.webgl.Program { #end - #if (!js || !html5 || display) + #if !lime_webgl @:from private static function fromInt (id:Int):GLProgram { return GLObject.fromInt (PROGRAM, id); @@ -50,6 +50,8 @@ import lime.utils.Log; #else + + @:forward abstract GLProgram(Dynamic) from Dynamic to Dynamic { public static function fromSources (gl:Dynamic, vertexSource:String, fragmentSource:String):GLProgram { @@ -59,4 +61,7 @@ import lime.utils.Log; } } + + +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLQuery.hx b/src/lime/graphics/opengl/GLQuery.hx index ce183988c..b4dcda9de 100644 --- a/src/lime/graphics/opengl/GLQuery.hx +++ b/src/lime/graphics/opengl/GLQuery.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if ((lime_opengl || lime_opengles) && !display) import lime.graphics.opengl.GL; @@ -19,10 +20,10 @@ abstract GLQuery(GLObject) from GLObject to GLObject { } -#else +#elseif (lime_webgl && !display) @:native("WebGLQuery") extern class GLQuery {} -#end #else typedef GLQuery = Dynamic; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLRenderbuffer.hx b/src/lime/graphics/opengl/GLRenderbuffer.hx index 836ab6a65..c221f39a0 100644 --- a/src/lime/graphics/opengl/GLRenderbuffer.hx +++ b/src/lime/graphics/opengl/GLRenderbuffer.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if ((lime_opengl || lime_opengles) && !display) import lime.graphics.opengl.GL; @@ -19,9 +20,9 @@ abstract GLRenderbuffer(GLObject) from GLObject to GLObject { } -#else +#elseif (lime_webgl && !display) typedef GLRenderbuffer = js.html.webgl.Renderbuffer; -#end #else typedef GLRenderbuffer = Dynamic; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLSampler.hx b/src/lime/graphics/opengl/GLSampler.hx index 3e0712159..ec7cb8855 100644 --- a/src/lime/graphics/opengl/GLSampler.hx +++ b/src/lime/graphics/opengl/GLSampler.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if ((lime_opengl || lime_opengles) && !display) import lime.graphics.opengl.GL; @@ -19,10 +20,10 @@ abstract GLSampler(GLObject) from GLObject to GLObject { } -#else +#elseif (lime_webgl && !display) @:native("WebGLSampler") extern class GLSampler {} -#end #else typedef GLSampler = Dynamic; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLShader.hx b/src/lime/graphics/opengl/GLShader.hx index 638036041..6a2d16094 100644 --- a/src/lime/graphics/opengl/GLShader.hx +++ b/src/lime/graphics/opengl/GLShader.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if lime_opengl +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if !display import lime.graphics.opengl.GL; @@ -6,14 +7,14 @@ import lime.graphics.WebGLRenderContext; import lime.utils.Log; -#if (!js || !html5 || display) +#if !lime_webgl @:forward(id) abstract GLShader(GLObject) from GLObject to GLObject { #else @:forward() abstract GLShader(js.html.webgl.Shader) from js.html.webgl.Shader to js.html.webgl.Shader { #end - #if (!js || !html5 || display) + #if !lime_webgl @:from private static function fromInt (id:Int):GLShader { return GLObject.fromInt (SHADER, id); @@ -50,6 +51,8 @@ import lime.utils.Log; #else + + @:forward abstract GLShader(Dynamic) from Dynamic to Dynamic { public static function fromSources (gl:Dynamic, source:String, type:Int):GLShader { @@ -59,4 +62,7 @@ import lime.utils.Log; } } + + +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLShaderPrecisionFormat.hx b/src/lime/graphics/opengl/GLShaderPrecisionFormat.hx index 4119ee9b5..06ccd46a8 100644 --- a/src/lime/graphics/opengl/GLShaderPrecisionFormat.hx +++ b/src/lime/graphics/opengl/GLShaderPrecisionFormat.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if (!lime_webgl || display) #if !lime_debug @@ -18,4 +19,5 @@ typedef GLShaderPrecisionFormat = { #else typedef GLShaderPrecisionFormat = js.html.webgl.ShaderPrecisionFormat; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLSync.hx b/src/lime/graphics/opengl/GLSync.hx index 19166ed63..3d5b1e71c 100644 --- a/src/lime/graphics/opengl/GLSync.hx +++ b/src/lime/graphics/opengl/GLSync.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if ((lime_opengl || lime_opengles) && !display) import lime._internal.backend.native.NativeCFFI; @@ -14,10 +15,10 @@ abstract GLSync(CFFIPointer) from CFFIPointer to CFFIPointer { } -#else +#elseif (lime_webgl && !display) @:native("WebGLSync") extern class GLSync {} -#end #else typedef GLSync = Dynamic; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLTexture.hx b/src/lime/graphics/opengl/GLTexture.hx index facf5e1a9..b838974f9 100644 --- a/src/lime/graphics/opengl/GLTexture.hx +++ b/src/lime/graphics/opengl/GLTexture.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if ((lime_opengl || lime_opengles) && !display) import lime.graphics.opengl.GL; @@ -19,9 +20,9 @@ abstract GLTexture(GLObject) from GLObject to GLObject { } -#else +#elseif (lime_webgl && !display) typedef GLTexture = js.html.webgl.Texture; -#end #else typedef GLTexture = Dynamic; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLTransformFeedback.hx b/src/lime/graphics/opengl/GLTransformFeedback.hx index b8c855600..1fe636243 100644 --- a/src/lime/graphics/opengl/GLTransformFeedback.hx +++ b/src/lime/graphics/opengl/GLTransformFeedback.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if ((lime_opengl || lime_opengles) && !display) import lime.graphics.opengl.GL; @@ -19,10 +20,10 @@ abstract GLTransformFeedback(GLObject) from GLObject to GLObject { } -#else +#elseif (lime_webgl && !display) @:native("WebGLTransformFeedback") extern class GLTransformFeedback {} -#end #else typedef GLTransformFeedback = Dynamic; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLUniformLocation.hx b/src/lime/graphics/opengl/GLUniformLocation.hx index df134315d..cbd106c3d 100644 --- a/src/lime/graphics/opengl/GLUniformLocation.hx +++ b/src/lime/graphics/opengl/GLUniformLocation.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if (!js || !html5 || display) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if (!lime_webgl || display) typedef GLUniformLocation = Int; @@ -6,4 +7,5 @@ typedef GLUniformLocation = Int; #else typedef GLUniformLocation = js.html.webgl.UniformLocation; +#end #end \ No newline at end of file diff --git a/src/lime/graphics/opengl/GLVertexArrayObject.hx b/src/lime/graphics/opengl/GLVertexArrayObject.hx index 5efe35973..f8f413ab6 100644 --- a/src/lime/graphics/opengl/GLVertexArrayObject.hx +++ b/src/lime/graphics/opengl/GLVertexArrayObject.hx @@ -1,4 +1,5 @@ -package lime.graphics.opengl; #if lime_opengl #if (!js || !html5 || display) +package lime.graphics.opengl; #if (!lime_doc_gen || lime_opengl || lime_opengles || lime_webgl) +#if ((lime_opengl || lime_opengles) && !display) import lime.graphics.opengl.GL; @@ -19,10 +20,10 @@ abstract GLVertexArrayObject(GLObject) from GLObject to GLObject { } -#else +#elseif (lime_webgl && !display) @:native("WebGLVertexArrayObject") extern class GLVertexArrayObject {} -#end #else typedef GLVertexArrayObject = Dynamic; +#end #end \ No newline at end of file