View Full Version : API shape and hardware shading

11 November 2011, 02:47 PM
I want to create a polygon that changes colors in shaded mode when the user selects it. I don't want to use script jobs to change the shader, too slow. I want to register a new shape. I've been exploring this for a couple days now and I would appreciate a little guidance. I managed to get it working on the "" by using the gl function table to change the draw colors of each vertex in the circle shape (ie "glFT.glColor3f(1.0, 0.0, 0.0)"), but its super buggy. Maybe I can create a pointer to the hardware shader using "MMaterial::getHwShaderNode" and manipulate that? Am I on the right track? Any help would be appreciated!

11 November 2011, 05:59 AM
Why is it super buggy, I mean what's the specific problem?
Why don't you use C++?

Also I hope that you are aware of MFnMesh:setVertexColor(). And if it isn't enough for you and you are really bored, then check out the docs example: hwColorPerVertexShader.cpp

CGTalk Moderation
11 November 2011, 05:59 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.