~matobet/pyopengl/Python3

« back to all changes in this revision

Viewing changes to GL/ARB/draw_instanced.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 ARB.draw_instanced
 
2
 
 
3
This module customises the behaviour of the 
 
4
OpenGL.raw.GL.ARB.draw_instanced to provide a more 
 
5
Python-friendly API
 
6
 
 
7
Overview (from the spec)
 
8
        
 
9
        A common use case in GL for some applications is to be able to
 
10
        draw the same object, or groups of similar objects that share
 
11
        vertex data, primitive count and type, multiple times.  This 
 
12
        extension provides a means of accelerating such use cases while 
 
13
        restricting the number of API calls, and keeping the amount of 
 
14
        duplicate data to a minimum.
 
15
        
 
16
        This extension introduces two draw calls which are conceptually
 
17
        equivalent to a series of draw calls.  Each conceptual call in
 
18
        this series is considered an "instance" of the actual draw call.
 
19
        
 
20
        This extension also introduces a read-only built-in variable to
 
21
        GLSL which contains the "instance ID."  This variable initially
 
22
        contains 0, but increases by one after each conceptual draw call.
 
23
        
 
24
        By using the instance ID or multiples thereof as an index into
 
25
        a uniform array containing transform data, vertex shaders can 
 
26
        draw multiple instances of an object with a single draw call.
 
27
 
 
28
The official definition of this extension is available here:
 
29
http://www.opengl.org/registry/specs/ARB/draw_instanced.txt
 
30
'''
 
31
from OpenGL import platform, constants, constant, arrays
 
32
from OpenGL import extensions, wrapper
 
33
from OpenGL.GL import glget
 
34
import ctypes
 
35
from OpenGL.raw.GL.ARB.draw_instanced import *
 
36
### END AUTOGENERATED SECTION
 
 
b'\\ No newline at end of file'