Hello, I have MainScene where I added Scene2D (for 2D interface such as buttons) and Scene3D where I overrided draw method to use 3D rendering for some cubes and 3D objects
so here are code strings:
code for MainScene constructor
Scene2D* scene2d = [Scene2D node];
Scene3D* scene3d = [Scene3D node];
[self addChild:scene3d];
[self addChild:scene2d];
code for Scene2D constructor
CCLabel* label = [CCLabel labelWithString:@"2D scene text" fontName:@"Arial" fontSize:64];
CGSize size = [[CCDirector sharedDirector] winSize];
label.position = ccp( size.width /2 , 500 );
[self addChild: label];
code for Scene3D draw method
-(void) draw
{
m_renderingEngine->cocos2dRender();
[super draw];
}
so, 3D render is ok BUT I need to place all sprites and text on Scene2D in FRONT of Scene3D as Scene2D uses for interface
but in fact my 3D objects are in front of the text "2D scene text" which is situated on Scene2D
so the question is how to place all childs of Scene2D in front of Scene3D rendering objects