~matobet/pyopengl/Python3

« back to all changes in this revision

Viewing changes to GL/NV/parameter_buffer_object2.py

  • Committer: matobet at gmail
  • Date: 2010-06-26 14:11:04 UTC
  • Revision ID: matobet@gmail.com-20100626141104-k011ofmltgiiu60g
Initial

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
'''OpenGL extension NV.parameter_buffer_object2
 
2
 
 
3
This module customises the behaviour of the 
 
4
OpenGL.raw.GL.NV.parameter_buffer_object2 to provide a more 
 
5
Python-friendly API
 
6
 
 
7
Overview (from the spec)
 
8
        
 
9
        This extension builds on the NV_parameter_buffer_object extension to
 
10
        provide additional flexibility in sourcing data from buffer objects.  
 
11
        
 
12
        The original NV_parameter_buffer_object (PaBO) extension provided the
 
13
        ability to bind buffer objects to a set of numbered binding points and
 
14
        access them in assembly programs as though they were arrays of 32-bit
 
15
        scalars (via the BUFFER variable type) or arrays of four-component vectors
 
16
        with 32-bit scalar components (via the BUFFER4 variable type).  However,
 
17
        the functionality it provided had some significant limits on flexibility.
 
18
        Since any given buffer binding point could be used either as a BUFFER or
 
19
        BUFFER4, but not both, programs couldn't do both 32- and 128-bit fetches
 
20
        from a single binding point.  Additionally, No support was provided for
 
21
        8-, 16-, or 64-bit fetches, though they could be emulated using a larger
 
22
        loads, with bitfield operations and/or write masking to put components in
 
23
        the right places.  Indexing was supported, but strides were limited to 4-
 
24
        and 16-byte multiples, depending on whether BUFFER or BUFFER4 is used.
 
25
        
 
26
        This new extension provides the buffer variable declaration type CBUFFER
 
27
        to specify a buffer that is treated as an array of bytes, rather than an
 
28
        array of words or vectors.  The LDC instruction allows programs to extract
 
29
        a vector of data from a CBUFFER variable, using a size and component count
 
30
        specified in the opcode modifier.  1-, 2-, and 4-component fetches are
 
31
        supported.  The LDC instruction supports byte offsets using normal array
 
32
        indexing mechanisms; both run-time and immediate offsets are supported.
 
33
        Offsets used for a buffer object fetch are required to be aligned to the
 
34
        size of the fetch (1, 2, 4, 8, or 16 bytes).
 
35
 
 
36
The official definition of this extension is available here:
 
37
http://www.opengl.org/registry/specs/NV/parameter_buffer_object2.txt
 
38
'''
 
39
from OpenGL import platform, constants, constant, arrays
 
40
from OpenGL import extensions, wrapper
 
41
from OpenGL.GL import glget
 
42
import ctypes
 
43
from OpenGL.raw.GL.NV.parameter_buffer_object2 import *
 
44
### END AUTOGENERATED SECTION
 
 
b'\\ No newline at end of file'