menu options for an non-standard openGL context based application
menu options for an non-standard openGL context based application
- Subject: menu options for an non-standard openGL context based application
- From: Tobias Ford <email@hidden>
- Date: Tue, 18 Sep 2007 23:45:33 -0500
We have a game that creates an NSWindowed opengl context for windowed
use and a full screen openGL context when capturing the screen (the
default release behavior). It toggles between the two modes with key
combinations. I've not over-ridden NSApplication and I'm grabbing
the events using NSApplication nextEventMatchingMask. Also, while
the final application is bundled, there is no IB bundle being used in
the application. It's pretty much akin to a command line app being
launched from the bundle. This approach works great for solving the
base game event application requirements and slides in really well
with our other cross platform apis for creating the game view and
getting events.
In windowed debug mode though, I need to present either an os based
menu bar menu or a context pop-up menu for turning on and off various
features such as logging and rendering options for various systems.
All of the menu oriented examples that I've looked at either require
nib based solutions or at least a controller class which I don't
have. My attempts at just creating and populating a menu
programatically all crash further down in the Obj-C/Cocoa layers.
I'm guessing that this is due to some missing step in my
instantiation of the NSApplication.
My desired result is when hitting a key, unlocking the mouse from the
gl window, and then either creating this menu as a context or mousing
up to an already existing menu in the bar. I then need to be able to
catch the selection result so I can toggle a bool. Since, I'm not
nib/controller based, I'm at a loss for how to do this.
Has anyone done something like this? If you have, can you point me
to either an example or documentation to do something like this? I'm
fine with either Cocoa (which I have small knowledge of) or Carbon
solutions (no knowledge of).
Thanks in advance and sorry for the cross posts. I wasn't really
certain where this belonged. To the openGL list, I'm hoping that
some else has done this and figured it was a good chance.
-------------------
Tobias Ford...
tobias1482 'at' mac.com
tford 'at' spacetimestudios.com
-------------------
Sr Programmer @ space time studios for a generic space game mmo
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden