• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Draw to an NSOpenGLView or NSView without subclassing them?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Draw to an NSOpenGLView or NSView without subclassing them?


  • Subject: Draw to an NSOpenGLView or NSView without subclassing them?
  • From: mirage_3d <email@hidden>
  • Date: Thu, 26 Feb 2009 22:15:32 +0800

hi there,
i'm designing a simple engine for a small app i'm developing and would like
to render some opengl in the interface. designing my engine, i would like to
have all the different components to inherit from one main entity class that
provides many engine-specific functions and data. problem is objective-c
doesn't allow multiple inheritance and cocoa opengl api - or any cocoa
viewport drawing method for that matter - implements opengl rendering by
subclassing NSView or NSOpenGLView.

so my question is whether it's possible to draw to either of the above
classes without subclassing them - by having my viewport-rendering class use
one of them as an ivar - and without resorting to the other OpenGL APIs -
CGL or AGL? i know categories and protocols provide a way around multiple
inheritance, but i would lose the engine-specific data in addition to super
class message propagation. i have done some research but found very little
out there regarding rendering engines in objective-c or cocoa, and i'm also
still a rookie in cocoa land.

thanks in advance for any help,

mirage3d
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: need help on understanding the crashreporter traces
  • Next by Date: Re: Subclassing with more restrictive initializers
  • Previous by thread: Re: noobie mem management problem
  • Next by thread: NSLayoutManager for NSTextField (was Re: Metrics for a NSTextField)
  • Index(es):
    • Date
    • Thread