object_purgeable.py :  » Game-2D-3D » PyOpenGL » PyOpenGL-3.0.1 » OpenGL » GL » APPLE » Python Open Source

Home
Python Open Source
1.3.1.2 Python
2.Ajax
3.Aspect Oriented
4.Blog
5.Build
6.Business Application
7.Chart Report
8.Content Management Systems
9.Cryptographic
10.Database
11.Development
12.Editor
13.Email
14.ERP
15.Game 2D 3D
16.GIS
17.GUI
18.IDE
19.Installer
20.IRC
21.Issue Tracker
22.Language Interface
23.Log
24.Math
25.Media Sound Audio
26.Mobile
27.Network
28.Parser
29.PDF
30.Project Management
31.RSS
32.Search
33.Security
34.Template Engines
35.Test
36.UML
37.USB Serial
38.Web Frameworks
39.Web Server
40.Web Services
41.Web Unit
42.Wiki
43.Windows
44.XML
Python Open Source » Game 2D 3D » PyOpenGL 
PyOpenGL » PyOpenGL 3.0.1 » OpenGL » GL » APPLE » object_purgeable.py
'''OpenGL extension APPLE.object_purgeable

This module customises the behaviour of the 
OpenGL.raw.GL.APPLE.object_purgeable to provide a more 
Python-friendly API

Overview (from thespec import 
  
  This extension provides the ability to mark the storage of OpenGL
  objects as "purgeable".
  
  Many of today's modern virtual memory systems include the concept of
  purgeability in order to avoid unnecessary paging when the object
  contents are no longer needed.  In OpenGL, objects such as textures,
  vertex buffers, pixel buffers, and renderbuffers all have
  significant storage requirements.  By default, the OpenGL is
  required to preserve the contents of these objects regardless of
  system resource stress, such as vram shortage or physical memory
  shortage.  Often this is accomplished by temporarily paging the
  contents of objects that are not currently needed to some kind of
  secondary storage area.  This paging operation can be an unnecessary
  computational expense in the cases where the data is not going to be
  used again or where the content can be reproduced by the application
  with less expense than the paging operation would require.
  
  This extension defines a mechanism for the application to mark the
  storage of OpenGL objects as "purgeable" in order to influence these
  paging operations.  The application can further control the
  semantics of making object storage "purgeable" with two options
  ("volatile" and "released") and "unpurgeable" with two options
  ("undefined" and "retained")
  
  Applications that use this extension will typically follow one of
  two operational models.  The typical model for most applications is
  to mark an object storage as "purgeable" with the "volatile" option,
  and then later mark the storage as "unpurgeable" with the "retained"
  option. When this happens, the application may or may not need to
  respecify the object contents, depending on the whether the object
  storage was actually released.  The application can find out whether
  the storage was released by examining the return value of the
  function which marks the storage as "unpurgeable".  This model is
  useful when the application does not know at the time it marks the
  object storage as "purgeable" whether it will later need those
  contents to be valid.
  
  Another operational model is for an application to mark the storage
  for an object as "purgeable" with the "released" option, and then
  later mark the object "unpurgeable" with the "undefined" option.  In
  this latter model, the application intends to unconditionally reload
  the object contents later on, and so it tells the GL that it is okay
  if the contents are "undefined" when the storage is re-allocated.
  
  Note that in both models, it is possible for the contents to become
  undefined since they could have actually been purged from thesystem import 
  in either case.  The various options are still useful, however,
  since they give more information to the GL about what the
  application expects to happen and the GL can use this information to
  make better predictions about which paging choices will be more
  efficient.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/APPLE/object_purgeable.txt
'''
from OpenGL import platform,constants,constant,arrays
from OpenGL import extensions,wrapper
from OpenGL.GL import glget
import ctypes
from OpenGL.raw.GL.APPLE.object_purgeable import *
### END AUTOGENERATED SECTION
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.