Hi
I've been using hxsl for Flash. My draw calls are roughly:
for( i in 0...60) {
//Different texture for each vertex buffer
texturemappingShader.tex=texture2d[i];
texturemappingShader.bind( contex3d, vertexBuffer3d[i] );
//No more than 500 triangles for each index buffer
context3d.drawTriangles( indexBuffer3d[i], 0, nTriangles[i]);
texturemappingShader.tex = null;
texturemappingShader.unbind(context3d);
}
When I debug step into hxsl.Shader.bind(), which calls ShaderInstance.getInstance(), I see that the updateParams() is always called because the class member 'modified' is true.
Then the debugger steps into
@:autoBuild(hxsl.ShaderMacros.buildShader())
class Shader {
Does that mean my texture shader is rebuilt each time hxsl.Shader.bind() is called? Is that expensive?
I need to optimize and figure out why is my app rather slow.
Thanks