horde3d-x
horde3d-x copied to clipboard
What is the version of horde2d and cocos2d-x that your fork based on.
I want to migrate it to cocos2d-x 2.x .
cocos2d-x 2.1 horde3d is branched from svn sourceforge half year ago.
I'm not familiar with 3d programming, but i want to display some 3d objects in my cocos2d-x game, i try to display a cocos2d-x CCSprite and horde3d KnightX Scene, but the cocos2d-x part doesn't display at all. Commenting out the ClearTarget
part in pipeline xml don't help too.
What steps should i take to make it work together, or is it possible at all?
Thanks very much.
It's so nice if i can use horde3d to add some 3d objects to my existing cocos2d-x game, and this feature can definitely improve horde3d's acceptance. I can put some time into this, but I need to be enlightened.
I think it is caused because h3d modifies some state, you should reset states before rendering with cocos2d-x. here is what I'm doing for state reset:
glViewport(0,0,width, height);
glDisable(GL_CULL_FACE);
glDisable(GL_DEPTH_TEST);
glDisable(GL_SCISSOR_TEST);
glDisable(GL_BLEND);
glLineWidth(1.0);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
glActiveTexture(GL_TEXTURE0);
for( unsigned int i = 0; i < ATTRIB_COUNT; ++i )
glDisableVertexAttribArray( i );
hope it helps. Also I don't want to discourage you using h3d, but cocos2d-x will also have an official 3d extension. If you are planning in the long term, maybe it is a better solution.