2021-06-27 20:44:35 +00:00
|
|
|
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 */
|
2021-07-03 23:36:06 +00:00
|
|
|
public final int f1513c;
|
2021-06-27 20:44:35 +00:00
|
|
|
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;
|
2021-07-03 23:36:06 +00:00
|
|
|
this.f1513c = i2;
|
2021-06-27 20:44:35 +00:00
|
|
|
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) {
|
2021-07-03 23:36:06 +00:00
|
|
|
this((i3 & 1) != 0 ? f.f1509c : i, (i3 & 2) != 0 ? f.d : i2, null);
|
2021-06-27 20:44:35 +00:00
|
|
|
int i4 = i3 & 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void a() {
|
|
|
|
GLES20.glActiveTexture(p.m86constructorimpl(this.b));
|
2021-07-03 23:36:06 +00:00
|
|
|
GLES20.glBindTexture(p.m86constructorimpl(this.f1513c), p.m86constructorimpl(this.a));
|
2021-06-27 20:44:35 +00:00
|
|
|
d.b("bind");
|
|
|
|
}
|
|
|
|
|
|
|
|
public void b() {
|
2021-07-03 23:36:06 +00:00
|
|
|
GLES20.glBindTexture(p.m86constructorimpl(this.f1513c), p.m86constructorimpl(0));
|
|
|
|
GLES20.glActiveTexture(f.f1509c);
|
2021-06-27 20:44:35 +00:00
|
|
|
d.b("unbind");
|
|
|
|
}
|
|
|
|
}
|