SIO2widget in v1.3??
3 posters
SIO2widget in v1.3??
Hi all,
Has anyone tried using an SIO2widget in version 1.3 yet?
I am using code which worked in v1.2. But I just can't get get the damn widget to initialize!!
Thanks in advance,
-joshua
Has anyone tried using an SIO2widget in version 1.3 yet?
I am using code which worked in v1.2. But I just can't get get the damn widget to initialize!!
Thanks in advance,
-joshua
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Re: SIO2widget in v1.3??
The problem that meteor had was that he didn't call sio2InitWidget(), new from v1.3..
Re: SIO2widget in v1.3??
You mean sio2WidgetInit, right?
I did use it. Please see my code:
http://spaceweather.com/joshua/YOYO3/bugs.txt
I still can't get the widget to render....
Thanks!!
-j
I did use it. Please see my code:
http://spaceweather.com/joshua/YOYO3/bugs.txt
I still can't get the widget to render....
Thanks!!
-j
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Re: SIO2widget in v1.3??
By the way, my image is 512x512.
Thanks!
-j
Thanks!
-j
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Re: SIO2widget in v1.3??
This is the code that Im using to display a fullscreen info screen and render it in portrait mode...
- Code:
...
...
// Info screen...
_SIO2widget = sio2WidgetInit ( "info" );
_SIO2material = sio2MaterialInit( "info" );
_SIO2image = sio2ImageInit ( "info" );
_SIO2stream = sio2StreamOpen ( "info.tga", 1 );
sio2ImageLoad( _SIO2image, _SIO2stream );
sio2ImageGenId( _SIO2image, 0 );
_SIO2stream = sio2StreamClose( _SIO2stream );
_SIO2material->_SIO2image[ SIO2_MATERIAL_CHANNEL0 ] = _SIO2image;
_SIO2material->diffuse->w = 0.75f;
_SIO2widget->_SIO2material = _SIO2material;
_SIO2material->blend = SIO2_MATERIAL_ALPHA;
_SIO2widget->size->x = _SIO2image->width;
_SIO2widget->size->y = _SIO2image->height;
sio2EnableState( &_SIO2widget->flags, SIO2_WIDGET_VISIBLE );
...
...
sio2WidgetRender( sio2ResourceGetWidget( sio2->_SIO2resource, "info" ),
sio2->_SIO2window );
Re: SIO2widget in v1.3??
Did you ever get the widget to render? I get a crash in sio2WidgetRender on glDrawArrays( GL_TRIANGLE_FAN, 0, 4 ); every time. I can't seem to get the widget to display...Any ideas?
uprise78- Posts : 228
Join date : 2008-10-31
Re: SIO2widget in v1.3??
OK, I think I have the answer.
There is a new function in 1.3.
sio2InitWidget().
It goes in EAGLview.mm on line 132. You also need to put sio2ShutdownWidget() on line 364 of template.mm.
Was that your problem?
Best,
-joshua
There is a new function in 1.3.
sio2InitWidget().
It goes in EAGLview.mm on line 132. You also need to put sio2ShutdownWidget() on line 364 of template.mm.
Was that your problem?
Best,
-joshua
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Re: SIO2widget in v1.3??
Thanks,
That makes perfect sense and explains why glDrawArrays() was crashing: it had no array buffer to load. I totally didn't see that sio was saying to call sio2InitWidget(). I misconstrued it as sio2WidgetInit().
That makes perfect sense and explains why glDrawArrays() was crashing: it had no array buffer to load. I totally didn't see that sio was saying to call sio2InitWidget(). I misconstrued it as sio2WidgetInit().
uprise78- Posts : 228
Join date : 2008-10-31
Similar topics
» SIO2Widget help
» SIO2widget change in 1.4?
» How to use a sio2widget as a textbox?
» Rotating SIO2Widget?
» What is sio2Widget and are there any use examples out there?
» SIO2widget change in 1.4?
» How to use a sio2widget as a textbox?
» Rotating SIO2Widget?
» What is sio2Widget and are there any use examples out there?
Permissions in this forum:
You cannot reply to topics in this forum