Cocoa and OpenGL
Hi,
I have created a subclass of glview, I call it kGLView, and in the implementation I refer to the view as "self", so when I am setting context for example I use [self openGLContext]. How can I access this entity, "self", from outside of the subclass' source code?
I am trying to write wrapper functions for c++ access to the PBuffer and GLView.
Thanks for any help,
Ben.
I have created a subclass of glview, I call it kGLView, and in the implementation I refer to the view as "self", so when I am setting context for example I use [self openGLContext]. How can I access this entity, "self", from outside of the subclass' source code?
I am trying to write wrapper functions for c++ access to the PBuffer and GLView.
Thanks for any help,
Ben.
In Interface Builder make an outlet in the class of the object you want to access it from. This outlet should be connected to the instantiated "kGLView."
I hope it worked, my solution is correct but seems to be expressed in a less-than-eloquent manner.
Remember also, that objects created by instance that knows about kGLView can be told about it.
Remember also, that objects created by instance that knows about kGLView can be told about it.
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| Opengl/Cocoa text rendering | tesil | 15 | 14,412 |
Mar 20, 2012 11:16 AM Last Post: OneSadCookie |
|
| OpenGL Text Rendering (in Cocoa) | daveh84 | 5 | 6,617 |
Feb 19, 2009 12:44 PM Last Post: TomorrowPlusX |
|
| OpenGL & Cocoa - Improving frame rate | daveh84 | 4 | 4,915 |
Feb 2, 2009 06:53 AM Last Post: backslash |
|
| bad depth sorting in Cocoa OpenGL | aldermoore | 2 | 4,099 |
Dec 30, 2008 03:07 PM Last Post: ThemsAllTook |
|
| Loading and using textures with alpha in OpenGL with Cocoa | corporatenewt | 4 | 5,076 |
Dec 8, 2007 02:06 PM Last Post: Malarkey |
|

