Cocoa and OpenGL

bensta00
Unregistered
 
Post: #1
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.
Quote this message in a reply
Member
Posts: 118
Joined: 2002.08
Post: #2
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."
Quote this message in a reply
bensta00
Unregistered
 
Post: #3
OK thanks!

Ben
Quote this message in a reply
Member
Posts: 118
Joined: 2002.08
Post: #4
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.
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Opengl/Cocoa text rendering tesil 15 16,397 Mar 20, 2012 11:16 AM
Last Post: OneSadCookie
  OpenGL Text Rendering (in Cocoa) daveh84 5 7,472 Feb 19, 2009 12:44 PM
Last Post: TomorrowPlusX
  OpenGL & Cocoa - Improving frame rate daveh84 4 5,320 Feb 2, 2009 06:53 AM
Last Post: backslash
  bad depth sorting in Cocoa OpenGL aldermoore 2 4,448 Dec 30, 2008 03:07 PM
Last Post: ThemsAllTook
  Loading and using textures with alpha in OpenGL with Cocoa corporatenewt 4 5,688 Dec 8, 2007 02:06 PM
Last Post: Malarkey