depth_clamp.py :  » Game-2D-3D » PyOpenGL » PyOpenGL-3.0.1 » OpenGL » GL » ARB » 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 » ARB » depth_clamp.py
'''OpenGL extension ARB.depth_clamp

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

Overview (from thespec import 
  
  Conventional OpenGL clips geometric primitives to a clip volume
  with six faces, two of which are the near and far clip planes.
  Clipping to the near and far planes of the clip volume ensures that
  interpolated depth values (after the depth range transform) must be
  in the [0,1] range.
  
  In some rendering applications such as shadow volumes, it is useful
  to allow line and polygon primitives to be rasterized without
  clipping the primitive to the near or far clip volume planes (side
  clip volume planes clip normally).  Without the near and far clip
  planes, rasterization (pixel coverage determination) in X and Y
  can proceed normally if we ignore the near and far clip planes.
  The one major issue is that fragments of a  primitive may extend
  beyond the conventional window space depth range for depth values
  (typically the range [0,1]).  Rather than discarding fragments that
  defy the window space depth range (effectively what near and far
  plane clipping accomplish), the depth values can be clamped to the
  current depth range.
  
  This extension provides exactly such functionality.  This
  functionality is useful to obviate the need for near plane capping
  of stenciled shadow volumes.  The functionality may also be useful
  for rendering geometry "beyond" the far plane if an alternative
  algorithm (rather than depth testing) for hidden surface removal is
  applied to such geometry (specifically, the painter's algorithm).
  Similar situations at the near clip plane can be avoided at the
  near clip plane where apparently solid objects can be "seen through"
  if they intersect the near clip plane.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ARB/depth_clamp.txt
'''
from OpenGL import platform,constants,constant,arrays
from OpenGL import extensions,wrapper
from OpenGL.GL import glget
import ctypes
from OpenGL.raw.GL.ARB.depth_clamp 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.