mirror of
https://github.com/samsonjs/media.git
synced 2026-03-26 09:35:47 +00:00
Fix gldemo
The GL program needs to be used before accessing its attributes. #minor-release PiperOrigin-RevId: 410768017
This commit is contained in:
parent
f946ade1d0
commit
fc0e6a075e
1 changed files with 1 additions and 1 deletions
|
|
@ -88,6 +88,7 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
} catch (IOException e) {
|
||||
throw new IllegalStateException(e);
|
||||
}
|
||||
program.use();
|
||||
GlUtil.Attribute[] attributes = program.getAttributes();
|
||||
for (GlUtil.Attribute attribute : attributes) {
|
||||
if (attribute.name.equals("a_position")) {
|
||||
|
|
@ -142,7 +143,6 @@ import org.checkerframework.checker.nullness.qual.MonotonicNonNull;
|
|||
// Run the shader program.
|
||||
GlUtil.Uniform[] uniforms = checkNotNull(this.uniforms);
|
||||
GlUtil.Attribute[] attributes = checkNotNull(this.attributes);
|
||||
checkNotNull(program).use();
|
||||
for (GlUtil.Uniform uniform : uniforms) {
|
||||
switch (uniform.name) {
|
||||
case "tex_sampler_0":
|
||||
|
|
|
|||
Loading…
Reference in a new issue