FORUM CLOSED, PLEASE REGISTER AT FORUM.SIO2INTERACTIVE.COM
Would you like to react to this message? Create an account in a few clicks or log in to continue.

SIO2widget in v1.3??

3 posters

Go down

SIO2widget in v1.3?? Empty SIO2widget in v1.3??

Post  meteors Fri Dec 12, 2008 6:05 pm

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
meteors
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

Back to top Go down

SIO2widget in v1.3?? Empty Re: SIO2widget in v1.3??

Post  uprise78 Mon Dec 15, 2008 10:39 pm

What is the code you are using?

uprise78

Posts : 228
Join date : 2008-10-31

Back to top Go down

SIO2widget in v1.3?? Empty Re: SIO2widget in v1.3??

Post  sio2interactive Mon Dec 15, 2008 11:43 pm

The problem that meteor had was that he didn't call sio2InitWidget(), new from v1.3..
sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

SIO2widget in v1.3?? Empty Re: SIO2widget in v1.3??

Post  meteors Tue Dec 16, 2008 5:26 am

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
meteors
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

Back to top Go down

SIO2widget in v1.3?? Empty Re: SIO2widget in v1.3??

Post  meteors Tue Dec 16, 2008 5:29 am

By the way, my image is 512x512.


Thanks!
-j
meteors
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

Back to top Go down

SIO2widget in v1.3?? Empty Re: SIO2widget in v1.3??

Post  sio2interactive Tue Dec 16, 2008 6:12 am

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 );


sio2interactive
sio2interactive

Posts : 1526
Join date : 2008-08-26
Age : 44
Location : Shanghai

http://sio2interactive.com

Back to top Go down

SIO2widget in v1.3?? Empty Re: SIO2widget in v1.3??

Post  uprise78 Wed Dec 17, 2008 8:06 pm

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

Back to top Go down

SIO2widget in v1.3?? Empty Re: SIO2widget in v1.3??

Post  meteors Wed Dec 17, 2008 9:46 pm

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
meteors
meteors

Posts : 241
Join date : 2008-11-08
Location : Sunny Florida

Back to top Go down

SIO2widget in v1.3?? Empty Re: SIO2widget in v1.3??

Post  uprise78 Wed Dec 17, 2008 10:10 pm

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().

uprise78

Posts : 228
Join date : 2008-10-31

Back to top Go down

SIO2widget in v1.3?? Empty Re: SIO2widget in v1.3??

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum