vertex_program2.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 » vertex_program2.py
'''OpenGL extension NV.vertex_program2

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

Overview (from thespec import 
  
  This extension further enhances the concept of vertex programmability
  introduced by the NV_vertex_program extension, and extended by
  NV_vertex_program1_1.  These extensions create a separate vertex program
  mode where the configurable vertex transformation operations in unextended
  OpenGL are replaced by a user-defined program.
  
  This extension introduces the VP2 execution environment, which extends the
  VP1 execution environment introduced in NV_vertex_program.  The VP2
  environment provides several language features not present in previous
  vertex programming execution environments:
  
    * Branch instructions allow a program to jump to another instruction
      specified in the program.
  
    * Branching support allows for up to four levels of subroutine
      calls/returns.
  
    * A four-component condition code register allows an application to
      compute a component-wise write mask at run time and apply that mask to
      register writes.  
  
    * Conditional branches are supported, where the condition code register
      is used to determine if a branch should be taken.
  
    * Programmable user clipping is supported support (via the CLP0-CLP5
      clip distance registers).  Primitives are clipped to the area where
      the interpolated clip distances are greater than or equal to zero.
  
    * Instructions can perform a component-wise absolute value operation on
      any operand load.
  
  The VP2 execution environment provides a number of new instructions, and
  extends the semantics of several instructions already defined in
  NV_vertex_program.
  
    * ARR:  Operates like ARL, except that float-to-int conversion is done
      by rounding.  Equivalent results could be achieved (less efficiently)
      in NV_vertex program using an ADD/ARL sequence and a program parameter
      holding the value 0.5.
  
    * BRA, CAL, RET:  Branch, subroutine call, and subroutine return
      instructions.
  
    * COS, SIN:  Adds support for high-precision sine and cosine
      computations.
  
    * FLR, FRC:  Adds support for computing the floor and fractional portion
      of floating-point vector components.  Equivalent results could be
      achieved (less efficiently) in NV_vertex_program using the EXP
      instruction to compute the fractional portion of one component at a
      time.
  
    * EX2, LG2:  Adds support for high-precision exponentiation and
      logarithm computations.
  
    * ARA:  Adds pairs of components of an address register; useful for
      looping and other operations.
  
    * SEQ, SFL, SGT, SLE, SNE, STR:  Add six new "set on" instructions,
      similar to the SLT and SGE instructions defined in NV_vertex_program.
      Equivalent results could be achieved (less efficiently) in
      NV_vertex_program with multiple SLT, SGE, and arithmetic instructions.
  
    * SSG:  Adds a new "set sign" operation, which produces a vector holding
      negative one for negative components, zero for components with a value
      of zero, and positive one for positive components.  Equivalent results
      could be achieved (less efficiently) in NV_vertex_program with
      multiple SLT, SGE, and arithmetic instructions.
  
    * The ARL instruction is extended to operate on four components instead
      of a single component.
  
    * All instructions that produce integer or floating-point result vectors
      have variants that update the condition code register based on the
      result vector.
  
  This extension also raises some of the resource limitations in the
  NV_vertex_program extension.
  
    * 256 program parameter registers (versus 96 in NV_vertex_program).
  
    * 16 temporary registers (versus 12 in NV_vertex_program).
  
    * Two four-component integer address registers (versus one
      single-component register in NV_vertex_program).
  
    * 256 total vertex program instructions (versus 128 in
      NV_vertex_program).
  
    * Including loops, programs can execute up to 64K instructions.
  

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/NV/vertex_program2.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.vertex_program2 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.