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

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

Overview (from thespec import 
  
  This extension provides a set of new features to the OpenGL Shading
  Language and related APIs to support capabilities of new hardware. In
  particular, this extension provides the following functionality:
  
     * New texture lookup functions are provided that allow shaders to
       access individual texels using integer coordinates referring to the
       texel location and level of detail. No filtering is performed. These
       functions allow applications to use textures as one-, two-, and
       three-dimensional arrays.
  
     * New texture lookup functions are provided that allow shaders to query
       the dimensions of a specific level-of-detail image of a texture
       object.
  
     * New texture lookup functions variants are provided that allow shaders
       to pass a constant integer vector used to offset the texel locations
       used during the lookup to assist in custom texture filtering
       operations.
  
     * New texture lookup functions are provided that allow shaders to
       access one- and two-dimensional array textures. The second, or third,
       coordinate is used to select the layer of the array to access.
  
     * New "Grad" texture lookup functions are provided that allow shaders
       to explicitely pass in derivative values which are used by the GL to
       compute the level-of-detail when performing a texture lookup.
  
     * A new texture lookup function is provided to access a buffer texture.
  
     * The existing absolute LOD texture lookup functions are no longer
       restricted to the vertex shader only.
  
     * The ability to specify and use cubemap textures with a
       DEPTH_COMPONENT internal format. This also enables shadow mapping on
       cubemaps. The 'q' coordinate is used as the reference value for
       comparisons. A set of new texture lookup functions is provided to
       lookup into shadow cubemaps.
  
     * The ability to specify if varying variables are interpolated in a
       non-perspective correct manner, if they are flat shaded or, if
       multi-sampling, if centroid sampling should be performed.
  
     * Full signed integer and unsigned integer support in the OpenGL
       Shading Language:
  
           - Integers are defined as 32 bit values using two's complement.
  
           - Unsigned integers and vectors thereof are added.
  
           - New texture lookup functions are provided that return integer
             values. These functions are to be used in conjunction with new
             texture formats whose components are actual integers, rather
             than integers that encode a floating-point value. To support
             these lookup functions, new integer and unsigned-integer
             sampler types are introduced.
  
           - Integer bitwise operators are now enabled.
  
           - Several built-in functions and operators now operate on
             integers or vectors of integers.
  
           - New vertex attribute functions are added that load integer
             attribute data and can be referenced in a vertex shader as
             integer data.
  
           - New uniform loading commands are added to load unsigned integer
             data.
  
           - Varying variables can now be (unsigned) integers. If declared
             as such, they have to be flat shaded.
  
           - Fragment shaders can define their own output variables, and
             declare them to be of type floating-point, integer or unsigned
             integer. These variables are bound to a fragment color index
             with the new API command BindFragDataLocationEXT(), and directed
             to buffers using the existing DrawBuffer or DrawBuffers API
             commands.
  
     * Added new built-in functions truncate() and round() to the shading
       language.
  
     * A new built-in variable accessible from withinvertexshadersthat import 
       holds the index <i> implicitly passed to ArrayElement to specify the
       vertex. This is called the vertex ID.
  
     * A new built-in variable accessible from withinfragmentgeometry import 
       shaders that hold the index of the currently processed
       primitive. This is called the primitive ID.
  
  This extension also briefly mentions a new shader type, called a geometry
  shader. A geometry shader is run after vertices are transformed, but
  before clipping. A geometry shader begins with a single primitive (point,
  line, triangle. It can read the attributes of any of the vertices in the
  primitive and use them to generate new primitives. A geometry shader has a
  fixed output primitive type (point, line strip, or triangle strip) and
  emits vertices to define a new primitive. Geometry shaders are discussed
  in detail in the GL_EXT_geometry_shader4 specification.

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