• 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
Refresh woes for custom OGL pane
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Refresh woes for custom OGL pane


  • Subject: Refresh woes for custom OGL pane
  • From: Graham Wihlidal <email@hidden>
  • Date: Tue, 30 Apr 2002 03:04:16 -0600

I've subclassed NSOpenGLView and it is similar setup to Apple's NSGL teapot, etc...

I am not using DoubleBuffering via a Timer though because it hogs the CPU to hell and since this is the world builder for my 3D engine, I figured it should be easy to use and not have to quit it to smoothly type a message in ICQ :)

I'm basically calling [self drawRect] everytime the view changes via user input, etc... This works WAY better. Two problems though (so far :)

When the window first loads, the context is blank until I click which causes it to refresh (I have a mouse handler that did that)
When the window deminiaturizes it's blank as well

I am using NSWindowController to manage the window so it works well as a multi document system. I tried using windowDidDeminiaturize but it doesn't seem to be ever called :/

Guessing because NSWindowController is made to handle more than one window?

Anyways, I than tried that event within my view's implementation (Cocoa InitGL example has windowWillClose to invalidate timers, I thought it may work :) Nadda, it didn't hehe

How can I intercept that message and tell my pane to redraw?

I also tried calling [self drawRect] in the awakeFromNib and initWithFrame methods for my OGL view, didn't do anything.

Any ideas?

Thanks in advance,

Graham
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Refresh woes for custom OGL pane
      • From: "Erik M. Buck" <email@hidden>
  • Prev by Date: Re: Seeing an objects retain count
  • Next by Date: Re: setting color of a progress indicator?
  • Previous by thread: Re: Removing HTML Tags
  • Next by thread: Re: Refresh woes for custom OGL pane
  • Index(es):
    • Date
    • Thread