Mailing Lists: Apple Mailing Lists

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

Re: Thread safety and tex loading



Hi, I do not know the exact context of Your application and its limitations, but some garbage can be produced with concurrent read/ write. Note that texture loading tasks are You can use glFinish() to explicitly end particular texture processing tasks if that is Your question, but it may block Your other threads as well. As I have written I do not now, how does Your application look like.
Did you Read that? http://developer.apple.com/documentation/GraphicsImaging/Conceptual/OpenGL-MacProgGuide/opengl_threading/chapter_12_section_3.html


On 2008-05-14, at 23:08, Ben Supnik wrote:

Hi Y'all,

My code will re-specify the contents of textures using glTexSubImage2d...right now there is no locking between the main thread (which may be using the texture) and the worker threads (which are reloading textures).

On the GF8800 I see one-frame flashes in my scene as the textures are reloaded.

At one point I got a crash in gDrawElements while other threads were calling glSubTexImage2d...both stacks went into the driver a bit.

Do I need to be applying a bit more locking, either to be correct or to avoid artifacts?

cheers
ben
--
Scenery Home Page: http://scenery.x-plane.com/
Scenery blog: http://xplanescenery.blogspot.com/
Plugin SDK: http://www.xsquawkbox.net/xpsdk/
X-Plane Wiki: http://wiki.x-plane.com/
Scenery mailing list: email@hidden
Developer mailing list: email@hidden
_______________________________________________
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

_______________________________________________ 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
References: 
 >Thread safety and tex loading (From: Ben Supnik <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.