Skip to content

Commit

Permalink
fix uniform buffer array members get valid location
Browse files Browse the repository at this point in the history
  • Loading branch information
szabolcsdombi committed May 30, 2022
1 parent 91a58e4 commit f758ce5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions _zengl.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,14 +330,14 @@ def validate(attributes, uniforms, uniform_buffers, vertex_buffers, layout, reso
attributes = [
{
'name': obj['name'].replace('[0]', '[%d]' % i),
'location': obj['location'] + i,
'location': obj['location'] + i if obj['location'] >= 0 else -1,
}
for obj in attributes for i in range(obj['size'])
]
uniforms = [
{
'name': obj['name'].replace('[0]', '[%d]' % i),
'location': obj['location'] + i,
'location': obj['location'] + i if obj['location'] >= 0 else -1,
}
for obj in uniforms for i in range(obj['size'])
]
Expand Down

0 comments on commit f758ce5

Please sign in to comment.