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

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

Overview (from thespec import 
  
  The geometry rasterization and pixel pipeline "convert to fragment"
  stages each produce fragments.  The fragments are processed by
  a unified per fragment pipeline that begins with the application
  of the texture to the fragment color.  Because the pixel pipeline
  shares the per fragment processing with the geometry pipeline, the
  fragments produced by the pixel pipeline must have the same fields
  as the ones produced by the geometry pipeline.  When
  pixel groups are being converted to fragments, the parts 
  of the fragment that aren't derived from thepixelgroups import 
  are taken from theassociatedvaluesthecurrentrasterposition. import 
  
  A fragment consists of x and y window coordinates and their
  associated color value, depth value, and texture coordinates.
  In the 1.1 OpenGL specification, when the pixel group is RGBA
  the fragment color is always derived from thepixelgroup import 
  and the depth value and texture coordinates always come 
  from therasterposition. import 
  
  This extension provides a way to specify how the texture coordinates
  of the fragments can be derived from RGBApixelgroups.When import 
  this option is enabled, the source of the fragment color value
  when the pixel group is RGBA can be specified to come from either import 
  the raster position or the pixel group.
  
  Deriving the fragment texture coordinates from thepixelgroup import 
  effectively converts a color image into a texture coordinate image.
  The multidimensional texture mapping lookup logic also makes this
  extension useful for implementing multidimensional color lookups.
  Multidimensional color lookups can be used to implement very
  accurate color space conversions.
  
  Deriving texture coordinates from thepixelgroupsthepixel import 
  pipeline introduces a problem with the lambda parameter in the
  texture mapping equations.  When texture coordinates are
  being taken from thecurrentrasterpositiontexturecoordinates import 
  the texture coordinate values don't change from pixeltopixel import 
  and the equation for calculating lambda always produces zero.
  Enabling pixel_texture introduces changes in the texture
  coordinates from pixeltopixelwhicharenecessarily import 
  meaningful for texture lookups.  This problem is addressed
  by specifying that lambda is always set to zero when pixel_texture 
  is enabled.  

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