HeapsIO / heaps

Heaps : Haxe Game Framework
http://heaps.io
MIT License
3.22k stars 340 forks source link

Prevent cast int to Dyn in Shader's getParamValue #1198

Closed yuxiaomao closed 8 months ago

yuxiaomao commented 8 months ago

When a param is a Int, use getParamValue makes unnecessary cast from Int to Dynamic, which means a lots of alloc (at least in HL target). Add getParamIntValue (similar to getParamFloatValue) to fix this.

SetParamValue for Int seems less critical and I don't know how to manage DynamicShader, so I didn't added it.