From 095fce9d78070d8c335e0de90abb54fdde725e3b Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Mon, 23 Jul 2018 15:42:37 -0700 Subject: [PATCH] GLES fix --- .../backend/native/NativeApplication.hx | 2 +- .../_internal/backend/native/NativeCFFI.hx | 2 +- .../native/NativeOpenGLRenderContext.hx | 536 +++++++++--------- .../_internal/backend/native/NativeWindow.hx | 2 +- src/lime/graphics/opengl/GL.hx | 2 +- 5 files changed, 272 insertions(+), 272 deletions(-) diff --git a/src/lime/_internal/backend/native/NativeApplication.hx b/src/lime/_internal/backend/native/NativeApplication.hx index f9be77114..e9cc57f8a 100644 --- a/src/lime/_internal/backend/native/NativeApplication.hx +++ b/src/lime/_internal/backend/native/NativeApplication.hx @@ -446,7 +446,7 @@ class NativeApplication { case OPENGL, OPENGLES, WEBGL: - #if (lime_cffi && lime_opengl && !display) + #if (lime_cffi && (lime_opengl || lime_opengles) && !display) var gl = window.context.gl; (gl:NativeOpenGLRenderContext).__contextLost (); if (GL.context == gl) GL.context = null; diff --git a/src/lime/_internal/backend/native/NativeCFFI.hx b/src/lime/_internal/backend/native/NativeCFFI.hx index cc384eda3..1cd8320e4 100644 --- a/src/lime/_internal/backend/native/NativeCFFI.hx +++ b/src/lime/_internal/backend/native/NativeCFFI.hx @@ -1781,7 +1781,7 @@ class NativeCFFI { #end - #if (lime_cffi && !macro && lime_opengl) + #if (lime_cffi && !macro && (lime_opengl || lime_opengles)) #if cpp #if (disable_cffi || haxe_ver < "3.4.0") diff --git a/src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx b/src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx index ec0a88741..80033ca5a 100644 --- a/src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx +++ b/src/lime/_internal/backend/native/NativeOpenGLRenderContext.hx @@ -705,7 +705,7 @@ class NativeOpenGLRenderContext { __initialize (); - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var versionString:String = getParameter (VERSION); if (versionString.indexOf ("OpenGL ES") > -1) { type = OPENGLES; @@ -728,7 +728,7 @@ class NativeOpenGLRenderContext { public function activeTexture (texture:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_active_texture (texture); #end @@ -751,7 +751,7 @@ class NativeOpenGLRenderContext { } - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_attach_shader (__getObjectID (program), __getObjectID (shader)); #end @@ -760,7 +760,7 @@ class NativeOpenGLRenderContext { public function beginQuery (target:Int, query:GLQuery):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_begin_query (target, __getObjectID (query)); #end @@ -769,7 +769,7 @@ class NativeOpenGLRenderContext { public function beginTransformFeedback (primitiveNode:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_begin_transform_feedback (primitiveNode); #end @@ -778,7 +778,7 @@ class NativeOpenGLRenderContext { public function bindAttribLocation (program:GLProgram, index:Int, name:String):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_bind_attrib_location (__getObjectID (program), index, name); #end @@ -790,7 +790,7 @@ class NativeOpenGLRenderContext { if (target == ARRAY_BUFFER) __arrayBufferBinding = buffer; if (target == ELEMENT_ARRAY_BUFFER) __elementBufferBinding = buffer; - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_bind_buffer (target, __getObjectID (buffer)); #end @@ -799,7 +799,7 @@ class NativeOpenGLRenderContext { public function bindBufferBase (target:Int, index:Int, buffer:GLBuffer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_bind_buffer_base (target, index, __getObjectID (buffer)); #end @@ -808,7 +808,7 @@ class NativeOpenGLRenderContext { public function bindBufferRange (target:Int, index:Int, buffer:GLBuffer, offset:DataPointer, size:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_bind_buffer_range (target, index, __getObjectID (buffer), offset, size); #end @@ -819,7 +819,7 @@ class NativeOpenGLRenderContext { __framebufferBinding = framebuffer; - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_bind_framebuffer (target, __getObjectID (framebuffer)); #end @@ -830,7 +830,7 @@ class NativeOpenGLRenderContext { __renderbufferBinding = renderbuffer; - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_bind_renderbuffer (target, __getObjectID (renderbuffer)); #end @@ -839,7 +839,7 @@ class NativeOpenGLRenderContext { public function bindSampler (unit:Int, sampler:GLSampler):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_bind_sampler (unit, __getObjectID (sampler)); #end @@ -851,7 +851,7 @@ class NativeOpenGLRenderContext { if (target == TEXTURE_2D) __texture2DBinding = texture; if (target == TEXTURE_CUBE_MAP) __textureCubeMapBinding = texture; - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_bind_texture (target, __getObjectID (texture)); #end @@ -860,7 +860,7 @@ class NativeOpenGLRenderContext { public function bindTransformFeedback (target:Int, transformFeedback:GLTransformFeedback):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_bind_transform_feedback (target, __getObjectID (transformFeedback)); #end @@ -869,7 +869,7 @@ class NativeOpenGLRenderContext { public function bindVertexArray (vertexArray:GLVertexArrayObject):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_bind_vertex_array (__getObjectID (vertexArray)); #end @@ -878,7 +878,7 @@ class NativeOpenGLRenderContext { public function blendColor (red:Float, green:Float, blue:Float, alpha:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_blend_color (red, green, blue, alpha); #end @@ -887,7 +887,7 @@ class NativeOpenGLRenderContext { public function blendEquation (mode:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_blend_equation (mode); #end @@ -896,7 +896,7 @@ class NativeOpenGLRenderContext { public function blendEquationSeparate (modeRGB:Int, modeAlpha:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_blend_equation_separate (modeRGB, modeAlpha); #end @@ -905,7 +905,7 @@ class NativeOpenGLRenderContext { public function blendFunc (sfactor:Int, dfactor:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_blend_func (sfactor, dfactor); #end @@ -914,7 +914,7 @@ class NativeOpenGLRenderContext { public function blendFuncSeparate (srcRGB:Int, dstRGB:Int, srcAlpha:Int, dstAlpha:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_blend_func_separate (srcRGB, dstRGB, srcAlpha, dstAlpha); #end @@ -923,7 +923,7 @@ class NativeOpenGLRenderContext { public function blitFramebuffer (srcX0:Int, srcY0:Int, srcX1:Int, srcY1:Int, dstX0:Int, dstY0:Int, dstX1:Int, dstY1:Int, mask:Int, filter:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_blit_framebuffer (srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, mask, filter); #end @@ -932,7 +932,7 @@ class NativeOpenGLRenderContext { public function bufferData (target:Int, size:Int, srcData:DataPointer, usage:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_buffer_data (target, size, srcData, usage); #end @@ -941,7 +941,7 @@ class NativeOpenGLRenderContext { public function bufferSubData (target:Int, dstByteOffset:Int, size:Int, srcData:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_buffer_sub_data (target, dstByteOffset, size, srcData); #end @@ -950,7 +950,7 @@ class NativeOpenGLRenderContext { public function checkFramebufferStatus (target:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_check_framebuffer_status (target); #else return 0; @@ -961,7 +961,7 @@ class NativeOpenGLRenderContext { public function clear (mask:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_clear (mask); #end @@ -970,7 +970,7 @@ class NativeOpenGLRenderContext { public function clearBufferfi (buffer:Int, drawbuffer:Int, depth:Float, stencil:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_clear_bufferfi (buffer, drawbuffer, depth, stencil); #end @@ -979,7 +979,7 @@ class NativeOpenGLRenderContext { public function clearBufferfv (buffer:Int, drawbuffer:Int, value:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_clear_bufferfv (buffer, drawbuffer, value); #end @@ -988,7 +988,7 @@ class NativeOpenGLRenderContext { public function clearBufferiv (buffer:Int, drawbuffer:Int, value:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_clear_bufferiv (buffer, drawbuffer, value); #end @@ -997,7 +997,7 @@ class NativeOpenGLRenderContext { public function clearBufferuiv (buffer:Int, drawbuffer:Int, value:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_clear_bufferuiv (buffer, drawbuffer, value); #end @@ -1006,7 +1006,7 @@ class NativeOpenGLRenderContext { public function clearColor (red:Float, green:Float, blue:Float, alpha:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_clear_color (red, green, blue, alpha); #end @@ -1015,7 +1015,7 @@ class NativeOpenGLRenderContext { public function clearDepthf (depth:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_clear_depthf (depth); #end @@ -1024,7 +1024,7 @@ class NativeOpenGLRenderContext { public function clearStencil (s:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_clear_stencil (s); #end @@ -1033,7 +1033,7 @@ class NativeOpenGLRenderContext { public function clientWaitSync (sync:GLSync, flags:Int, timeout:Int64):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_client_wait_sync (sync, flags, timeout.high, timeout.low); #else return 0; @@ -1044,7 +1044,7 @@ class NativeOpenGLRenderContext { public function colorMask (red:Bool, green:Bool, blue:Bool, alpha:Bool):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_color_mask (red, green, blue, alpha); #end @@ -1053,7 +1053,7 @@ class NativeOpenGLRenderContext { public function compileShader (shader:GLShader):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_compile_shader (__getObjectID (shader)); #end @@ -1062,7 +1062,7 @@ class NativeOpenGLRenderContext { public function compressedTexImage2D (target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, imageSize:Int, data:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_compressed_tex_image_2d (target, level, internalformat, width, height, border, imageSize, data); #end @@ -1071,7 +1071,7 @@ class NativeOpenGLRenderContext { public function compressedTexImage3D (target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, imageSize:Int, data:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_compressed_tex_image_3d (target, level, internalformat, width, height, depth, border, imageSize, data); #end @@ -1080,7 +1080,7 @@ class NativeOpenGLRenderContext { public function compressedTexSubImage2D (target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, imageSize:Int, data:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_compressed_tex_sub_image_2d (target, level, xoffset, yoffset, width, height, format, imageSize, data); #end @@ -1089,7 +1089,7 @@ class NativeOpenGLRenderContext { public 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 { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_compressed_tex_sub_image_3d (target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); #end @@ -1098,7 +1098,7 @@ class NativeOpenGLRenderContext { public function copyBufferSubData (readTarget:Int, writeTarget:Int, readOffset:DataPointer, writeOffset:DataPointer, size:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_copy_buffer_sub_data (readTarget, writeTarget, readOffset, writeOffset, size); #end @@ -1107,7 +1107,7 @@ class NativeOpenGLRenderContext { public function copyTexImage2D (target:Int, level:Int, internalformat:Int, x:Int, y:Int, width:Int, height:Int, border:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_copy_tex_image_2d (target, level, internalformat, x, y, width, height, border); #end @@ -1116,7 +1116,7 @@ class NativeOpenGLRenderContext { public function copyTexSubImage2D (target:Int, level:Int, xoffset:Int, yoffset:Int, x:Int, y:Int, width:Int, height:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_copy_tex_sub_image_2d (target, level, xoffset, yoffset, x, y, width, height); #end @@ -1125,7 +1125,7 @@ class NativeOpenGLRenderContext { public function copyTexSubImage3D (target:Int, level:Int, xoffset:Int, yoffset:Int, zoffset:Int, x:Int, y:Int, width:Int, height:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_copy_tex_sub_image_3d (target, level, xoffset, yoffset, zoffset, x, y, width, height); #end @@ -1134,7 +1134,7 @@ class NativeOpenGLRenderContext { public function createBuffer ():GLBuffer { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var id = NativeCFFI.lime_gl_create_buffer (); if (id == 0) return null; var object = new GLObject (id); @@ -1149,7 +1149,7 @@ class NativeOpenGLRenderContext { public function createFramebuffer ():GLFramebuffer { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var id = NativeCFFI.lime_gl_create_framebuffer (); if (id == 0) return null; var object = new GLObject (id); @@ -1164,7 +1164,7 @@ class NativeOpenGLRenderContext { public function createProgram ():GLProgram { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var id = NativeCFFI.lime_gl_create_program (); if (id == 0) return null; var object = new GLObject (id); @@ -1179,7 +1179,7 @@ class NativeOpenGLRenderContext { public function createQuery ():GLQuery { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var id = NativeCFFI.lime_gl_create_query (); if (id == 0) return null; var object = new GLObject (id); @@ -1194,7 +1194,7 @@ class NativeOpenGLRenderContext { public function createRenderbuffer ():GLRenderbuffer { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var id = NativeCFFI.lime_gl_create_renderbuffer (); if (id == 0) return null; var object = new GLObject (id); @@ -1209,7 +1209,7 @@ class NativeOpenGLRenderContext { public function createSampler ():GLSampler { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var id = NativeCFFI.lime_gl_create_sampler (); if (id == 0) return null; var object = new GLObject (id); @@ -1224,7 +1224,7 @@ class NativeOpenGLRenderContext { public function createShader (type:Int):GLShader { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var id = NativeCFFI.lime_gl_create_shader (type); if (id == 0) return null; var object = new GLObject (id); @@ -1239,7 +1239,7 @@ class NativeOpenGLRenderContext { public function createTexture ():GLTexture { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var id = NativeCFFI.lime_gl_create_texture (); if (id == 0) return null; var object = new GLObject (id); @@ -1254,7 +1254,7 @@ class NativeOpenGLRenderContext { public function createTransformFeedback ():GLTransformFeedback { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var id = NativeCFFI.lime_gl_create_transform_feedback (); if (id == 0) return null; var object = new GLObject (id); @@ -1269,7 +1269,7 @@ class NativeOpenGLRenderContext { public function createVertexArray ():GLVertexArrayObject { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var id = NativeCFFI.lime_gl_create_vertex_array (); if (id == 0) return null; var object = new GLObject (id); @@ -1284,7 +1284,7 @@ class NativeOpenGLRenderContext { public function cullFace (mode:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_cull_face (mode); #end @@ -1293,7 +1293,7 @@ class NativeOpenGLRenderContext { public function deleteBuffer (buffer:GLBuffer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) if (buffer != null) NativeCFFI.lime_gl_object_deregister (buffer); NativeCFFI.lime_gl_delete_buffer (__getObjectID (buffer)); #end @@ -1303,7 +1303,7 @@ class NativeOpenGLRenderContext { public function deleteFramebuffer (framebuffer:GLFramebuffer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) if (framebuffer != null) NativeCFFI.lime_gl_object_deregister (framebuffer); NativeCFFI.lime_gl_delete_framebuffer (__getObjectID (framebuffer)); #end @@ -1313,7 +1313,7 @@ class NativeOpenGLRenderContext { public function deleteProgram (program:GLProgram):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) if (program != null) NativeCFFI.lime_gl_object_deregister (program); NativeCFFI.lime_gl_delete_program (__getObjectID (program)); #end @@ -1323,7 +1323,7 @@ class NativeOpenGLRenderContext { public function deleteQuery (query:GLQuery):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) if (query != null) NativeCFFI.lime_gl_object_deregister (query); NativeCFFI.lime_gl_delete_query (__getObjectID (query)); #end @@ -1333,7 +1333,7 @@ class NativeOpenGLRenderContext { public function deleteRenderbuffer (renderbuffer:GLRenderbuffer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) if (renderbuffer != null) NativeCFFI.lime_gl_object_deregister (renderbuffer); NativeCFFI.lime_gl_delete_renderbuffer (__getObjectID (renderbuffer)); #end @@ -1343,7 +1343,7 @@ class NativeOpenGLRenderContext { public function deleteSampler (sampler:GLSampler):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) if (sampler != null) NativeCFFI.lime_gl_object_deregister (sampler); NativeCFFI.lime_gl_delete_sampler (__getObjectID (sampler)); #end @@ -1353,7 +1353,7 @@ class NativeOpenGLRenderContext { public function deleteShader (shader:GLShader):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) if (shader != null) NativeCFFI.lime_gl_object_deregister (shader); NativeCFFI.lime_gl_delete_shader (__getObjectID (shader)); #end @@ -1363,7 +1363,7 @@ class NativeOpenGLRenderContext { public function deleteSync (sync:GLSync):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_delete_sync (sync); #end @@ -1372,7 +1372,7 @@ class NativeOpenGLRenderContext { public function deleteTexture (texture:GLTexture):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) if (texture != null) NativeCFFI.lime_gl_object_deregister (texture); NativeCFFI.lime_gl_delete_texture (__getObjectID (texture)); #end @@ -1382,7 +1382,7 @@ class NativeOpenGLRenderContext { public function deleteTransformFeedback (transformFeedback:GLTransformFeedback):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) if (transformFeedback != null) NativeCFFI.lime_gl_object_deregister (transformFeedback); NativeCFFI.lime_gl_delete_transform_feedback (__getObjectID (transformFeedback)); #end @@ -1392,7 +1392,7 @@ class NativeOpenGLRenderContext { public function deleteVertexArray (vertexArray:GLVertexArrayObject):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) if (vertexArray != null) NativeCFFI.lime_gl_object_deregister (vertexArray); NativeCFFI.lime_gl_delete_vertex_array (__getObjectID (vertexArray)); #end @@ -1402,7 +1402,7 @@ class NativeOpenGLRenderContext { public function depthFunc (func:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_depth_func (func); #end @@ -1411,7 +1411,7 @@ class NativeOpenGLRenderContext { public function depthMask (flag:Bool):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_depth_mask (flag); #end @@ -1420,7 +1420,7 @@ class NativeOpenGLRenderContext { public function depthRangef (zNear:Float, zFar:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_depth_rangef (zNear, zFar); #end @@ -1435,7 +1435,7 @@ class NativeOpenGLRenderContext { } - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_detach_shader (__getObjectID (program), __getObjectID (shader)); #end @@ -1444,7 +1444,7 @@ class NativeOpenGLRenderContext { public function disable (cap:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_disable (cap); #end @@ -1453,7 +1453,7 @@ class NativeOpenGLRenderContext { public function disableVertexAttribArray (index:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_disable_vertex_attrib_array (index); #end @@ -1462,7 +1462,7 @@ class NativeOpenGLRenderContext { public function drawArrays (mode:Int, first:Int, count:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_draw_arrays (mode, first, count); #end @@ -1471,7 +1471,7 @@ class NativeOpenGLRenderContext { public function drawArraysInstanced (mode:Int, first:Int, count:Int, instanceCount:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_draw_arrays_instanced (mode, first, count, instanceCount); #end @@ -1480,7 +1480,7 @@ class NativeOpenGLRenderContext { public function drawBuffers (buffers:Array):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) #if hl var _buffers = new hl.NativeArray (buffers.length); for (i in 0...buffers.length) _buffers[i] = buffers[i]; @@ -1494,7 +1494,7 @@ class NativeOpenGLRenderContext { public function drawElements (mode:Int, count:Int, type:Int, offset:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_draw_elements (mode, count, type, offset); #end @@ -1503,7 +1503,7 @@ class NativeOpenGLRenderContext { public function drawElementsInstanced (mode:Int, count:Int, type:Int, offset:DataPointer, instanceCount:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_draw_elements_instanced (mode, count, type, offset, instanceCount); #end @@ -1512,7 +1512,7 @@ class NativeOpenGLRenderContext { public function drawRangeElements (mode:Int, start:Int, end:Int, count:Int, type:Int, offset:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_draw_range_elements (mode, start, end, count, type, offset); #end @@ -1521,7 +1521,7 @@ class NativeOpenGLRenderContext { public function enable (cap:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_enable (cap); #end @@ -1530,7 +1530,7 @@ class NativeOpenGLRenderContext { public function enableVertexAttribArray (index:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_enable_vertex_attrib_array (index); #end @@ -1539,7 +1539,7 @@ class NativeOpenGLRenderContext { public function endQuery (target:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_end_query (target); #end @@ -1548,7 +1548,7 @@ class NativeOpenGLRenderContext { public function endTransformFeedback ():Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_end_transform_feedback (); #end @@ -1557,7 +1557,7 @@ class NativeOpenGLRenderContext { public function fenceSync (condition:Int, flags:Int):GLSync { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_fence_sync (condition, flags); #else return null; @@ -1568,7 +1568,7 @@ class NativeOpenGLRenderContext { public function finish ():Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_finish (); #end @@ -1577,7 +1577,7 @@ class NativeOpenGLRenderContext { public function flush ():Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_flush (); #end @@ -1586,7 +1586,7 @@ class NativeOpenGLRenderContext { public function framebufferRenderbuffer (target:Int, attachment:Int, renderbuffertarget:Int, renderbuffer:GLRenderbuffer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_framebuffer_renderbuffer (target, attachment, renderbuffertarget, __getObjectID (renderbuffer)); #end @@ -1595,7 +1595,7 @@ class NativeOpenGLRenderContext { public function framebufferTexture2D (target:Int, attachment:Int, textarget:Int, texture:GLTexture, level:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_framebuffer_texture2D (target, attachment, textarget, __getObjectID (texture), level); #end @@ -1604,7 +1604,7 @@ class NativeOpenGLRenderContext { public function framebufferTextureLayer (target:Int, attachment:Int, texture:GLTexture, level:Int, layer:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_framebuffer_texture_layer (target, attachment, __getObjectID (texture), level, layer); #end @@ -1613,7 +1613,7 @@ class NativeOpenGLRenderContext { public function frontFace (mode:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_front_face (mode); #end @@ -1622,7 +1622,7 @@ class NativeOpenGLRenderContext { public function generateMipmap (target:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_generate_mipmap (target); #end @@ -1631,7 +1631,7 @@ class NativeOpenGLRenderContext { public function getActiveAttrib (program:GLProgram, index:Int):GLActiveInfo { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) #if hl var object:{ size:Int, type:Int, name:hl.Bytes } = { size: 0, type: 0, name: null }; return NativeCFFI.lime_gl_get_active_attrib (__getObjectID (program), index, object); @@ -1647,7 +1647,7 @@ class NativeOpenGLRenderContext { public function getActiveUniform (program:GLProgram, index:Int):GLActiveInfo { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) #if hl var object:{ size:Int, type:Int, name:hl.Bytes } = { size: 0, type: 0, name: null }; return NativeCFFI.lime_gl_get_active_uniform (__getObjectID (program), index, object); @@ -1663,7 +1663,7 @@ class NativeOpenGLRenderContext { public function getActiveUniformBlocki (program:GLProgram, uniformBlockIndex:Int, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_active_uniform_blocki (__getObjectID (program), uniformBlockIndex, pname); #else return 0; @@ -1674,7 +1674,7 @@ class NativeOpenGLRenderContext { public function getActiveUniformBlockiv (program:GLProgram, uniformBlockIndex:Int, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_active_uniform_blockiv (__getObjectID (program), uniformBlockIndex, pname, params); #end @@ -1683,7 +1683,7 @@ class NativeOpenGLRenderContext { public function getActiveUniformBlockName (program:GLProgram, uniformBlockIndex:Int):String { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var result = NativeCFFI.lime_gl_get_active_uniform_block_name (__getObjectID (program), uniformBlockIndex); #if hl var result = @:privateAccess String.fromUTF8 (result); @@ -1716,7 +1716,7 @@ class NativeOpenGLRenderContext { public function getActiveUniformsiv (program:GLProgram, uniformIndices:Array, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) #if hl var _uniformIndices = new hl.NativeArray (uniformIndices.length); for (i in 0...uniformIndices.length) _uniformIndices[i] = uniformIndices[i]; @@ -1730,7 +1730,7 @@ class NativeOpenGLRenderContext { public function getAttachedShaders (program:GLProgram):Array { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var result = NativeCFFI.lime_gl_get_attached_shaders (__getObjectID (program)); #if hl var _result = new Array (); @@ -1749,7 +1749,7 @@ class NativeOpenGLRenderContext { public function getAttribLocation (program:GLProgram, name:String):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_attrib_location (__getObjectID (program), name); #else return 0; @@ -1760,7 +1760,7 @@ class NativeOpenGLRenderContext { public function getBoolean (pname:Int):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_boolean (pname); #else return false; @@ -1771,7 +1771,7 @@ class NativeOpenGLRenderContext { public function getBooleanv (pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_booleanv (pname, params); #end @@ -1787,7 +1787,7 @@ class NativeOpenGLRenderContext { public function getBufferParameteri (target:Int, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_buffer_parameteri (target, pname); #else return 0; @@ -1798,7 +1798,7 @@ class NativeOpenGLRenderContext { public function getBufferParameteri64v (target:Int, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_buffer_parameteri64v (target, pname, params); #end @@ -1807,7 +1807,7 @@ class NativeOpenGLRenderContext { public function getBufferParameteriv (target:Int, pname:Int, data:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_buffer_parameteriv (target, pname, data); #end @@ -1816,7 +1816,7 @@ class NativeOpenGLRenderContext { public function getBufferPointerv (target:Int, pname:Int):DataPointer { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_buffer_pointerv (target, pname); #else return 0; @@ -1827,7 +1827,7 @@ class NativeOpenGLRenderContext { public function getBufferSubData (target:Int, offset:DataPointer, size:Int, data:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_buffer_sub_data (target, offset, size, data); #end @@ -1836,7 +1836,7 @@ class NativeOpenGLRenderContext { public function getContextAttributes ():GLContextAttributes { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) #if hl var object:Dynamic = { alpha: false, depth: false, stencil: false, antialias: false }; var base:Dynamic = NativeCFFI.lime_gl_get_context_attributes (object); @@ -1855,7 +1855,7 @@ class NativeOpenGLRenderContext { public function getError ():Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_error (); #else return 0; @@ -1892,7 +1892,7 @@ class NativeOpenGLRenderContext { object = __extensionObjectConstructors.get (name) (); __extensionObjects.set (name, object); - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_extension (name); #end @@ -1911,7 +1911,7 @@ class NativeOpenGLRenderContext { public function getFloat (pname:Int):Float { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_float (pname); #else return 0; @@ -1922,7 +1922,7 @@ class NativeOpenGLRenderContext { public function getFloatv (pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_floatv (pname, params); #end @@ -1931,7 +1931,7 @@ class NativeOpenGLRenderContext { public function getFragDataLocation (program:GLProgram, name:String):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_frag_data_location (__getObjectID (program), name); #else return 0; @@ -1961,7 +1961,7 @@ class NativeOpenGLRenderContext { public function getFramebufferAttachmentParameteri (target:Int, attachment:Int, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_framebuffer_attachment_parameteri (target, attachment, pname); #else return 0; @@ -1972,7 +1972,7 @@ class NativeOpenGLRenderContext { public function getFramebufferAttachmentParameteriv (target:Int, attachment:Int, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_framebuffer_attachment_parameteriv (target, attachment, pname, params); #end @@ -1990,7 +1990,7 @@ class NativeOpenGLRenderContext { public function getInteger (pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_integer (pname); #else return 0; @@ -2003,7 +2003,7 @@ class NativeOpenGLRenderContext { // TODO - //#if (lime_cffi && lime_opengl && !macro) + //#if (lime_cffi && (lime_opengl || lime_opengles) && !macro) //return NativeCFFI.lime_gl_get_integer64 (pname); //#else return Int64.ofInt (0); @@ -2016,7 +2016,7 @@ class NativeOpenGLRenderContext { // TODO - //#if (lime_cffi && lime_opengl && !macro) + //#if (lime_cffi && (lime_opengl || lime_opengles) && !macro) //return NativeCFFI.lime_gl_get_integer64i (pname); //#else return Int64.ofInt (0); @@ -2027,7 +2027,7 @@ class NativeOpenGLRenderContext { public function getInteger64i_v (pname:Int, index:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_integer64i_v (pname, index, params); #end @@ -2036,7 +2036,7 @@ class NativeOpenGLRenderContext { public function getInteger64v (pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_integer64v (pname, params); #end @@ -2045,7 +2045,7 @@ class NativeOpenGLRenderContext { public function getIntegeri_v (pname:Int, index:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_integeri_v (pname, index, params); #end @@ -2054,7 +2054,7 @@ class NativeOpenGLRenderContext { public function getIntegerv (pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_integerv (pname, params); #end @@ -2065,7 +2065,7 @@ class NativeOpenGLRenderContext { // TODO - // #if (lime_cffi && lime_opengl && !macro) + // #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) // return NativeCFFI.lime_gl_get_internalformati (target, internalformat, pname); // #else return 0; @@ -2076,7 +2076,7 @@ class NativeOpenGLRenderContext { public function getInternalformativ (target:Int, internalformat:Int, pname:Int, bufSize:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_internalformativ (target, internalformat, pname, bufSize, params); #end @@ -2182,7 +2182,7 @@ class NativeOpenGLRenderContext { public function getProgrami (program:GLProgram, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_programi (__getObjectID (program), pname); #else return 0; @@ -2193,7 +2193,7 @@ class NativeOpenGLRenderContext { public function getProgramiv (program:GLProgram, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_programiv (__getObjectID (program), pname, params); #end @@ -2202,7 +2202,7 @@ class NativeOpenGLRenderContext { public function getProgramBinary (program:GLProgram, binaryFormat:Int):Bytes { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var bytes = Bytes.alloc (0); NativeCFFI.lime_gl_get_program_binary (__getObjectID (program), binaryFormat, bytes); return bytes; @@ -2215,7 +2215,7 @@ class NativeOpenGLRenderContext { public function getProgramInfoLog (program:GLProgram):String { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var result = NativeCFFI.lime_gl_get_program_info_log (__getObjectID (program)); #if hl var result = @:privateAccess String.fromUTF8 (result); @@ -2244,7 +2244,7 @@ class NativeOpenGLRenderContext { public function getQueryi (target:Int, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_queryi (target, pname); #else return 0; @@ -2255,7 +2255,7 @@ class NativeOpenGLRenderContext { public function getQueryiv (target:Int, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_queryiv (target, pname, params); #end @@ -2264,7 +2264,7 @@ class NativeOpenGLRenderContext { public function getQueryObjectui (query:GLQuery, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_query_objectui (__getObjectID (query), pname); #else return 0; @@ -2275,7 +2275,7 @@ class NativeOpenGLRenderContext { public function getQueryObjectuiv (query:GLQuery, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_query_objectuiv (__getObjectID (query), pname, params); #end @@ -2300,7 +2300,7 @@ class NativeOpenGLRenderContext { public function getRenderbufferParameteri (target:Int, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_renderbuffer_parameteri (target, pname); #else return 0; @@ -2311,7 +2311,7 @@ class NativeOpenGLRenderContext { public function getRenderbufferParameteriv (target:Int, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_renderbuffer_parameteriv (target, pname, params); #end @@ -2329,7 +2329,7 @@ class NativeOpenGLRenderContext { public function getSamplerParameterf (sampler:GLSampler, pname:Int):Float { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_sampler_parameterf (__getObjectID (sampler), pname); #else return 0; @@ -2340,7 +2340,7 @@ class NativeOpenGLRenderContext { public function getSamplerParameterfv (sampler:GLSampler, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_sampler_parameterfv (__getObjectID (sampler), pname, params); #end @@ -2349,7 +2349,7 @@ class NativeOpenGLRenderContext { public function getSamplerParameteri (sampler:GLSampler, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_sampler_parameteri (__getObjectID (sampler), pname); #else return 0; @@ -2360,7 +2360,7 @@ class NativeOpenGLRenderContext { public function getSamplerParameteriv (sampler:GLSampler, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_sampler_parameteriv (__getObjectID (sampler), pname, params); #end @@ -2369,7 +2369,7 @@ class NativeOpenGLRenderContext { public function getShaderi (shader:GLShader, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_shaderi (__getObjectID (shader), pname); #else return 0; @@ -2380,7 +2380,7 @@ class NativeOpenGLRenderContext { public function getShaderiv (shader:GLShader, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_shaderiv (__getObjectID (shader), pname, params); #end @@ -2389,7 +2389,7 @@ class NativeOpenGLRenderContext { public function getShaderInfoLog (shader:GLShader):String { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var result = NativeCFFI.lime_gl_get_shader_info_log (__getObjectID (shader)); #if hl var result = @:privateAccess String.fromUTF8 (result); @@ -2411,7 +2411,7 @@ class NativeOpenGLRenderContext { public function getShaderPrecisionFormat (shadertype:Int, precisiontype:Int):GLShaderPrecisionFormat { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) #if hl return NativeCFFI.lime_gl_get_shader_precision_format (shadertype, precisiontype, { rangeMin: 0, rangeMax: 0, precision: 0 }); #else @@ -2426,7 +2426,7 @@ class NativeOpenGLRenderContext { public function getShaderSource (shader:GLShader):String { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var result = NativeCFFI.lime_gl_get_shader_source (__getObjectID (shader)); #if hl var result = @:privateAccess String.fromUTF8 (result); @@ -2441,7 +2441,7 @@ class NativeOpenGLRenderContext { public function getString (name:Int):String { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var result = NativeCFFI.lime_gl_get_string (name); #if hl var result = @:privateAccess String.fromUTF8 (result); @@ -2456,7 +2456,7 @@ class NativeOpenGLRenderContext { public function getStringi (name:Int, index:Int):String { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var result = NativeCFFI.lime_gl_get_stringi (name, index); #if hl var result = @:privateAccess String.fromUTF8 (result); @@ -2553,7 +2553,7 @@ class NativeOpenGLRenderContext { public function getTexParameterf (target:Int, pname:Int):Float { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_tex_parameterf (target, pname); #else return 0; @@ -2564,7 +2564,7 @@ class NativeOpenGLRenderContext { public function getTexParameterfv (target:Int, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_tex_parameterfv (target, pname, params); #end @@ -2573,7 +2573,7 @@ class NativeOpenGLRenderContext { public function getTexParameteri (target:Int, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_tex_parameteri (target, pname); #else return 0; @@ -2584,7 +2584,7 @@ class NativeOpenGLRenderContext { public function getTexParameteriv (target:Int, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_tex_parameteriv (target, pname, params); #end @@ -2593,7 +2593,7 @@ class NativeOpenGLRenderContext { public function getTransformFeedbackVarying (program:GLProgram, index:Int):GLActiveInfo { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) #if hl var object:{ size:Int, type:Int, name:hl.Bytes } = { size: 0, type: 0, name: null }; var result:Dynamic = NativeCFFI.lime_gl_get_transform_feedback_varying (__getObjectID (program), index, object); @@ -2695,7 +2695,7 @@ class NativeOpenGLRenderContext { public function getUniformf (program:GLProgram, location:GLUniformLocation):Float { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_uniformf (__getObjectID (program), location); #else return 0; @@ -2706,7 +2706,7 @@ class NativeOpenGLRenderContext { public function getUniformfv (program:GLProgram, location:GLUniformLocation, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_uniformfv (__getObjectID (program), location, params); #end @@ -2715,7 +2715,7 @@ class NativeOpenGLRenderContext { public function getUniformi (program:GLProgram, location:GLUniformLocation):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_uniformi (__getObjectID (program), location); #else return 0; @@ -2726,7 +2726,7 @@ class NativeOpenGLRenderContext { public function getUniformiv (program:GLProgram, location:GLUniformLocation, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_uniformiv (__getObjectID (program), location, params); #end @@ -2735,7 +2735,7 @@ class NativeOpenGLRenderContext { public function getUniformui (program:GLProgram, location:GLUniformLocation):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_uniformui (__getObjectID (program), location); #else return 0; @@ -2746,7 +2746,7 @@ class NativeOpenGLRenderContext { public function getUniformuiv (program:GLProgram, location:GLUniformLocation, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_uniformuiv (__getObjectID (program), location, params); #end @@ -2755,7 +2755,7 @@ class NativeOpenGLRenderContext { public function getUniformBlockIndex (program:GLProgram, uniformBlockName:String):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_uniform_block_index (__getObjectID (program), uniformBlockName); #else return 0; @@ -2775,7 +2775,7 @@ class NativeOpenGLRenderContext { public function getUniformLocation (program:GLProgram, name:String):GLUniformLocation { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_uniform_location (__getObjectID (program), name); #else return 0; @@ -2793,7 +2793,7 @@ class NativeOpenGLRenderContext { public function getVertexAttribf (index:Int, pname:Int):Float { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_vertex_attribf (index, pname); #else return 0; @@ -2804,7 +2804,7 @@ class NativeOpenGLRenderContext { public function getVertexAttribfv (index:Int, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_vertex_attribfv (index, pname, params); #end @@ -2813,7 +2813,7 @@ class NativeOpenGLRenderContext { public function getVertexAttribi (index:Int, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_vertex_attribi (index, pname); #else return 0; @@ -2824,7 +2824,7 @@ class NativeOpenGLRenderContext { public function getVertexAttribIi (index:Int, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_vertex_attribii (index, pname); #else return 0; @@ -2835,7 +2835,7 @@ class NativeOpenGLRenderContext { public function getVertexAttribIiv (index:Int, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_vertex_attribiiv (index, pname, params); #end @@ -2844,7 +2844,7 @@ class NativeOpenGLRenderContext { public function getVertexAttribIui (index:Int, pname:Int):Int { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_vertex_attribiui (index, pname); #else return 0; @@ -2855,7 +2855,7 @@ class NativeOpenGLRenderContext { public function getVertexAttribIuiv (index:Int, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_vertex_attribiuiv (index, pname, params); #end @@ -2864,7 +2864,7 @@ class NativeOpenGLRenderContext { public function getVertexAttribiv (index:Int, pname:Int, params:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_get_vertex_attribiv (index, pname, params); #end @@ -2873,7 +2873,7 @@ class NativeOpenGLRenderContext { public function getVertexAttribPointerv (index:Int, pname:Int):DataPointer { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_get_vertex_attrib_pointerv (index, pname); #else return 0; @@ -2884,7 +2884,7 @@ class NativeOpenGLRenderContext { public function hint (target:Int, mode:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_hint (target, mode); #end @@ -2893,7 +2893,7 @@ class NativeOpenGLRenderContext { public function invalidateFramebuffer (target:Int, attachments:Array):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) #if hl var _attachments = new hl.NativeArray (attachments.length); for (i in 0...attachments.length) _attachments[i] = attachments[i]; @@ -2907,7 +2907,7 @@ class NativeOpenGLRenderContext { public function invalidateSubFramebuffer (target:Int, attachments:Array, x:Int, y:Int, width:Int, height:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) #if hl var _attachments = new hl.NativeArray (attachments.length); for (i in 0...attachments.length) _attachments[i] = attachments[i]; @@ -2921,7 +2921,7 @@ class NativeOpenGLRenderContext { public function isBuffer (buffer:GLBuffer):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_buffer (__getObjectID (buffer)); #else return false; @@ -2939,7 +2939,7 @@ class NativeOpenGLRenderContext { public function isEnabled (cap:Int):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_enabled (cap); #else return false; @@ -2950,7 +2950,7 @@ class NativeOpenGLRenderContext { public function isFramebuffer (framebuffer:GLFramebuffer):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_framebuffer (__getObjectID (framebuffer)); #else return false; @@ -2961,7 +2961,7 @@ class NativeOpenGLRenderContext { public function isProgram (program:GLProgram):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_program (__getObjectID (program)); #else return false; @@ -2972,7 +2972,7 @@ class NativeOpenGLRenderContext { public function isQuery (query:GLQuery):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_query (__getObjectID (query)); #else return false; @@ -2983,7 +2983,7 @@ class NativeOpenGLRenderContext { public function isRenderbuffer (renderbuffer:GLRenderbuffer):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_renderbuffer (__getObjectID (renderbuffer)); #else return false; @@ -2994,7 +2994,7 @@ class NativeOpenGLRenderContext { public function isSampler (sampler:GLSampler):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_sampler (__getObjectID (sampler)); #else return false; @@ -3005,7 +3005,7 @@ class NativeOpenGLRenderContext { public function isShader (shader:GLShader):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_shader (__getObjectID (shader)); #else return false; @@ -3016,7 +3016,7 @@ class NativeOpenGLRenderContext { public function isSync (sync:GLSync):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_sync (sync); #else return false; @@ -3027,7 +3027,7 @@ class NativeOpenGLRenderContext { public function isTexture (texture:GLTexture):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_texture (__getObjectID (texture)); #else return false; @@ -3038,7 +3038,7 @@ class NativeOpenGLRenderContext { public function isTransformFeedback (transformFeedback:GLTransformFeedback):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_transform_feedback (__getObjectID (transformFeedback)); #else return false; @@ -3049,7 +3049,7 @@ class NativeOpenGLRenderContext { public function isVertexArray (vertexArray:GLVertexArrayObject):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_is_vertex_array (__getObjectID (vertexArray)); #else return false; @@ -3060,7 +3060,7 @@ class NativeOpenGLRenderContext { public function lineWidth (width:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_line_width (width); #end @@ -3069,7 +3069,7 @@ class NativeOpenGLRenderContext { public function linkProgram (program:GLProgram):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_link_program (__getObjectID (program)); #end @@ -3078,7 +3078,7 @@ class NativeOpenGLRenderContext { public function mapBufferRange (target:Int, offset:DataPointer, length:Int, access:Int):DataPointer { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_map_buffer_range (target, offset, length, access); #else return 0; @@ -3089,7 +3089,7 @@ class NativeOpenGLRenderContext { public function pauseTransformFeedback ():Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_pause_transform_feedback (); #end @@ -3098,7 +3098,7 @@ class NativeOpenGLRenderContext { public function pixelStorei (pname:Int, param:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_pixel_storei (pname, param); #end @@ -3107,7 +3107,7 @@ class NativeOpenGLRenderContext { public function polygonOffset (factor:Float, units:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_polygon_offset (factor, units); #end @@ -3116,7 +3116,7 @@ class NativeOpenGLRenderContext { public function programBinary (program:GLProgram, binaryFormat:Int, binary:DataPointer, length:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_program_binary (__getObjectID (program), binaryFormat, binary, length); #end @@ -3125,7 +3125,7 @@ class NativeOpenGLRenderContext { public function programParameteri (program:GLProgram, pname:Int, value:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_program_parameteri (__getObjectID (program), pname, value); #end @@ -3134,7 +3134,7 @@ class NativeOpenGLRenderContext { public function readBuffer (src:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_read_buffer (src); #end @@ -3143,7 +3143,7 @@ class NativeOpenGLRenderContext { public function readPixels (x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_read_pixels (x, y, width, height, format, type, pixels); #end @@ -3152,7 +3152,7 @@ class NativeOpenGLRenderContext { public function releaseShaderCompiler ():Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_release_shader_compiler (); #end @@ -3161,7 +3161,7 @@ class NativeOpenGLRenderContext { public function renderbufferStorage (target:Int, internalformat:Int, width:Int, height:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_renderbuffer_storage (target, internalformat, width, height); #end @@ -3170,7 +3170,7 @@ class NativeOpenGLRenderContext { public function renderbufferStorageMultisample (target:Int, samples:Int, internalformat:Int, width:Int, height:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_renderbuffer_storage_multisample (target, samples, internalformat, width, height); #end @@ -3179,7 +3179,7 @@ class NativeOpenGLRenderContext { public function resumeTransformFeedback ():Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_resume_transform_feedback (); #end @@ -3188,7 +3188,7 @@ class NativeOpenGLRenderContext { public function sampleCoverage (value:Float, invert:Bool):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_sample_coverage (value, invert); #end @@ -3197,7 +3197,7 @@ class NativeOpenGLRenderContext { public function samplerParameterf (sampler:GLSampler, pname:Int, param:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_sampler_parameterf (__getObjectID (sampler), pname, param); #end @@ -3206,7 +3206,7 @@ class NativeOpenGLRenderContext { public function samplerParameteri (sampler:GLSampler, pname:Int, param:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_sampler_parameteri (__getObjectID (sampler), pname, param); #end @@ -3215,7 +3215,7 @@ class NativeOpenGLRenderContext { public function scissor (x:Int, y:Int, width:Int, height:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_scissor (x, y, width, height); #end @@ -3224,7 +3224,7 @@ class NativeOpenGLRenderContext { public function shaderBinary (shaders:Array, binaryformat:Int, binary:DataPointer, length:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) #if hl var _shaders = new hl.NativeArray (shaders.length); for (i in 0...shaders.length) _shaders[i] = shaders[i].id; @@ -3238,7 +3238,7 @@ class NativeOpenGLRenderContext { public function shaderSource (shader:GLShader, source:String):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_shader_source (__getObjectID (shader), source); #end @@ -3247,7 +3247,7 @@ class NativeOpenGLRenderContext { public function stencilFunc (func:Int, ref:Int, mask:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_stencil_func (func, ref, mask); #end @@ -3256,7 +3256,7 @@ class NativeOpenGLRenderContext { public function stencilFuncSeparate (face:Int, func:Int, ref:Int, mask:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_stencil_func_separate (face, func, ref, mask); #end @@ -3265,7 +3265,7 @@ class NativeOpenGLRenderContext { public function stencilMask (mask:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_stencil_mask (mask); #end @@ -3274,7 +3274,7 @@ class NativeOpenGLRenderContext { public function stencilMaskSeparate (face:Int, mask:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_stencil_mask_separate (face, mask); #end @@ -3283,7 +3283,7 @@ class NativeOpenGLRenderContext { public function stencilOp (fail:Int, zfail:Int, zpass:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_stencil_op (fail, zfail, zpass); #end @@ -3292,7 +3292,7 @@ class NativeOpenGLRenderContext { public function stencilOpSeparate (face:Int, fail:Int, zfail:Int, zpass:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_stencil_op_separate (face, fail, zfail, zpass); #end @@ -3301,7 +3301,7 @@ class NativeOpenGLRenderContext { public function texImage2D (target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int, type:Int, data:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_tex_image_2d (target, level, internalformat, width, height, border, format, type, data); #end @@ -3310,7 +3310,7 @@ class NativeOpenGLRenderContext { public function texImage3D (target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, format:Int, type:Int, data:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_tex_image_3d (target, level, internalformat, width, height, depth, border, format, type, data); #end @@ -3319,7 +3319,7 @@ class NativeOpenGLRenderContext { public function texStorage2D (target:Int, level:Int, internalformat:Int, width:Int, height:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_tex_storage_2d (target, level, internalformat, width, height); #end @@ -3328,7 +3328,7 @@ class NativeOpenGLRenderContext { public function texStorage3D (target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_tex_storage_3d (target, level, internalformat, width, height, depth); #end @@ -3337,7 +3337,7 @@ class NativeOpenGLRenderContext { public function texParameterf (target:Int, pname:Int, param:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_tex_parameterf (target, pname, param); #end @@ -3346,7 +3346,7 @@ class NativeOpenGLRenderContext { public function texParameteri (target:Int, pname:Int, param:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_tex_parameteri (target, pname, param); #end @@ -3355,7 +3355,7 @@ class NativeOpenGLRenderContext { public function texSubImage2D (target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, type:Int, pixels:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_tex_sub_image_2d (target, level, xoffset, yoffset, width, height, format, type, pixels); #end @@ -3364,7 +3364,7 @@ class NativeOpenGLRenderContext { public 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 { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_tex_sub_image_3d (target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, data); #end @@ -3380,7 +3380,7 @@ class NativeOpenGLRenderContext { public function transformFeedbackVaryings (program:GLProgram, varyings:Array, bufferMode:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) #if hl var _varyings = new hl.NativeArray (varyings.length); for (i in 0...varyings.length) _varyings[i] = varyings[i].charCodeAt (0); @@ -3394,7 +3394,7 @@ class NativeOpenGLRenderContext { public function uniform1f (location:GLUniformLocation, v0:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform1f (location, v0); #end @@ -3403,7 +3403,7 @@ class NativeOpenGLRenderContext { public function uniform1fv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform1fv (location, count, v); #end @@ -3412,7 +3412,7 @@ class NativeOpenGLRenderContext { public function uniform1i (location:GLUniformLocation, v0:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform1i (location, v0); #end @@ -3421,7 +3421,7 @@ class NativeOpenGLRenderContext { public function uniform1iv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform1iv (location, count, v); #end @@ -3430,7 +3430,7 @@ class NativeOpenGLRenderContext { public function uniform1ui (location:GLUniformLocation, v0:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform1ui (location, v0); #end @@ -3439,7 +3439,7 @@ class NativeOpenGLRenderContext { public function uniform1uiv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform1uiv (location, count, v); #end @@ -3448,7 +3448,7 @@ class NativeOpenGLRenderContext { public function uniform2f (location:GLUniformLocation, v0:Float, v1:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform2f (location, v0, v1); #end @@ -3457,7 +3457,7 @@ class NativeOpenGLRenderContext { public function uniform2fv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform2fv (location, count, v); #end @@ -3466,7 +3466,7 @@ class NativeOpenGLRenderContext { public function uniform2i (location:GLUniformLocation, v0:Int, v1:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform2i (location, v0, v1); #end @@ -3475,7 +3475,7 @@ class NativeOpenGLRenderContext { public function uniform2iv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform2iv (location, count, v); #end @@ -3484,7 +3484,7 @@ class NativeOpenGLRenderContext { public function uniform2ui (location:GLUniformLocation, v0:Int, v1:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform2ui (location, v0, v1); #end @@ -3493,7 +3493,7 @@ class NativeOpenGLRenderContext { public function uniform2uiv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform2uiv (location, count, v); #end @@ -3502,7 +3502,7 @@ class NativeOpenGLRenderContext { public function uniform3f (location:GLUniformLocation, v0:Float, v1:Float, v2:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform3f (location, v0, v1, v2); #end @@ -3511,7 +3511,7 @@ class NativeOpenGLRenderContext { public function uniform3fv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform3fv (location, count, v); #end @@ -3520,7 +3520,7 @@ class NativeOpenGLRenderContext { public function uniform3i (location:GLUniformLocation, v0:Int, v1:Int, v2:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform3i (location, v0, v1, v2); #end @@ -3529,7 +3529,7 @@ class NativeOpenGLRenderContext { public function uniform3iv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform3iv (location, count, v); #end @@ -3538,7 +3538,7 @@ class NativeOpenGLRenderContext { public function uniform3ui (location:GLUniformLocation, v0:Int, v1:Int, v2:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform3ui (location, v0, v1, v2); #end @@ -3547,7 +3547,7 @@ class NativeOpenGLRenderContext { public function uniform3uiv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform3uiv (location, count, v); #end @@ -3556,7 +3556,7 @@ class NativeOpenGLRenderContext { public function uniform4f (location:GLUniformLocation, v0:Float, v1:Float, v2:Float, v3:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform4f (location, v0, v1, v2, v3); #end @@ -3565,7 +3565,7 @@ class NativeOpenGLRenderContext { public function uniform4fv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform4fv (location, count, v); #end @@ -3574,7 +3574,7 @@ class NativeOpenGLRenderContext { public function uniform4i (location:GLUniformLocation, v0:Int, v1:Int, v2:Int, v3:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform4i (location, v0, v1, v2, v3); #end @@ -3583,7 +3583,7 @@ class NativeOpenGLRenderContext { public function uniform4iv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform4iv (location, count, v); #end @@ -3592,7 +3592,7 @@ class NativeOpenGLRenderContext { public function uniform4ui (location:GLUniformLocation, v0:Int, v1:Int, v2:Int, v3:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform4ui (location, v0, v1, v2, v3); #end @@ -3601,7 +3601,7 @@ class NativeOpenGLRenderContext { public function uniform4uiv (location:GLUniformLocation, count:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform4uiv (location, count, v); #end @@ -3610,7 +3610,7 @@ class NativeOpenGLRenderContext { public function uniformBlockBinding (program:GLProgram, uniformBlockIndex:Int, uniformBlockBinding:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform_block_binding (__getObjectID (program), uniformBlockIndex, uniformBlockBinding); #end @@ -3619,7 +3619,7 @@ class NativeOpenGLRenderContext { public function uniformMatrix2fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform_matrix2fv (location, count, transpose, v); #end @@ -3628,7 +3628,7 @@ class NativeOpenGLRenderContext { public function uniformMatrix2x3fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform_matrix2x3fv (location, count, transpose, v); #end @@ -3637,7 +3637,7 @@ class NativeOpenGLRenderContext { public function uniformMatrix2x4fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform_matrix2x4fv (location, count, transpose, v); #end @@ -3646,7 +3646,7 @@ class NativeOpenGLRenderContext { public function uniformMatrix3fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform_matrix3fv (location, count, transpose, v); #end @@ -3655,7 +3655,7 @@ class NativeOpenGLRenderContext { public function uniformMatrix3x2fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform_matrix3x2fv (location, count, transpose, v); #end @@ -3664,7 +3664,7 @@ class NativeOpenGLRenderContext { public function uniformMatrix3x4fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform_matrix3x4fv (location, count, transpose, v); #end @@ -3673,7 +3673,7 @@ class NativeOpenGLRenderContext { public function uniformMatrix4fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform_matrix4fv (location, count, transpose, v); #end @@ -3682,7 +3682,7 @@ class NativeOpenGLRenderContext { public function uniformMatrix4x2fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform_matrix4x2fv (location, count, transpose, v); #end @@ -3691,7 +3691,7 @@ class NativeOpenGLRenderContext { public function uniformMatrix4x3fv (location:GLUniformLocation, count:Int, transpose:Bool, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_uniform_matrix4x3fv (location, count, transpose, v); #end @@ -3700,7 +3700,7 @@ class NativeOpenGLRenderContext { public function unmapBuffer (target:Int):Bool { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) return NativeCFFI.lime_gl_unmap_buffer (target); #else return false; @@ -3713,7 +3713,7 @@ class NativeOpenGLRenderContext { __currentProgram = program; - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_use_program (__getObjectID (program)); #end @@ -3722,7 +3722,7 @@ class NativeOpenGLRenderContext { public function validateProgram (program:GLProgram):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_validate_program (__getObjectID (program)); #end @@ -3731,7 +3731,7 @@ class NativeOpenGLRenderContext { public function vertexAttrib1f (index:Int, v0:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attrib1f (index, v0); #end @@ -3740,7 +3740,7 @@ class NativeOpenGLRenderContext { public function vertexAttrib1fv (index:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attrib1fv (index, v); #end @@ -3749,7 +3749,7 @@ class NativeOpenGLRenderContext { public function vertexAttrib2f (index:Int, v0:Float, y:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attrib2f (index, v0, y); #end @@ -3758,7 +3758,7 @@ class NativeOpenGLRenderContext { public function vertexAttrib2fv (index:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attrib2fv (index, v); #end @@ -3767,7 +3767,7 @@ class NativeOpenGLRenderContext { public function vertexAttrib3f (index:Int, v0:Float, v1:Float, v2:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attrib3f (index, v0, v1, v2); #end @@ -3776,7 +3776,7 @@ class NativeOpenGLRenderContext { public function vertexAttrib3fv (index:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attrib3fv (index, v); #end @@ -3785,7 +3785,7 @@ class NativeOpenGLRenderContext { public function vertexAttrib4f (index:Int, v0:Float, v1:Float, v2:Float, v3:Float):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attrib4f (index, v0, v1, v2, v3); #end @@ -3794,7 +3794,7 @@ class NativeOpenGLRenderContext { public function vertexAttrib4fv (index:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attrib4fv (index, v); #end @@ -3803,7 +3803,7 @@ class NativeOpenGLRenderContext { public function vertexAttribDivisor (index:Int, divisor:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attrib_divisor (index, divisor); #end @@ -3812,7 +3812,7 @@ class NativeOpenGLRenderContext { public function vertexAttribI4i (index:Int, v0:Int, v1:Int, v2:Int, v3:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attribi4i (index, v0, v1, v2, v3); #end @@ -3823,7 +3823,7 @@ class NativeOpenGLRenderContext { //public function vertexAttribI4iv (index:Int, value:Array) { public function vertexAttribI4iv (index:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attribi4iv (index, v); #end @@ -3832,7 +3832,7 @@ class NativeOpenGLRenderContext { public function vertexAttribI4ui (index:Int, v0:Int, v1:Int, v2:Int, v3:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attribi4ui (index, v0, v1, v2, v3); #end @@ -3843,7 +3843,7 @@ class NativeOpenGLRenderContext { //public function vertexAttribI4iv (index:Int, value:Array) { public function vertexAttribI4uiv (index:Int, v:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attribi4uiv (index, v); #end @@ -3852,7 +3852,7 @@ class NativeOpenGLRenderContext { public function vertexAttribIPointer (index:Int, size:Int, type:Int, stride:Int, offset:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attrib_ipointer (index, size, type, stride, offset); #end @@ -3861,7 +3861,7 @@ class NativeOpenGLRenderContext { public function vertexAttribPointer (index:Int, size:Int, type:Int, normalized:Bool, stride:Int, offset:DataPointer):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_vertex_attrib_pointer (index, size, type, normalized, stride, offset); #end @@ -3870,7 +3870,7 @@ class NativeOpenGLRenderContext { public function viewport (x:Int, y:Int, width:Int, height:Int):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_viewport (x, y, width, height); #end @@ -3879,7 +3879,7 @@ class NativeOpenGLRenderContext { public function waitSync (sync:GLSync, flags:Int, timeout:Int64):Void { - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) NativeCFFI.lime_gl_wait_sync (sync, flags, timeout.high, timeout.low); #end diff --git a/src/lime/_internal/backend/native/NativeWindow.hx b/src/lime/_internal/backend/native/NativeWindow.hx index 8dd663565..00bb77220 100644 --- a/src/lime/_internal/backend/native/NativeWindow.hx +++ b/src/lime/_internal/backend/native/NativeWindow.hx @@ -81,7 +81,7 @@ class NativeWindow { if (!Reflect.hasField (contextAttributes, "stencil")) contextAttributes.stencil = true; if (!Reflect.hasField (contextAttributes, "vsync")) contextAttributes.vsync = false; - #if (cairo || !lime_opengl) contextAttributes.type = CAIRO; #end + #if (cairo || (!lime_opengl && !lime_opengles)) contextAttributes.type = CAIRO; #end if (Reflect.hasField (contextAttributes, "type") && contextAttributes.type == CAIRO) contextAttributes.hardware = false; if (Reflect.hasField (attributes, "allowHighDPI") && attributes.allowHighDPI) flags |= cast WindowFlags.WINDOW_FLAG_ALLOW_HIGHDPI; diff --git a/src/lime/graphics/opengl/GL.hx b/src/lime/graphics/opengl/GL.hx index c324f835f..30d68fc43 100644 --- a/src/lime/graphics/opengl/GL.hx +++ b/src/lime/graphics/opengl/GL.hx @@ -3347,7 +3347,7 @@ class GL { if (id == 0) return null; - #if (lime_cffi && lime_opengl && !macro) + #if (lime_cffi && (lime_opengl || lime_opengles) && !macro) var object = NativeCFFI.lime_gl_object_from_id (id, type); if (object != null) {