SIO2 in a multiview app?

View previous topic View next topic Go down

SIO2 in a multiview app?

Post  aheirich on Sat Mar 07, 2009 11:08 am

I would like to make a tab bar view and have the SIO2 window appear as one of the views associated with the tab bar. The other views (on other tabs) are not SIO2 based.

Is this going to be hard or easy? Any advice?

thank you Smile

aheirich

Posts : 11
Join date : 2009-02-25

View user profile

Back to top Go down

Re: SIO2 in a multiview app?

Post  uprise78 on Sat Mar 07, 2009 12:56 pm

I wouldn't suggest even attempting it. Mixing openGL with UIKit is a recipe for disaster and memory issues

uprise78

Posts : 228
Join date : 2008-10-31

View user profile

Back to top Go down

it wasn't hard

Post  aheirich on Mon Mar 09, 2009 1:16 pm

I did it over the weekend, it was pretty easy. I found I had to start with a template project and add the multiview components to it, trying to go the other direction led to misery. I also found the app delegate has to be the owner of the glView, putting it into a subordinate UIViewController also led to misery. I copied the SIO2 components from the tutorial's MainWindow.xib into a new nib for a UITabViewController and put the SIO2 stuff under the first tab. Eventually it all worked. Surprised

aheirich

Posts : 11
Join date : 2009-02-25

View user profile

Back to top Go down

Re: SIO2 in a multiview app?

Post  meteors on Tue Mar 10, 2009 7:14 am

I'm not sure I completely understand what you are trying to do, but you might consider using render-to-texture.

You can use this technique to render to a widget and get a rearview mirror effect or monitor display effect, etc.


Best,
-j
avatar
meteors

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

View user profile

Back to top Go down

Re: SIO2 in a multiview app?

Post  Jawdy on Tue Mar 17, 2009 9:24 am

I built a basic GL-ES drawing app that was kind of what you're after.
Modify the mainwindow.xib and drop the top and/or bottom control bars, add the buttons and ctrl->drag the ownership from Files Owner to the objects, then from what I remember OpenGL-ES should take the available usable area as that between the buttons.

I can't quite remember exactly what I did (and it was following a tutorial too, so I can't take all the credit ;-) but if you haven't already figured it out and still want to know, give me a shout and I can _try_ and answer your questions when I'm in front of my Mac.
avatar
Jawdy

Posts : 65
Join date : 2009-03-17
Location : UK

View user profile http://www.gaslightgames.co.uk

Back to top Go down

Re: SIO2 in a multiview app?

Post  jonusx on Tue Mar 17, 2009 2:31 pm

I actually used sio2 in my app in this manner. I used the guide to use sio2 as a static library and went from there. It was pretty difficult and does cause a bit of memory problems, but its still pretty usable.

jonusx

Posts : 16
Join date : 2009-03-13

View user profile

Back to top Go down

Re: SIO2 in a multiview app?

Post  exavi on Thu Mar 19, 2009 10:15 am

@sio2interactive: would be cool to see some tutorial or example about how to do this as correctly as it can be.

I am doing something like that for my current project but I am doing it with widgets since not even apple recommends mixing both of them.
There is not much info on mixing OpenGL|ES and UIview on internet... some people says that there are memory leaks, apple says that the rendering performance drops...

This is the only document I've found from apple about this:

https://developer.apple.com/iphone/library/technotes/tn2008/tn2230.html#TNTAG4


widgets work OK as buttons, but if we have to do stuff like sliders,tables and so on... its hard to know which approach can be the most correct since everyone seems to have a different point of view about ogl+uiview

exavi

Posts : 37
Join date : 2008-10-21

View user profile

Back to top Go down

Re: SIO2 in a multiview app?

Post  uprise78 on Sun Mar 22, 2009 11:09 am

There are some videos available from the tech talks that touch on this. They recommend not mixing openGL and UIKit though of course it can be done. Their recommendations are basically summed up as if you really, really, REALLY need to mix UIKit with openGL, put UIKit controls on top of an opaque openGL view.

It seems like it would be better to make a few useful controls based on SIO2Widget and add them to the source tree.

uprise78

Posts : 228
Join date : 2008-10-31

View user profile

Back to top Go down

not mixing

Post  aheirich on Wed Mar 25, 2009 1:59 pm

My goal was not to mix UIKit and OpenGL-ES components in a view, just make the OpenGL-ES view one among a set of tab views. So when the game has control of the screen there is no UIKit involvement.

aheirich

Posts : 11
Join date : 2009-02-25

View user profile

Back to top Go down

Re: SIO2 in a multiview app?

Post  uprise78 on Wed Mar 25, 2009 2:06 pm

If there is a UIKit element anywhere in your view hierarchy, you are mixing UIKit and OpenGL.

uprise78

Posts : 228
Join date : 2008-10-31

View user profile

Back to top Go down

Re: SIO2 in a multiview app?

Post  yarri on Fri Apr 24, 2009 10:47 pm

Hi, I can post an example of a tutorial launching from a within a standard UITabView application, if anyone is interested?

We use UIkit for our game lobby, so I needed to create a new template app. This could be used to create one app that includes all tutorials, launching them from a UITableView for example.

--yarri

yarri

Posts : 81
Join date : 2009-04-10

View user profile

Back to top Go down

Re: SIO2 in a multiview app?

Post  Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


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