74 lines
2.1 KiB
Java
74 lines
2.1 KiB
Java
|
package c.o.b.f;
|
||
|
|
||
|
import android.opengl.GLES20;
|
||
|
import c.o.b.a.d;
|
||
|
import c.o.b.c.f;
|
||
|
import d0.p;
|
||
|
import d0.q;
|
||
|
import d0.z.d.m;
|
||
|
/* compiled from: GlTexture.kt */
|
||
|
public final class b {
|
||
|
public final int a;
|
||
|
public final int b;
|
||
|
|
||
|
/* renamed from: c reason: collision with root package name */
|
||
|
public final int f1518c;
|
||
|
public final Integer d;
|
||
|
public final Integer e;
|
||
|
public final Integer f;
|
||
|
public final Integer g;
|
||
|
|
||
|
public b(int i, int i2, Integer num) {
|
||
|
int i3;
|
||
|
this.b = i;
|
||
|
this.f1518c = i2;
|
||
|
this.d = null;
|
||
|
this.e = null;
|
||
|
this.f = null;
|
||
|
this.g = null;
|
||
|
if (num != null) {
|
||
|
i3 = num.intValue();
|
||
|
} else {
|
||
|
int[] r0 = q.m87constructorimpl(1);
|
||
|
int r1 = q.m90getSizeimpl(r0);
|
||
|
int[] iArr = new int[r1];
|
||
|
for (int i4 = 0; i4 < r1; i4++) {
|
||
|
iArr[i4] = q.m89getpVg5ArA(r0, i4);
|
||
|
}
|
||
|
GLES20.glGenTextures(1, iArr, 0);
|
||
|
for (int i5 = 0; i5 < 1; i5++) {
|
||
|
q.m91setVXSXFK8(r0, i5, p.m86constructorimpl(iArr[i5]));
|
||
|
}
|
||
|
d.b("glGenTextures");
|
||
|
i3 = q.m89getpVg5ArA(r0, 0);
|
||
|
}
|
||
|
this.a = i3;
|
||
|
if (num == null) {
|
||
|
a aVar = new a(this, null);
|
||
|
m.checkNotNullParameter(this, "$this$use");
|
||
|
m.checkNotNullParameter(aVar, "block");
|
||
|
a();
|
||
|
aVar.mo1invoke();
|
||
|
b();
|
||
|
}
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
||
|
public b(int i, int i2, Integer num, int i3) {
|
||
|
this((i3 & 1) != 0 ? f.f1514c : i, (i3 & 2) != 0 ? f.d : i2, null);
|
||
|
int i4 = i3 & 4;
|
||
|
}
|
||
|
|
||
|
public void a() {
|
||
|
GLES20.glActiveTexture(p.m86constructorimpl(this.b));
|
||
|
GLES20.glBindTexture(p.m86constructorimpl(this.f1518c), p.m86constructorimpl(this.a));
|
||
|
d.b("bind");
|
||
|
}
|
||
|
|
||
|
public void b() {
|
||
|
GLES20.glBindTexture(p.m86constructorimpl(this.f1518c), p.m86constructorimpl(0));
|
||
|
GLES20.glActiveTexture(f.f1514c);
|
||
|
d.b("unbind");
|
||
|
}
|
||
|
}
|