mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
162 lines
3.6 KiB
Smali
162 lines
3.6 KiB
Smali
.class public Lorg/webrtc/GlUtil;
|
|
.super Ljava/lang/Object;
|
|
.source "GlUtil.java"
|
|
|
|
|
|
# annotations
|
|
.annotation system Ldalvik/annotation/MemberClasses;
|
|
value = {
|
|
Lorg/webrtc/GlUtil$GlOutOfMemoryException;
|
|
}
|
|
.end annotation
|
|
|
|
|
|
# direct methods
|
|
.method private constructor <init>()V
|
|
.locals 0
|
|
|
|
.line 23
|
|
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static checkNoGLES2Error(Ljava/lang/String;)V
|
|
.locals 3
|
|
|
|
.line 33
|
|
invoke-static {}, Landroid/opengl/GLES20;->glGetError()I
|
|
|
|
move-result v0
|
|
|
|
if-eqz v0, :cond_1
|
|
|
|
const/16 v1, 0x505
|
|
|
|
if-ne v0, v1, :cond_0
|
|
|
|
.line 36
|
|
new-instance v1, Lorg/webrtc/GlUtil$GlOutOfMemoryException;
|
|
|
|
invoke-direct {v1, v0, p0}, Lorg/webrtc/GlUtil$GlOutOfMemoryException;-><init>(ILjava/lang/String;)V
|
|
|
|
goto :goto_0
|
|
|
|
.line 37
|
|
:cond_0
|
|
new-instance v1, Landroid/opengl/GLException;
|
|
|
|
new-instance v2, Ljava/lang/StringBuilder;
|
|
|
|
invoke-direct {v2}, Ljava/lang/StringBuilder;-><init>()V
|
|
|
|
invoke-virtual {v2, p0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v2, ": GLES20 error: "
|
|
|
|
invoke-virtual {p0, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0, v0}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
invoke-direct {v1, v0, p0}, Landroid/opengl/GLException;-><init>(ILjava/lang/String;)V
|
|
|
|
:goto_0
|
|
throw v1
|
|
|
|
:cond_1
|
|
return-void
|
|
.end method
|
|
|
|
.method public static createFloatBuffer([F)Ljava/nio/FloatBuffer;
|
|
.locals 2
|
|
|
|
.line 43
|
|
array-length v0, p0
|
|
|
|
mul-int/lit8 v0, v0, 0x4
|
|
|
|
invoke-static {v0}, Ljava/nio/ByteBuffer;->allocateDirect(I)Ljava/nio/ByteBuffer;
|
|
|
|
move-result-object v0
|
|
|
|
.line 44
|
|
invoke-static {}, Ljava/nio/ByteOrder;->nativeOrder()Ljava/nio/ByteOrder;
|
|
|
|
move-result-object v1
|
|
|
|
invoke-virtual {v0, v1}, Ljava/nio/ByteBuffer;->order(Ljava/nio/ByteOrder;)Ljava/nio/ByteBuffer;
|
|
|
|
.line 45
|
|
invoke-virtual {v0}, Ljava/nio/ByteBuffer;->asFloatBuffer()Ljava/nio/FloatBuffer;
|
|
|
|
move-result-object v0
|
|
|
|
.line 46
|
|
invoke-virtual {v0, p0}, Ljava/nio/FloatBuffer;->put([F)Ljava/nio/FloatBuffer;
|
|
|
|
const/4 p0, 0x0
|
|
|
|
.line 47
|
|
invoke-virtual {v0, p0}, Ljava/nio/FloatBuffer;->position(I)Ljava/nio/Buffer;
|
|
|
|
return-object v0
|
|
.end method
|
|
|
|
.method public static generateTexture(I)I
|
|
.locals 3
|
|
|
|
const/4 v0, 0x1
|
|
|
|
new-array v1, v0, [I
|
|
|
|
const/4 v2, 0x0
|
|
|
|
.line 56
|
|
invoke-static {v0, v1, v2}, Landroid/opengl/GLES20;->glGenTextures(I[II)V
|
|
|
|
aget v0, v1, v2
|
|
|
|
.line 58
|
|
invoke-static {p0, v0}, Landroid/opengl/GLES20;->glBindTexture(II)V
|
|
|
|
const/16 v1, 0x2801
|
|
|
|
const v2, 0x46180400 # 9729.0f
|
|
|
|
.line 59
|
|
invoke-static {p0, v1, v2}, Landroid/opengl/GLES20;->glTexParameterf(IIF)V
|
|
|
|
const/16 v1, 0x2800
|
|
|
|
.line 60
|
|
invoke-static {p0, v1, v2}, Landroid/opengl/GLES20;->glTexParameterf(IIF)V
|
|
|
|
const/16 v1, 0x2802
|
|
|
|
const v2, 0x47012f00 # 33071.0f
|
|
|
|
.line 61
|
|
invoke-static {p0, v1, v2}, Landroid/opengl/GLES20;->glTexParameterf(IIF)V
|
|
|
|
const/16 v1, 0x2803
|
|
|
|
.line 62
|
|
invoke-static {p0, v1, v2}, Landroid/opengl/GLES20;->glTexParameterf(IIF)V
|
|
|
|
const-string p0, "generateTexture"
|
|
|
|
.line 63
|
|
invoke-static {p0}, Lorg/webrtc/GlUtil;->checkNoGLES2Error(Ljava/lang/String;)V
|
|
|
|
return v0
|
|
.end method
|