1 / 3

Understanding Orphaned Objects and Texture Behavior in OpenGL Contexts

This document explains the behavior of orphaned texture objects in OpenGL, focusing on the binding and deletion processes across multiple contexts. It outlines how to bind texture IDs in different contexts, the effects of deleting objects, and the implications of binding context changes on object availability. Key points include the distinction between deletion and unbinding, the concept of reference counting, and the atomic nature of certain OpenGL commands. Understanding these behaviors is crucial for managing texture resources effectively in graphics programming.

teva
Download Presentation

Understanding Orphaned Objects and Texture Behavior in OpenGL Contexts

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Orphan Object (Bill) Current texture object behavior: • Bind ID in context 1 • Bind same ID in context 2 and start rendering against it • Delete object in context 1. • Object un-bound from all texture stages ONLY in context 1. • Object is deleted once no longer bound in any context. • After deletion name will be marked as available. • In single context case, delete will un-bind, refcount goes to zero, therefore is deleted.

  2. Orphan Object (Pat) Current texture object behavior: • Bind ID in context 1 • Bind same ID in context 2 and start rendering against it • Delete object in context 1. • Object un-bound from all texture stages ONLY in context 1. • Object ID no longer exists. Therefore same ID is available to create a new object. • Old object is deleted once no longer bound in any context. (But cannot be referenced by ID anymore) • In single context case, delete will un-bind, refcount goes to zero, therefore is deleted.

  3. GLX 1.3 spec • The results of changing a texture object while another context is using it are undefined. • All modifications to shared context state as a result of executing glBindTexture are atomic. Also, a texture object will not be deleted until it is no longer bound to any rendering context. • In general, OpenGL commands are not guaranteed to be atomic. The operation of glEndList and glDeleteLists are exceptions: modifications to the shared context state as a result of executing glEndList or glDeleteLists are atomic.

More Related