Reputation: 29051
I need to present an OpenGL "panel" on the same screen as some controls, web/text content, etc. Any suggestions? Ideally I'd have an OpenGL control that could be dropped onto a form in Interface Builder and manipulated in the same way that buttons, etc. can.
I suppose a good OpenGL UI toolbox that provided standard controls like buttons, gesture control, etc. would also work.
The best analogy I can think of at the moment would be presenting 3D content on the top 1/3rd of the iPad screen, and related text and text-related navigation controls on the bottom, like they've done with some of the textbooks in the Apple TV commercials.
I found this similar question, but am not really clear on the the meaning of the answer. (This is my first non-"Hello World" iOS app, so some of the terminology is unfamiliar.)
Upvotes: 1
Views: 192
Reputation: 26495
You should be able to use iPhoneOSGameView
to render any 3D content with OpenGL.
Here is an example of using it: https://github.com/xamarin/monotouch-samples/blob/master/GLPaint-GameView/PaintingView.cs
I would think you should be able to place one of these view in a UISplitViewController
on iPad, or just on 1/3 of the screen. This is that split screen control you see in the mail app, for example.
Also, to use a class from Interface Builder all you need is:
[Register("MyClass")]
class MyClass { public MyClass(IntPtr handle) : base(handle) { } }
So you have to register it, and include the IntPtr constructor.
Good luck, I haven't found an example of exactly what you're trying to do.
Upvotes: 1