WebGl2RenderContext: fix some indentation.

If we fix all the indentation at once, it will permanently mess up the diff. Git will see
that the new line 4544 matches the old line 3773, and conclude that it got moved
800 lines down.
This commit is contained in:
Joseph Cloutier
2023-05-07 15:24:04 -04:00
parent 2857016a52
commit ec20e46dca

View File

@@ -3770,11 +3770,12 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
__tempPointer.set(srcData, srcOffset); __tempPointer.set(srcData, srcOffset);
this.bufferData(target, size, __tempPointer, usage); this.bufferData(target, size, __tempPointer, usage);
} }
#if !lime_webgl
#if !lime_webgl
public inline function bufferSubData(target:Int, offset:Int, srcData:ArrayBufferView, srcOffset:Int = 0, ?length:Int):Void public inline function bufferSubData(target:Int, offset:Int, srcData:ArrayBufferView, srcOffset:Int = 0, ?length:Int):Void
#else #else
public inline function bufferSubData(target:Int, offset:Int, srcData:Dynamic, ?srcOffset:Int, ?length:Int):Void public inline function bufferSubData(target:Int, offset:Int, srcData:Dynamic, ?srcOffset:Int, ?length:Int):Void
#end #end
{ {
var size = (length != null) ? length : (srcData != null) ? srcData.byteLength : 0; var size = (length != null) ? length : (srcData != null) ? srcData.byteLength : 0;
@@ -3845,15 +3846,15 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.compileShader(shader); this.compileShader(shader);
} }
#if !lime_webgl #if !lime_webgl
public function compressedTexImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, srcData:ArrayBufferView, public function compressedTexImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, srcData:ArrayBufferView,
srcOffset:Int = 0, srcOffset:Int = 0,
?srcLengthOverride:Int):Void ?srcLengthOverride:Int):Void
#else #else
public inline function compressedTexImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, srcData:Dynamic, public inline function compressedTexImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, srcData:Dynamic,
?srcOffset:Int, ?srcOffset:Int,
?srcLengthOverride:Int):Void ?srcLengthOverride:Int):Void
#end #end
{ {
var imageSize = (srcLengthOverride != null) ? srcLengthOverride : (srcData != null) ? srcData.byteLength : 0; var imageSize = (srcLengthOverride != null) ? srcLengthOverride : (srcData != null) ? srcData.byteLength : 0;
@@ -3870,15 +3871,15 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.compressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, __tempPointer); this.compressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, __tempPointer);
} }
#if !lime_webgl #if !lime_webgl
public inline function compressedTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, public inline function compressedTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int,
srcData:ArrayBufferView, srcData:ArrayBufferView,
srcOffset:Int = 0, ?srcLengthOverride:Int):Void srcOffset:Int = 0, ?srcLengthOverride:Int):Void
#else #else
public inline function compressedTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, public inline function compressedTexSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int,
srcData:Dynamic, srcData:Dynamic,
?srcOffset:Int, ?srcLengthOverride:Int):Void ?srcOffset:Int, ?srcLengthOverride:Int):Void
#end #end
{ {
var imageSize = (srcLengthOverride != null) ? srcLengthOverride : (srcData != null) ? srcData.byteLength : 0; var imageSize = (srcLengthOverride != null) ? srcLengthOverride : (srcData != null) ? srcData.byteLength : 0;
@@ -4186,17 +4187,17 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
return this.getBufferParameter(target, pname); return this.getBufferParameter(target, pname);
} }
#if !lime_webgl #if !lime_webgl
public inline function getBufferSubData(target:Int, srcByteOffset:DataPointer, dstData:ArrayBuffer, srcOffset:Int = 0, ?length:Int):Void public inline function getBufferSubData(target:Int, srcByteOffset:DataPointer, dstData:ArrayBuffer, srcOffset:Int = 0, ?length:Int):Void
#else #else
public inline function getBufferSubData(target:Int, srcByteOffset:DataPointer, dstData:Dynamic, ?srcOffset:Dynamic, ?length:Int):Void public inline function getBufferSubData(target:Int, srcByteOffset:DataPointer, dstData:Dynamic, ?srcOffset:Dynamic, ?length:Int):Void
#end #end
{ {
#if !js #if !js
var size = (length != null) ? length : (dstData != null) ? dstData.length : 0; var size = (length != null) ? length : (dstData != null) ? dstData.length : 0;
this.getBufferSubData(target, srcByteOffset + srcOffset, size, dstData); this.getBufferSubData(target, srcByteOffset + srcOffset, size, dstData);
#end #end
} }
public inline function getContextAttributes():GLContextAttributes public inline function getContextAttributes():GLContextAttributes
@@ -4449,12 +4450,12 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.readBuffer(src); this.readBuffer(src);
} }
#if !lime_webgl #if !lime_webgl
public inline function readPixels(x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:ArrayBufferView, public inline function readPixels(x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:ArrayBufferView,
dstOffset:Int = 0):Void dstOffset:Int = 0):Void
#else #else
public inline function readPixels(x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:Dynamic, ?dstOffset:Int):Void public inline function readPixels(x:Int, y:Int, width:Int, height:Int, format:Int, type:Int, pixels:Dynamic, ?dstOffset:Int):Void
#end #end
{ {
__tempPointer.set(pixels, dstOffset); __tempPointer.set(pixels, dstOffset);
this.readPixels(x, y, width, height, format, type, __tempPointer); this.readPixels(x, y, width, height, format, type, __tempPointer);
@@ -4530,20 +4531,20 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.stencilOpSeparate(face, fail, zfail, zpass); this.stencilOpSeparate(face, fail, zfail, zpass);
} }
#if !lime_webgl #if !lime_webgl
public inline function texImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int, public inline function texImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Int, format:Int,
type:Int, srcData:ArrayBufferView, type:Int, srcData:ArrayBufferView,
srcOffset:Int = 0):Void srcOffset:Int = 0):Void
#else #else
public inline function texImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Dynamic, ?format:Int, public inline function texImage2D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, border:Dynamic, ?format:Int,
?type:Int, ?srcData:Dynamic, ?type:Int, ?srcData:Dynamic,
?srcOffset:Int):Void ?srcOffset:Int):Void
#end #end
{ {
#if !lime_webgl #if !lime_webgl
__tempPointer.set(srcData, srcOffset); __tempPointer.set(srcData, srcOffset);
this.texImage2D(target, level, internalformat, width, height, border, format, type, __tempPointer); this.texImage2D(target, level, internalformat, width, height, border, format, type, __tempPointer);
#end #end
} }
public inline function texImage3D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int, public inline function texImage3D(target:Int, level:Int, internalformat:Int, width:Int, height:Int, depth:Int, border:Int,
@@ -4574,15 +4575,15 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.texParameteri(target, pname, param); this.texParameteri(target, pname, param);
} }
#if !lime_webgl #if !lime_webgl
public inline function texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int, public inline function texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Int,
type:Int, srcData:ArrayBufferView, type:Int, srcData:ArrayBufferView,
srcOffset:Int = 0):Void srcOffset:Int = 0):Void
#else #else
public inline function texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Dynamic, public inline function texSubImage2D(target:Int, level:Int, xoffset:Int, yoffset:Int, width:Int, height:Int, format:Dynamic,
?type:Int, ?srcData:Dynamic, ?type:Int, ?srcData:Dynamic,
?srcOffset:Int):Void ?srcOffset:Int):Void
#end #end
{ {
__tempPointer.set(srcData, srcOffset); __tempPointer.set(srcData, srcOffset);
this.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, __tempPointer); this.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, __tempPointer);
@@ -4606,11 +4607,11 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.uniform1f(location, v0); this.uniform1f(location, v0);
} }
#if !lime_webgl #if !lime_webgl
public inline function uniform1fv(location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void public inline function uniform1fv(location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void
#else #else
public inline function uniform1fv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void public inline function uniform1fv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
#end #end
{ {
this.uniform1fv(location, v != null ? v.length : 0, v); this.uniform1fv(location, v != null ? v.length : 0, v);
} }
@@ -4620,11 +4621,11 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.uniform1i(location, v0); this.uniform1i(location, v0);
} }
#if !lime_webgl #if !lime_webgl
public inline function uniform1iv(location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void public inline function uniform1iv(location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void
#else #else
public inline function uniform1iv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void public inline function uniform1iv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
#end #end
{ {
this.uniform1iv(location, v != null ? v.length : 0, v); this.uniform1iv(location, v != null ? v.length : 0, v);
} }
@@ -4644,11 +4645,11 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.uniform2f(location, v0, v1); this.uniform2f(location, v0, v1);
} }
#if !lime_webgl #if !lime_webgl
public inline function uniform2fv(location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void public inline function uniform2fv(location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, ?srcLength:Int):Void
#else #else
public function uniform2fv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void public function uniform2fv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
#end #end
{ {
this.uniform2fv(location, v != null ? v.length >> 1 : 0, v); this.uniform2fv(location, v != null ? v.length >> 1 : 0, v);
} }
@@ -4658,11 +4659,11 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.uniform2i(location, v0, v1); this.uniform2i(location, v0, v1);
} }
#if !lime_webgl #if !lime_webgl
public inline function uniform2iv(location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void public inline function uniform2iv(location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, ?srcLength:Int):Void
#else #else
public inline function uniform2iv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void public inline function uniform2iv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
#end #end
{ {
this.uniform2iv(location, v != null ? v.length >> 1 : 0, v); this.uniform2iv(location, v != null ? v.length >> 1 : 0, v);
} }
@@ -4683,13 +4684,13 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.uniform3f(location, v0, v1, v2); this.uniform3f(location, v0, v1, v2);
} }
#if !lime_webgl #if !lime_webgl
public inline function uniform3fv(location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, public inline function uniform3fv(location:GLUniformLocation, v:Float32Array, ?srcOffset:Int,
?srcLength:Int):Void ?srcLength:Int):Void
#else #else
public inline function uniform3fv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, public inline function uniform3fv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int,
?srcLength:Int):Void ?srcLength:Int):Void
#end #end
{ {
this.uniform3fv(location, v != null ? Std.int(v.length / 3) : 0, v); this.uniform3fv(location, v != null ? Std.int(v.length / 3) : 0, v);
} }
@@ -4699,13 +4700,13 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.uniform3i(location, v0, v1, v2); this.uniform3i(location, v0, v1, v2);
} }
#if !lime_webgl #if !lime_webgl
public inline function uniform3iv(location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, public inline function uniform3iv(location:GLUniformLocation, v:Int32Array, ?srcOffset:Int,
?srcLength:Int):Void ?srcLength:Int):Void
#else #else
public inline function uniform3iv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, public inline function uniform3iv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int,
?srcLength:Int):Void ?srcLength:Int):Void
#end #end
{ {
this.uniform3iv(location, v != null ? Std.int(v.length / 3) : 0, v); this.uniform3iv(location, v != null ? Std.int(v.length / 3) : 0, v);
} }
@@ -4727,13 +4728,13 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.uniform4f(location, v0, v1, v2, v3); this.uniform4f(location, v0, v1, v2, v3);
} }
#if !lime_webgl #if !lime_webgl
public inline function uniform4fv(location:GLUniformLocation, v:Float32Array, ?srcOffset:Int, public inline function uniform4fv(location:GLUniformLocation, v:Float32Array, ?srcOffset:Int,
?srcLength:Int):Void ?srcLength:Int):Void
#else #else
public inline function uniform4fv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, public inline function uniform4fv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int,
?srcLength:Int):Void ?srcLength:Int):Void
#end #end
{ {
this.uniform4fv(location, v != null ? v.length >> 2 : 0, v); this.uniform4fv(location, v != null ? v.length >> 2 : 0, v);
} }
@@ -4744,13 +4745,13 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.uniform4i(location, v0, v1, v2, v3); this.uniform4i(location, v0, v1, v2, v3);
} }
#if !lime_webgl #if !lime_webgl
public inline function uniform4iv(location:GLUniformLocation, v:Int32Array, ?srcOffset:Int, public inline function uniform4iv(location:GLUniformLocation, v:Int32Array, ?srcOffset:Int,
?srcLength:Int):Void ?srcLength:Int):Void
#else #else
public inline function uniform4iv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int, public inline function uniform4iv(location:GLUniformLocation, v:Dynamic, ?srcOffset:Int,
?srcLength:Int):Void ?srcLength:Int):Void
#end #end
{ {
this.uniform4iv(location, v != null ? v.length >> 2 : 0, v); this.uniform4iv(location, v != null ? v.length >> 2 : 0, v);
} }
@@ -4773,13 +4774,13 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding); this.uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding);
} }
#if !lime_webgl #if !lime_webgl
public function uniformMatrix2fv(location:GLUniformLocation, transpose:Bool, public function uniformMatrix2fv(location:GLUniformLocation, transpose:Bool,
v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void
#else #else
public inline function uniformMatrix2fv(location:GLUniformLocation, transpose:Bool, public inline function uniformMatrix2fv(location:GLUniformLocation, transpose:Bool,
v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
#end #end
{ {
var count = 0; var count = 0;
@@ -4813,13 +4814,13 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.uniformMatrix2x4fv(location, count, transpose, __tempPointer); this.uniformMatrix2x4fv(location, count, transpose, __tempPointer);
} }
#if !lime_webgl #if !lime_webgl
public function uniformMatrix3fv(location:GLUniformLocation, transpose:Bool, public function uniformMatrix3fv(location:GLUniformLocation, transpose:Bool,
v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void
#else #else
public inline function uniformMatrix3fv(location:GLUniformLocation, transpose:Bool, public inline function uniformMatrix3fv(location:GLUniformLocation, transpose:Bool,
v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
#end #end
{ {
var count = 0; var count = 0;
@@ -4853,13 +4854,13 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
this.uniformMatrix3x4fv(location, count, transpose, __tempPointer); this.uniformMatrix3x4fv(location, count, transpose, __tempPointer);
} }
#if !lime_webgl #if !lime_webgl
public function uniformMatrix4fv(location:GLUniformLocation, transpose:Bool, public function uniformMatrix4fv(location:GLUniformLocation, transpose:Bool,
v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void v:Float32Array, srcOffset:Int = 0, ?srcLength:Int):Void
#else #else
public inline function uniformMatrix4fv(location:GLUniformLocation, transpose:Bool, public inline function uniformMatrix4fv(location:GLUniformLocation, transpose:Bool,
v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void v:Dynamic, ?srcOffset:Int, ?srcLength:Int):Void
#end #end
{ {
var count = 0; var count = 0;
@@ -5004,12 +5005,12 @@ abstract WebGL2RenderContext(Dynamic) from Dynamic to Dynamic
return context.webgl2; return context.webgl2;
} }
#if (!doc_gen && (lime_opengl || lime_opengles)) #if (!doc_gen && (lime_opengl || lime_opengles))
@:from private static function fromOpenGLES3RenderContext(gl:OpenGLES3RenderContext):WebGL2RenderContext @:from private static function fromOpenGLES3RenderContext(gl:OpenGLES3RenderContext):WebGL2RenderContext
{ {
return cast gl; return cast gl;
} }
#end #end
@:from private static function fromGL(gl:Class<GL>):WebGL2RenderContext @:from private static function fromGL(gl:Class<GL>):WebGL2RenderContext
{ {