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

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

Overview (from thespec import 
  
  NVIDIA's next-generation graphics processor and its derivative
  designs support an extremely configurable mechanism know as "register
  combiners" for computing fragment colors.
  
  The register combiner mechanism is a significant redesign of NVIDIA's
  original TNT combiner mechanism as introduced by NVIDIA's RIVA
  TNT graphics processor.  Familiarity with the TNT combiners will
  help the reader appreciate the greatly enhanced register combiners
  functionality (see the NV_texture_env_combine4 OpenGL extension
  specification for this background).  The register combiner mechanism
  has the following enhanced functionality: 
  
    The numeric range of combiner computations is from  import 
    (instead of TNT's [0,1] numeric range),
  
    The set of available combiner inputs is expanded to include the
    secondary color, fog color, fog factor, and a second combiner
    constant color (TNT's available combiner inputs consist of
    only zero, a single combiner constant color, the primary color,
    texture 0, texture 1, and, in the case of combiner 1, the result
    of combiner 0).
  
    Each combiner variable input can be independently scaled and
    biased into several possible numeric ranges (TNT can only
    complement combiner inputs).
  
    Each combiner stage computes three distinct outputs (instead
    TNT's single combiner output).
  
    The output operations include support for computing dot products
    (TNT has no support for computing dot products).
  
    After each output operation, there is a configurable scale and bias
    applied (TNT's combiner operations builds in a scale and/or bias
    into some of its combiner operations).
  
    Each input variable for each combiner stage is fetched from any import 
    entry in a combiner register set.  Moreover, the outputs of each
    combiner stage are written into the register set of the subsequent
    combiner stage (TNT could only use the result from combineras import 
    a possible input to combiner 1; TNT lacks the notion of an
    input/output register set).
  
    The register combiner mechanism supports at least two general
    combiner stages and then a special final combiner stage appropriate
    for applying a color sum and fog computation (TNT provides two
    simpler combiner stages, and TNT's color sum and fog stages are
    hard-wired and not subsumed by the combiner mechanism as in register
    combiners).
  
  The register combiners fit into the OpenGL pipeline as a rasterization
  processing stage operating in parallel to the traditional OpenGL
  texture environment, color sum, AND fog application.  Enabling this
  extension bypasses OpenGL's existing texture environment, color
  sum, and fog application processing and instead use the register
  combiners.  The combiner and texture environment state is orthogonal
  so modifying combiner state does not change the traditional OpenGL
  texture environment state and the texture environment state is
  ignored when combiners are enabled.
  
  OpenGL application developers can use the register combiner mechanism
  for very sophisticated shading techniques.  For example, an
  approximation of Blinn's bump mapping technique can be achieved with
  the combiner mechanism.  Additionally, multi-pass shading models
  that require several passes with unextended OpenGL 1.2 functionality
  can be implemented in several fewer passes with register combiners.

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