File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -382,15 +382,11 @@ proc bindUniforms*(shader: Shader) =
382
382
if uniform.componentType == 0 .GLenum:
383
383
continue
384
384
385
- if uniform.componentType != cGL_INT and uniform.componentType != cGL_FLOAT:
386
- raiseUniformComponentTypeException(uniform.name, uniform.componentType)
387
-
388
385
if not uniform.changed:
389
386
continue
390
387
391
388
if uniform.componentType == cGL_INT:
392
389
let values = cast [array [16 , GLint]](uniform.values)
393
-
394
390
case uniform.kind:
395
391
of bkSCALAR:
396
392
glUniform1i(uniform.location, values[0 ])
@@ -408,7 +404,7 @@ proc bindUniforms*(shader: Shader) =
408
404
)
409
405
else :
410
406
raiseUniformKindException(uniform.name, uniform.kind)
411
- else :
407
+ elif uniform.componentType == cGL_FLOAT :
412
408
let values = cast [array [16 , float32 ]](uniform.values)
413
409
case uniform.kind:
414
410
of bkSCALAR:
@@ -434,6 +430,8 @@ proc bindUniforms*(shader: Shader) =
434
430
)
435
431
else :
436
432
raiseUniformKindException(uniform.name, uniform.kind)
433
+ else :
434
+ raiseUniformComponentTypeException(uniform.name, uniform.componentType)
437
435
438
436
uniform.changed = false
439
437
You can’t perform that action at this time.
0 commit comments