The widget in the 3D scene
2 posters
The widget in the 3D scene
I draw 3D scene and I have to draw the 2D button over 3D scene.
LOAD
DRAW
It is crashed when call sio2WidgetRender( _SIO2widget, sio2->_SIO2window, 0 );
Can I draw the widget in the 3D scene?
LOAD
- Code:
//2D
SIO2stream *_SIO2stream = sio2StreamOpen( "checkerplate.png", 1 );
if (_SIO2stream != NULL)
{
_SIO2widget = sio2WidgetInit ( "button" );
_SIO2material = sio2MaterialInit( "button" );
_SIO2image = sio2ImageInit ( "button" );
sio2ImageLoad( _SIO2image, _SIO2stream );
sio2ImageGenId( _SIO2image, 0, 0.0f );
_SIO2widget->_SIO2material = _SIO2material;
_SIO2material->_SIO2image[ SIO2_MATERIAL_CHANNEL0 ] = _SIO2image;
_SIO2material->blend = SIO2_MATERIAL_ALPHA;
_SIO2widget->_SIO2transform->scl->x = _SIO2image->width;
_SIO2widget->_SIO2transform->scl->y = _SIO2image->height;
_SIO2widget->_SIO2transform->loc->x = 20.0f;
_SIO2widget->_SIO2transform->loc->y = 20.0f;
_SIO2stream = sio2StreamClose( _SIO2stream );
}
DRAW
- Code:
if (_SIO2widget != NULL)
{
sio2WindowEnter2D( sio2->_SIO2window, 0.0f, 100.0f );
{
sio2WidgetRender( _SIO2widget, sio2->_SIO2window, 0 );
}
sio2WindowLeave2D();
}
It is crashed when call sio2WidgetRender( _SIO2widget, sio2->_SIO2window, 0 );
Can I draw the widget in the 3D scene?
Yogan- Posts : 6
Join date : 2009-04-27
Re: The widget in the 3D scene
To answer that question again...have you turned off png compression in the project settings of Xcode?
Re: The widget in the 3D scene
I turned off but it did not help...
Yogan- Posts : 6
Join date : 2009-04-27
Re: The widget in the 3D scene
Heuuuu dude have you initialized the widget system? sio2WidgetInit... check tutorial07
Permissions in this forum:
You cannot reply to topics in this forum