• 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
Re: I'm so angry.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I'm so angry.


  • Subject: Re: I'm so angry.
  • From: Josh Morris <email@hidden>
  • Date: Sun, 30 Jun 2002 12:00:52 -0500

I'm sure that my view is double buffered, but there is code to flush it, so I know that is not the cause of this problem. In all honesty, I'm pretty sure it's something to do with the code being _in_ the framework.

Could it be something about dynamically loaded code being too slow to execute for OpenGL to draw or something?

On 2002.06.30, at 11:57, John Stauffer wrote:

My guess would be with the OpenGL init code and not the rendering code. One common problem is with thinking you got a double buffered context, but in fact you initialized the OpenGL view incorrectly.

As an experiment but a glFlush at the end of the rendering to see if your context is a single buffered context.

John

On Sunday, June 30, 2002, at 09:24 AM, Josh Morris wrote:

Sorry about the cross-posting, but it is directly applicable to both Cocoa and OpenGL, so I decided to try all venues.

I stayed up all night making a cocoa framework for modeling 3D objects, only to find that the gl* commands that are in the framework don't generate any graphics. The exact same code generates a square perfectly if not in a framework.

My code is:
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
glMatrixMode(GL_MODELVIEW);
glBegin(GL_QUADS);
glColor4f(1.0, 0.0, 0.0, 1.0);
glVertex3f(-0.5, -0.5, 0.0);

glColor4f(0.0, 1.0, 0.0, 1.0);
glVertex3f(0.5, -0.5, 0.0);

glColor4f(0.0, 0.0, 1.0, 1.0);
glVertex3f(0.5, 0.5, 0.0);

glColor4f(1.0, 0.0, 1.0, 1.0);
glVertex3f(-0.5, 0.5, 0.0);
glEnd();
glRotatef(-0.3, 0.0, 0.0, 1.0);

Jacked straight from the apple initGL example...

Is there any reason why GL code wouldn't run from inside a cocoa framework? Thanks for any help.
_______________________________________________
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.

References: 
 >Re: I'm so angry. (From: John Stauffer <email@hidden>)

  • Prev by Date: Re: set***Value: Method not working
  • Next by Date: ANSI VT-100 Terminal Emulation
  • Previous by thread: Re: I'm so angry.
  • Next by thread: Re: I'm so angry.
  • Index(es):
    • Date
    • Thread