SIO2 in a multiview app?
+3
meteors
uprise78
aheirich
7 posters
SIO2 in a multiview app?
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
Is this going to be hard or easy? Any advice?
thank you
aheirich- Posts : 11
Join date : 2009-02-25
Re: SIO2 in a multiview app?
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
it wasn't hard
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.
aheirich- Posts : 11
Join date : 2009-02-25
Re: SIO2 in a multiview app?
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
You can use this technique to render to a widget and get a rearview mirror effect or monitor display effect, etc.
Best,
-j
meteors- Posts : 241
Join date : 2008-11-08
Location : Sunny Florida
Re: SIO2 in a multiview app?
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.
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.
Re: SIO2 in a multiview app?
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
Re: SIO2 in a multiview app?
@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
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
Re: SIO2 in a multiview app?
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.
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
not mixing
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
Re: SIO2 in a multiview app?
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
Re: SIO2 in a multiview app?
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
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
Similar topics
» Request: glut+SIO2 project template with SIO2 releases.
» SIO2 md2 Tutorial
» sio2 and big map
» SIO2 v1.3.6
» Budweiser, SIO2, & Beer Pong
» SIO2 md2 Tutorial
» sio2 and big map
» SIO2 v1.3.6
» Budweiser, SIO2, & Beer Pong
Permissions in this forum:
You cannot reply to topics in this forum