Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Threads & OpenGL




I have a pthread which is rendering a small set of quads with a small set of textures.


I want to create another context which shares the same resources and then upload new textures using the 2nd context in the main application thread without stopping the rendering thread.

Since I am using 2 separate contexts, will this work? I don't plan to delete any textures in the main application thread, just add new ones. Then I will create my new rendering array data in the main application thread and lock the mutex I use to stall the rendering thread, swap the rendering data, and unlock the mutex to let the rendering continue.

I know I can't do this with a single context because I'd have to access it from two threads at the same time.

Howard Shere
http://blogs.greendragon.com/index.php/gdc
Altair 8800a to Mac OS X so far...

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.