Support bounded 720x1280 avatar shapes through GLES and production gates

This commit is contained in:
zenord
2026-10-13 17:32:21 +08:00
parent 62dce32bb7
commit ddd75fc571
18 changed files with 352 additions and 83 deletions
+3 -1
View File
@@ -3,9 +3,10 @@ package android.opengl
import java.nio.Buffer
object GLFixture {
var swaps=0;var draws=0;var deleted=0;var terminated=0;var swapFails=false;var shaderFails=false
var bodySize=0f to 0f
var alpha=0f;var patchTexture=0;var activeUnit=0
val rendered=mutableListOf<Pair<Int,Float>>()
fun reset() { swaps=0;draws=0;deleted=0;terminated=0;swapFails=false;shaderFails=false;alpha=0f;patchTexture=0;activeUnit=0;rendered.clear() }
fun reset() { swaps=0;draws=0;deleted=0;terminated=0;swapFails=false;shaderFails=false;alpha=0f;patchTexture=0;activeUnit=0;rendered.clear();bodySize=0f to 0f }
}
class EGLDisplay
class EGLContext
@@ -60,6 +61,7 @@ object GLES20 {
fun glUniformMatrix4fv(location: Int,count: Int,transpose: Boolean,value: FloatArray,o: Int) {}
fun glActiveTexture(id: Int) { GLFixture.activeUnit=id }
fun glUniform1i(location: Int,value: Int) {}
fun glUniform2f(location: Int,x: Float,y: Float) { GLFixture.bodySize=x to y }
fun glUniform4f(location: Int,a: Float,b: Float,c: Float,d: Float) {}
fun glUniform1f(location: Int,value: Float) { if(location==3) GLFixture.alpha=value }
fun glDrawArrays(mode: Int,first: Int,count: Int) { GLFixture.draws++;GLFixture.rendered+=GLFixture.patchTexture to GLFixture.alpha }