コード例 #1
0
def wrapPointerFunction( name, baseFunction, glType, arrayType,startArgs, defaultSize ):
    """Wrap the given pointer-setting function"""
    function= wrapper.wrapper( baseFunction )
    if 'ptr' in baseFunction.argNames:
        pointer_name = 'ptr'
    else:
        pointer_name = 'pointer'
    assert not getattr( function, 'pyConverters', None ), """Reusing wrappers?"""
    if arrayType:
        arrayModuleType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[ glType ]
        function.setPyConverter( pointer_name, arrays.asArrayType(arrayModuleType) )
    else:
        function.setPyConverter( pointer_name, arrays.AsArrayOfType(pointer_name,'type') )
    function.setCConverter( pointer_name, converters.getPyArgsName( pointer_name ) )
    if 'size' in function.argNames:
        function.setPyConverter( 'size' )
        function.setCConverter( 'size', arrays.arraySizeOfFirstType(arrayModuleType,defaultSize) )
    if 'type' in function.argNames:
        function.setPyConverter( 'type' )
        function.setCConverter( 'type', glType )
    if 'stride' in function.argNames:
        function.setPyConverter( 'stride' )
        function.setCConverter( 'stride', 0 )
    function.setStoreValues( arrays.storePointerType( pointer_name, arrayType ) )
    function.setReturnValues( wrapper.returnPyArgument( pointer_name ) )
    return name,function
コード例 #2
0
ファイル: arrayhelpers.py プロジェクト: Kupoman/pcgtests
 def setInputArraySizeType( baseOperation, size, type, argName=0 ):
     """Decorate function with vector-handling code for a single argument
     
     if OpenGL.ERROR_ON_COPY is False, then we return the 
     named argument, converting to the passed array type,
     optionally checking that the array matches size.
     
     if OpenGL.ERROR_ON_COPY is True, then we will dramatically 
     simplify this function, only wrapping if size is True, i.e.
     only wrapping if we intend to do a size check on the array.
     """
     function = wrapper.wrapper( baseOperation )
     if not hasattr( function, 'returnValues' ):
         if isinstance( argName, str):
             function.setReturnValues( converters.returnPyArgument(argName) )
         else:
             raise TypeError( 
                 """Argname should be a string/unicode: %s"""%(type(argName))
             )
     if size is not None:
         function.setPyConverter( argName, asArrayTypeSize(type, size) )
     else:
         function.setPyConverter( argName, asArrayType(type) )
     function.setCConverter( argName, converters.getPyArgsName( argName ) )
     return function
コード例 #3
0
ファイル: exceptional.py プロジェクト: CaptainAL/Spyder
def _baseWrap( base, lengthName='ncp', contourName='contour', divisor=2 ):
    """Do the basic wrapping operation for a GLE function"""
    return wrapper.wrapper( base ).setPyConverter(
        lengthName,
    ).setCConverter(
        lengthName, _lengthOfArgname( contourName, divisor, arrays.GLdoubleArray ),
    )
コード例 #4
0
ファイル: arrayhelpers.py プロジェクト: CaptainAL/Spyder
def setInputArraySizeType( baseOperation, size, type, argName=0 ):
    """Decorate function with vector-handling code for a single argument
    
    if OpenGL.ERROR_ON_COPY is False, then we return the 
    named argument, converting to the passed array type,
    optionally checking that the array matches size.
    
    if OpenGL.ERROR_ON_COPY is True, then we will dramatically 
    simplify this function, only wrapping if size is True, i.e.
    only wrapping if we intend to do a size check on the array.
    """
    from OpenGL import wrapper
    return wrapper.wrapper( baseOperation ).setInputArraySize( argName, size )
コード例 #5
0
def glDrawElementsTyped( type, suffix ):
    arrayType = arrays.GL_CONSTANT_TO_ARRAY_TYPE[ type ]
    function = wrapper.wrapper(
        simple.glDrawElements
    ).setPyConverter('type').setCConverter(
        'type', type
    ).setPyConverter('count').setCConverter(
        'count', arrays.AsArrayTypedSize( 'indices', arrayType ),
    ).setPyConverter(
        'indices', arrays.AsArrayTyped( 'indices', arrayType ),
    ).setReturnValues(
        wrapper.returnPyArgument( 'indices' )
    )
    return function
コード例 #6
0
ファイル: arrayhelpers.py プロジェクト: zoccolan/eyetracker
def setInputArraySizeType( baseOperation, size, type, argName=0 ):
	"""Decorate function with vector-handling code for a single argument
	
	This assumes *no* argument expansion, i.e. a 1:1 correspondence...
	"""
	function = wrapper.wrapper( baseOperation )
	if not hasattr( function, 'returnValues' ):
		function.setReturnValues( returnPointer )
	if size is not None:
		function.setPyConverter( argName, asArrayTypeSize(type, size) )
	else:
		function.setPyConverter( argName, asArrayType(type) )
	function.setCConverter( argName, converters.getPyArgsName( argName ) )
	return function
コード例 #7
0
ファイル: arrayhelpers.py プロジェクト: Kupoman/pcgtests
 def setInputArraySizeType( baseOperation, size, type, argName=0 ):
     """Decorate function with vector-handling code for a single argument
     
     if OpenGL.ERROR_ON_COPY is False, then we return the 
     named argument, converting to the passed array type,
     optionally checking that the array matches size.
     
     if OpenGL.ERROR_ON_COPY is True, then we will dramatically 
     simplify this function, only wrapping if size is True, i.e.
     only wrapping if we intend to do a size check on the array.
     """
     if size is not None:
         function = wrapper.wrapper( baseOperation )
         # return value is always the source array...
         function.setPyConverter( argName, asArrayTypeSize(type, size) )
         function.setCConverter( argName, 
             converters.getPyArgsName( argName ) 
         )
     else:
         function = baseOperation
     return function
コード例 #8
0
	of primitives.
	
	This extension builds on this functionality by providing procedures to
	invoke multiple draws from a single procedure call. This allows large
	batches of drawing commands to be assembled in server memory (via a buffer
	object) which may then be dispatched through a single function call.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/EXT/multi_draw_indirect.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GLES2 import _types, _glgets
from OpenGL.raw.GLES2.EXT.multi_draw_indirect import *
from OpenGL.raw.GLES2.EXT.multi_draw_indirect import _EXTENSION_NAME


def glInitMultiDrawIndirectEXT():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glMultiDrawArraysIndirectEXT.indirect size not checked against 'drawcount,stride'
glMultiDrawArraysIndirectEXT = wrapper.wrapper(
    glMultiDrawArraysIndirectEXT).setInputArraySize('indirect', None)
# INPUT glMultiDrawElementsIndirectEXT.indirect size not checked against 'drawcount,stride'
glMultiDrawElementsIndirectEXT = wrapper.wrapper(
    glMultiDrawElementsIndirectEXT).setInputArraySize('indirect', None)
### END AUTOGENERATED SECTION
コード例 #9
0
ファイル: texture4D.py プロジェクト: CaptainAL/Spyder
The official definition of this extension is available here:
http://www.opengl.org/registry/specs/SGIS/texture4D.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.SGIS.texture4D import *
from OpenGL.raw.GL.SGIS.texture4D import _EXTENSION_NAME

def glInitTexture4DSGIS():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glTexImage4DSGIS.pixels size not checked against 'format,type,width,height,depth,size4d'
glTexImage4DSGIS=wrapper.wrapper(glTexImage4DSGIS).setInputArraySize(
    'pixels', None
)
# INPUT glTexSubImage4DSGIS.pixels size not checked against 'format,type,width,height,depth,size4d'
glTexSubImage4DSGIS=wrapper.wrapper(glTexSubImage4DSGIS).setInputArraySize(
    'pixels', None
)
### END AUTOGENERATED SECTION

from OpenGL.GL import images as _i
_i.images.RANK_PACKINGS.setdefault(4,[]).extend([
    (_i.GL_1_1.glPixelStorei,GL_PACK_SKIP_VOLUMES_SGIS, 0),
    (_i.GL_1_1.glPixelStorei,GL_PACK_IMAGE_DEPTH_SGIS, 0),
])
コード例 #10
0
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.AMD.gpu_shader_int64 import *
from OpenGL.raw.GL.AMD.gpu_shader_int64 import _EXTENSION_NAME

def glInitGpuShaderInt64AMD():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glUniform1i64vNV.value size not checked against count
glUniform1i64vNV=wrapper.wrapper(glUniform1i64vNV).setInputArraySize(
    'value', None
)
# INPUT glUniform2i64vNV.value size not checked against None
glUniform2i64vNV=wrapper.wrapper(glUniform2i64vNV).setInputArraySize(
    'value', None
)
# INPUT glUniform3i64vNV.value size not checked against None
glUniform3i64vNV=wrapper.wrapper(glUniform3i64vNV).setInputArraySize(
    'value', None
)
# INPUT glUniform4i64vNV.value size not checked against None
glUniform4i64vNV=wrapper.wrapper(glUniform4i64vNV).setInputArraySize(
    'value', None
)
# INPUT glUniform1ui64vNV.value size not checked against count
glUniform1ui64vNV=wrapper.wrapper(glUniform1ui64vNV).setInputArraySize(
コード例 #11
0
ファイル: images.py プロジェクト: QtPyHammer-devs/PyOpenGL3
def asWrapper(value):
    if not isinstance(value, wrapper.Wrapper):
        return wrapper.wrapper(value)
    return value
コード例 #12
0
ファイル: VERSION_3_2.py プロジェクト: CaptainAL/Spyder
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GLES2 import _types, _glgets
from OpenGL.raw.GLES2.ES.VERSION_3_2 import *
from OpenGL.raw.GLES2.ES.VERSION_3_2 import _EXTENSION_NAME

def glInitVersion32ES():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glDebugMessageControl.ids size not checked against count
glDebugMessageControl=wrapper.wrapper(glDebugMessageControl).setInputArraySize(
    'ids', None
)
# INPUT glDebugMessageInsert.buf size not checked against 'buf,length'
glDebugMessageInsert=wrapper.wrapper(glDebugMessageInsert).setInputArraySize(
    'buf', None
)
glGetDebugMessageLog=wrapper.wrapper(glGetDebugMessageLog).setOutput(
    'ids',size=lambda x:(x,),pnameArg='count',orPassIn=True
).setOutput(
    'lengths',size=lambda x:(x,),pnameArg='count',orPassIn=True
).setOutput(
    'messageLog',size=lambda x:(x,),pnameArg='bufSize',orPassIn=True
).setOutput(
    'severities',size=lambda x:(x,),pnameArg='count',orPassIn=True
).setOutput(
    'sources',size=lambda x:(x,),pnameArg='count',orPassIn=True
コード例 #13
0
from OpenGL.GL import glget
import ctypes
from OpenGL.raw.GL.ARB.vertex_buffer_object import *
### END AUTOGENERATED SECTION
from OpenGL.lazywrapper import lazy
from OpenGL.arrays import ArrayDatatype

glDeleteBuffersARB = arrays.setInputArraySizeType(
    glDeleteBuffersARB,
    None,
    arrays.GLuintArray,
    'buffers',
)

glGenBuffersARB = wrapper.wrapper( glGenBuffersARB ).setOutput(
    'buffers', lambda n: (n,), 'n',
)

def _sizeOfArrayInput( pyArgs, index, wrapper ):
    return (
        arrays.ArrayDatatype.arrayByteCount( pyArgs[index] )
    )

@lazy( glBufferDataARB )
def glBufferDataARB( baseOperation, target, size, data=None, usage=None ):
    """Copy given data into the currently bound vertex-buffer-data object
    
    target -- the symbolic constant indicating which buffer type is intended
    size -- if provided, the count-in-bytes of the array
    data -- data-pointer to be used, may be None to initialize without 
        copying over a data-set 
コード例 #14
0
	after division by the vertex attribute divisor. This allows several sets of
	instanced vertex attribute data to be stored in a single vertex array, and
	the base offset of that data to be specified for each draw. Further, this
	extension exposes the <baseinstance> parameter as the final and previously
	undefined structure member of the draw-indirect data structure.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ARB/base_instance.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.base_instance import *
from OpenGL.raw.GL.ARB.base_instance import _EXTENSION_NAME


def glInitBaseInstanceARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glDrawElementsInstancedBaseInstance.indices size not checked against count
glDrawElementsInstancedBaseInstance = wrapper.wrapper(
    glDrawElementsInstancedBaseInstance).setInputArraySize('indices', None)
# INPUT glDrawElementsInstancedBaseVertexBaseInstance.indices size not checked against count
glDrawElementsInstancedBaseVertexBaseInstance = wrapper.wrapper(
    glDrawElementsInstancedBaseVertexBaseInstance).setInputArraySize(
        'indices', None)
### END AUTOGENERATED SECTION
コード例 #15
0
ファイル: GL_4_0.py プロジェクト: CaptainAL/Spyder
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.VERSION.GL_4_0 import *
from OpenGL.raw.GL.VERSION.GL_4_0 import _EXTENSION_NAME

def glInitGl40VERSION():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glUniform1dv.value size not checked against count
glUniform1dv=wrapper.wrapper(glUniform1dv).setInputArraySize(
    'value', None
)
# INPUT glUniform2dv.value size not checked against count*2
glUniform2dv=wrapper.wrapper(glUniform2dv).setInputArraySize(
    'value', None
)
# INPUT glUniform3dv.value size not checked against count*3
glUniform3dv=wrapper.wrapper(glUniform3dv).setInputArraySize(
    'value', None
)
# INPUT glUniform4dv.value size not checked against count*4
glUniform4dv=wrapper.wrapper(glUniform4dv).setInputArraySize(
    'value', None
)
# INPUT glUniformMatrix2dv.value size not checked against count*4
glUniformMatrix2dv=wrapper.wrapper(glUniformMatrix2dv).setInputArraySize(
コード例 #16
0
"""
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.NV.gpu_program4 import *
from OpenGL.raw.GL.NV.gpu_program4 import _EXTENSION_NAME


def glInitGpuProgram4NV():
    """Return boolean indicating whether this extension is available"""
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


glProgramLocalParameterI4ivNV = wrapper.wrapper(
    glProgramLocalParameterI4ivNV).setInputArraySize("params", 4)
# INPUT glProgramLocalParametersI4ivNV.params size not checked against count*4
glProgramLocalParametersI4ivNV = wrapper.wrapper(
    glProgramLocalParametersI4ivNV).setInputArraySize("params", None)
glProgramLocalParameterI4uivNV = wrapper.wrapper(
    glProgramLocalParameterI4uivNV).setInputArraySize("params", 4)
# INPUT glProgramLocalParametersI4uivNV.params size not checked against count*4
glProgramLocalParametersI4uivNV = wrapper.wrapper(
    glProgramLocalParametersI4uivNV).setInputArraySize("params", None)
glProgramEnvParameterI4ivNV = wrapper.wrapper(
    glProgramEnvParameterI4ivNV).setInputArraySize("params", 4)
# INPUT glProgramEnvParametersI4ivNV.params size not checked against count*4
glProgramEnvParametersI4ivNV = wrapper.wrapper(
    glProgramEnvParametersI4ivNV).setInputArraySize("params", None)
glProgramEnvParameterI4uivNV = wrapper.wrapper(
    glProgramEnvParameterI4uivNV).setInputArraySize("params", 4)
コード例 #17
0
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.VERSION.GL_4_0 import *
from OpenGL.raw.GL.VERSION.GL_4_0 import _EXTENSION_NAME


def glInitGl40VERSION():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glUniform1dv.value size not checked against count
glUniform1dv = wrapper.wrapper(glUniform1dv).setInputArraySize('value', None)
# INPUT glUniform2dv.value size not checked against count*2
glUniform2dv = wrapper.wrapper(glUniform2dv).setInputArraySize('value', None)
# INPUT glUniform3dv.value size not checked against count*3
glUniform3dv = wrapper.wrapper(glUniform3dv).setInputArraySize('value', None)
# INPUT glUniform4dv.value size not checked against count*4
glUniform4dv = wrapper.wrapper(glUniform4dv).setInputArraySize('value', None)
# INPUT glUniformMatrix2dv.value size not checked against count*4
glUniformMatrix2dv = wrapper.wrapper(glUniformMatrix2dv).setInputArraySize(
    'value', None)
# INPUT glUniformMatrix3dv.value size not checked against count*9
glUniformMatrix3dv = wrapper.wrapper(glUniformMatrix3dv).setInputArraySize(
    'value', None)
# INPUT glUniformMatrix4dv.value size not checked against count*16
glUniformMatrix4dv = wrapper.wrapper(glUniformMatrix4dv).setInputArraySize(
    'value', None)
コード例 #18
0
	mechanisms to fetch a specific sample from such a texture in a shader,
	and to attach such textures to FBOs for rendering.
	
	This extension also includes the following functionality, first described
	in NV_explicit_multisample:
	
	 * A query in the API to query the location of samples within the pixel
	
	 * An explicit control for the multisample sample mask to augment the
	   control provided by SampleCoverage

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ARB/texture_multisample.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.texture_multisample import *
from OpenGL.raw.GL.ARB.texture_multisample import _EXTENSION_NAME


def glInitTextureMultisampleARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


glGetMultisamplefv = wrapper.wrapper(glGetMultisamplefv).setOutput(
    'val', size=_glgets._glget_size_mapping, pnameArg='pname', orPassIn=True)
### END AUTOGENERATED SECTION
コード例 #19
0
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.AMD.performance_monitor import *
from OpenGL.raw.GL.AMD.performance_monitor import _EXTENSION_NAME

def glInitPerformanceMonitorAMD():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

glGetPerfMonitorGroupsAMD=wrapper.wrapper(glGetPerfMonitorGroupsAMD).setOutput(
    'groups',size=lambda x:(x,),pnameArg='groupsSize',orPassIn=True
).setOutput(
    'numGroups',size=(1,),orPassIn=True
)
glGetPerfMonitorCountersAMD=wrapper.wrapper(glGetPerfMonitorCountersAMD).setOutput(
    'counters',size=lambda x:(x,),pnameArg='counterSize',orPassIn=True
).setOutput(
    'maxActiveCounters',size=(1,),orPassIn=True
).setOutput(
    'numCounters',size=(1,),orPassIn=True
)
glGetPerfMonitorGroupStringAMD=wrapper.wrapper(glGetPerfMonitorGroupStringAMD).setOutput(
    'groupString',size=lambda x:(x,),pnameArg='bufSize',orPassIn=True
).setOutput(
    'length',size=(1,),orPassIn=True
)
glGetPerfMonitorCounterStringAMD=wrapper.wrapper(glGetPerfMonitorCounterStringAMD).setOutput(
コード例 #20
0
ファイル: fence.py プロジェクト: QtPyHammer-devs/PyOpenGL3
The official definition of this extension is available here:
https://www.opengl.org/registry/specs/NV/fence.txt
"""
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GLES2 import _types, _glgets
from OpenGL.raw.GLES2.NV.fence import *
from OpenGL.raw.GLES2.NV.fence import _EXTENSION_NAME


def glInitFenceNV():
    """Return boolean indicating whether this extension is available"""
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glDeleteFencesNV.fences size not checked against n
glDeleteFencesNV = wrapper.wrapper(glDeleteFencesNV).setInputArraySize(
    "fences", None)
glGenFencesNV = wrapper.wrapper(glGenFencesNV).setOutput("fences",
                                                         size=lambda x: (x, ),
                                                         pnameArg="n",
                                                         orPassIn=True)
glGetFenceivNV = wrapper.wrapper(glGetFenceivNV).setOutput(
    "params",
    size=_glgets._glget_size_mapping,
    pnameArg="pname",
    orPassIn=True)
# END AUTOGENERATED SECTION
コード例 #21
0
	
	Through the OpenGL API, buffer objects may be
	bound to these binding points with BindBufferBase
	or BindBufferRange.
	
	The contents of the atomic counters are stored
	in the buffer objects.  The contents of atomic
	counters may be set and queried with buffer object
	manipulation functions (e.g. BufferData,
	BufferSubData, MapBuffer or MapBufferRange).
	

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ARB/shader_atomic_counters.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.shader_atomic_counters import *
from OpenGL.raw.GL.ARB.shader_atomic_counters import _EXTENSION_NAME

def glInitShaderAtomicCountersARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

glGetActiveAtomicCounterBufferiv=wrapper.wrapper(glGetActiveAtomicCounterBufferiv).setOutput(
    'params',size=_glgets._glget_size_mapping,pnameArg='pname',orPassIn=True
)
### END AUTOGENERATED SECTION
コード例 #22
0
ファイル: vertex_program.py プロジェクト: EikiObara/myMaze
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.NV.vertex_program import *
from OpenGL.raw.GL.NV.vertex_program import _EXTENSION_NAME


def glInitVertexProgramNV():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glAreProgramsResidentNV.programs size not checked against n
glAreProgramsResidentNV = wrapper.wrapper(glAreProgramsResidentNV).setOutput(
    'residences', size=lambda x: (x, ), pnameArg='n',
    orPassIn=True).setInputArraySize('programs', None)
# INPUT glDeleteProgramsNV.programs size not checked against n
glDeleteProgramsNV = wrapper.wrapper(glDeleteProgramsNV).setInputArraySize(
    'programs', None)
glExecuteProgramNV = wrapper.wrapper(glExecuteProgramNV).setInputArraySize(
    'params', 4)
glGenProgramsNV = wrapper.wrapper(glGenProgramsNV).setOutput('programs',
                                                             size=lambda x:
                                                             (x, ),
                                                             pnameArg='n',
                                                             orPassIn=True)
glGetProgramParameterdvNV = wrapper.wrapper(
    glGetProgramParameterdvNV).setOutput('params', size=(4, ), orPassIn=True)
glGetProgramParameterfvNV = wrapper.wrapper(
    glGetProgramParameterfvNV).setOutput('params', size=(4, ), orPassIn=True)
コード例 #23
0
ファイル: shader_objects.py プロジェクト: CaptainAL/Spyder
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.shader_objects import *
from OpenGL.raw.GL.ARB.shader_objects import _EXTENSION_NAME

def glInitShaderObjectsARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glShaderSourceARB.length size not checked against count
# INPUT glShaderSourceARB.string size not checked against count
glShaderSourceARB=wrapper.wrapper(glShaderSourceARB).setInputArraySize(
    'length', None
).setInputArraySize(
    'string', None
)
# INPUT glUniform1fvARB.value size not checked against count
glUniform1fvARB=wrapper.wrapper(glUniform1fvARB).setInputArraySize(
    'value', None
)
# INPUT glUniform2fvARB.value size not checked against count*2
glUniform2fvARB=wrapper.wrapper(glUniform2fvARB).setInputArraySize(
    'value', None
)
# INPUT glUniform3fvARB.value size not checked against count*3
glUniform3fvARB=wrapper.wrapper(glUniform3fvARB).setInputArraySize(
    'value', None
)
# INPUT glUniform4fvARB.value size not checked against count*4
コード例 #24
0
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.vertex_program import *
from OpenGL.raw.GL.ARB.vertex_program import _EXTENSION_NAME


def glInitVertexProgramARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


glVertexAttrib1dvARB = wrapper.wrapper(glVertexAttrib1dvARB).setInputArraySize(
    'v', 1)
glVertexAttrib1fvARB = wrapper.wrapper(glVertexAttrib1fvARB).setInputArraySize(
    'v', 1)
glVertexAttrib1svARB = wrapper.wrapper(glVertexAttrib1svARB).setInputArraySize(
    'v', 1)
glVertexAttrib2dvARB = wrapper.wrapper(glVertexAttrib2dvARB).setInputArraySize(
    'v', 2)
glVertexAttrib2fvARB = wrapper.wrapper(glVertexAttrib2fvARB).setInputArraySize(
    'v', 2)
glVertexAttrib2svARB = wrapper.wrapper(glVertexAttrib2svARB).setInputArraySize(
    'v', 2)
glVertexAttrib3dvARB = wrapper.wrapper(glVertexAttrib3dvARB).setInputArraySize(
    'v', 3)
glVertexAttrib3fvARB = wrapper.wrapper(glVertexAttrib3fvARB).setInputArraySize(
    'v', 3)
glVertexAttrib3svARB = wrapper.wrapper(glVertexAttrib3svARB).setInputArraySize(
コード例 #25
0
ファイル: images.py プロジェクト: zoccolan/eyetracker
def asWrapper( value ):
	if not isinstance( value, wrapper.Wrapper ):
		return wrapper.wrapper( value )
	return value
コード例 #26
0
	operations on texture image data using the opcodes and mechanisms
	documented in the "Dependencies on NV_gpu_program5" section of the
	EXT_shader_image_load_store extension.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/NV/gpu_program5.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.NV.gpu_program5 import *
from OpenGL.raw.GL.NV.gpu_program5 import _EXTENSION_NAME


def glInitGpuProgram5NV():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glProgramSubroutineParametersuivNV.params size not checked against count
glProgramSubroutineParametersuivNV = wrapper.wrapper(
    glProgramSubroutineParametersuivNV).setInputArraySize('params', None)
glGetProgramSubroutineParameteruivNV = wrapper.wrapper(
    glGetProgramSubroutineParameteruivNV).setOutput(
        'param',
        size=_glgets._glget_size_mapping,
        pnameArg='target',
        orPassIn=True)
### END AUTOGENERATED SECTION
コード例 #27
0
ファイル: GL_3_2.py プロジェクト: EdwardBetts/fs-uae-launcher
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.VERSION.GL_3_2 import *
from OpenGL.raw.GL.VERSION.GL_3_2 import _EXTENSION_NAME

def glInitGl32VERSION():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glDrawElementsBaseVertex.indices size not checked against 'count,type'
glDrawElementsBaseVertex=wrapper.wrapper(glDrawElementsBaseVertex).setInputArraySize(
    'indices', None
)
# INPUT glDrawRangeElementsBaseVertex.indices size not checked against 'count,type'
glDrawRangeElementsBaseVertex=wrapper.wrapper(glDrawRangeElementsBaseVertex).setInputArraySize(
    'indices', None
)
# INPUT glDrawElementsInstancedBaseVertex.indices size not checked against 'count,type'
glDrawElementsInstancedBaseVertex=wrapper.wrapper(glDrawElementsInstancedBaseVertex).setInputArraySize(
    'indices', None
)
# INPUT glMultiDrawElementsBaseVertex.count size not checked against 'drawcount'
# INPUT glMultiDrawElementsBaseVertex.indices size not checked against 'drawcount'
# INPUT glMultiDrawElementsBaseVertex.basevertex size not checked against 'drawcount'
glMultiDrawElementsBaseVertex=wrapper.wrapper(glMultiDrawElementsBaseVertex).setInputArraySize(
    'count', None
).setInputArraySize(
コード例 #28
0
Almost all of the 1.2 enhancements are image-handling-related,
so this is, most of the 1.2 wrapper code...

Note that the functions that manually wrap certain operations are
guarded by if simple.functionName checks, so that you can use
if functionName to see if the function is available at run-time.
"""
from OpenGL import wrapper, constants, arrays
from OpenGL.lazywrapper import lazy
from OpenGL.raw.GL.VERSION import GL_1_2 as simple
from OpenGL.raw.GL.ARB import imaging
from OpenGL.GL import images
import ctypes

glGetHistogramParameterfv = wrapper.wrapper(simple.glGetHistogramParameterfv).setOutput(
    "params",(1,), 
)
glGetHistogramParameteriv = wrapper.wrapper(simple.glGetHistogramParameteriv).setOutput(
    "params",(1,), 
)

for suffix,arrayConstant in [
    ('b', constants.GL_BYTE),
    ('f', constants.GL_FLOAT),
    ('i', constants.GL_INT),
    ('s', constants.GL_SHORT),
    ('ub', constants.GL_UNSIGNED_BYTE),
    ('ui', constants.GL_UNSIGNED_INT),
    ('us', constants.GL_UNSIGNED_SHORT),
]:
    for functionName in (
コード例 #29
0
ファイル: GLES2_2_0.py プロジェクト: Stewori/JyOpenGL
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GLES2 import _types, _glgets
from OpenGL.raw.GLES2.VERSION.GLES2_2_0 import *
from OpenGL.raw.GLES2.VERSION.GLES2_2_0 import _EXTENSION_NAME

def glInitGles220VERSION():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glBufferData.data size not checked against size
glBufferData=wrapper.wrapper(glBufferData).setInputArraySize(
    'data', None
)
# INPUT glBufferSubData.data size not checked against size
glBufferSubData=wrapper.wrapper(glBufferSubData).setInputArraySize(
    'data', None
)
# INPUT glCompressedTexImage2D.data size not checked against imageSize
glCompressedTexImage2D=wrapper.wrapper(glCompressedTexImage2D).setInputArraySize(
    'data', None
)
# INPUT glCompressedTexSubImage2D.data size not checked against imageSize
glCompressedTexSubImage2D=wrapper.wrapper(glCompressedTexSubImage2D).setInputArraySize(
    'data', None
)
# INPUT glDeleteBuffers.buffers size not checked against n
glDeleteBuffers=wrapper.wrapper(glDeleteBuffers).setInputArraySize(
コード例 #30
0
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.OES.byte_coordinates import *
from OpenGL.raw.GL.OES.byte_coordinates import _EXTENSION_NAME


def glInitByteCoordinatesOES():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


glMultiTexCoord1bvOES = wrapper.wrapper(
    glMultiTexCoord1bvOES).setInputArraySize('coords', 1)
glMultiTexCoord2bvOES = wrapper.wrapper(
    glMultiTexCoord2bvOES).setInputArraySize('coords', 2)
glMultiTexCoord3bvOES = wrapper.wrapper(
    glMultiTexCoord3bvOES).setInputArraySize('coords', 3)
glMultiTexCoord4bvOES = wrapper.wrapper(
    glMultiTexCoord4bvOES).setInputArraySize('coords', 4)
glTexCoord1bvOES = wrapper.wrapper(glTexCoord1bvOES).setInputArraySize(
    'coords', 1)
glTexCoord2bvOES = wrapper.wrapper(glTexCoord2bvOES).setInputArraySize(
    'coords', 2)
glTexCoord3bvOES = wrapper.wrapper(glTexCoord3bvOES).setInputArraySize(
    'coords', 3)
glTexCoord4bvOES = wrapper.wrapper(glTexCoord4bvOES).setInputArraySize(
    'coords', 4)
glVertex2bvOES = wrapper.wrapper(glVertex2bvOES).setInputArraySize('coords', 2)
コード例 #31
0
Overview (from the spec)
	
	This extension adds the ability to format vertex arrays in a way that's 

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/INTEL/parallel_arrays.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.INTEL.parallel_arrays import *
from OpenGL.raw.GL.INTEL.parallel_arrays import _EXTENSION_NAME


def glInitParallelArraysINTEL():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


glVertexPointervINTEL = wrapper.wrapper(
    glVertexPointervINTEL).setInputArraySize('pointer', 4)
glNormalPointervINTEL = wrapper.wrapper(
    glNormalPointervINTEL).setInputArraySize('pointer', 4)
glColorPointervINTEL = wrapper.wrapper(glColorPointervINTEL).setInputArraySize(
    'pointer', 4)
glTexCoordPointervINTEL = wrapper.wrapper(
    glTexCoordPointervINTEL).setInputArraySize('pointer', 4)
### END AUTOGENERATED SECTION
コード例 #32
0
ファイル: imaging.py プロジェクト: QtPyHammer-devs/PyOpenGL3
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.imaging import *
from OpenGL.raw.GL.ARB.imaging import _EXTENSION_NAME


def glInitImagingARB():
    """Return boolean indicating whether this extension is available"""
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glColorTable.table size not checked against "format,type,width"
glColorTable = wrapper.wrapper(glColorTable).setInputArraySize("table", None)
# INPUT glColorTableParameterfv.params size not checked against "pname"
glColorTableParameterfv = wrapper.wrapper(
    glColorTableParameterfv).setInputArraySize("params", None)
# INPUT glColorTableParameteriv.params size not checked against "pname"
glColorTableParameteriv = wrapper.wrapper(
    glColorTableParameteriv).setInputArraySize("params", None)
# OUTPUT glGetColorTable.table COMPSIZE(target, format, type)
glGetColorTableParameterfv = wrapper.wrapper(
    glGetColorTableParameterfv).setOutput("params",
                                          size=_glgets._glget_size_mapping,
                                          pnameArg="pname",
                                          orPassIn=True)
glGetColorTableParameteriv = wrapper.wrapper(
    glGetColorTableParameteriv).setOutput("params",
                                          size=_glgets._glget_size_mapping,
コード例 #33
0
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GLES2 import _types, _glgets
from OpenGL.raw.GLES2.EXT.draw_elements_base_vertex import *
from OpenGL.raw.GLES2.EXT.draw_elements_base_vertex import _EXTENSION_NAME


def glInitDrawElementsBaseVertexEXT():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glDrawElementsBaseVertexEXT.indices size not checked against 'count,type'
glDrawElementsBaseVertexEXT = wrapper.wrapper(
    glDrawElementsBaseVertexEXT).setInputArraySize('indices', None)
# INPUT glDrawRangeElementsBaseVertexEXT.indices size not checked against 'count,type'
glDrawRangeElementsBaseVertexEXT = wrapper.wrapper(
    glDrawRangeElementsBaseVertexEXT).setInputArraySize('indices', None)
# INPUT glDrawElementsInstancedBaseVertexEXT.indices size not checked against 'count,type'
glDrawElementsInstancedBaseVertexEXT = wrapper.wrapper(
    glDrawElementsInstancedBaseVertexEXT).setInputArraySize('indices', None)
# INPUT glMultiDrawElementsBaseVertexEXT.basevertex size not checked against 'drawcount'
# INPUT glMultiDrawElementsBaseVertexEXT.count size not checked against 'drawcount'
# INPUT glMultiDrawElementsBaseVertexEXT.indices size not checked against 'drawcount'
glMultiDrawElementsBaseVertexEXT = wrapper.wrapper(
    glMultiDrawElementsBaseVertexEXT).setInputArraySize(
        'basevertex',
        None).setInputArraySize('count',
                                None).setInputArraySize('indices', None)
### END AUTOGENERATED SECTION
コード例 #34
0
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.program_interface_query import *
from OpenGL.raw.GL.ARB.program_interface_query import _EXTENSION_NAME


def glInitProgramInterfaceQueryARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glGetProgramInterfaceiv.params size not checked against 'pname'
glGetProgramInterfaceiv = wrapper.wrapper(
    glGetProgramInterfaceiv).setInputArraySize('params', None)
# INPUT glGetProgramResourceIndex.name size not checked against 'name'
glGetProgramResourceIndex = wrapper.wrapper(
    glGetProgramResourceIndex).setInputArraySize('name', None)
# INPUT glGetProgramResourceName.name size not checked against bufSize
glGetProgramResourceName = wrapper.wrapper(
    glGetProgramResourceName).setInputArraySize('length', 1).setInputArraySize(
        'name', None)
# INPUT glGetProgramResourceiv.params size not checked against bufSize
# INPUT glGetProgramResourceiv.props size not checked against propCount
glGetProgramResourceiv = wrapper.wrapper(
    glGetProgramResourceiv).setInputArraySize('length', 1).setInputArraySize(
        'params', None).setInputArraySize('props', None)
# INPUT glGetProgramResourceLocation.name size not checked against 'name'
glGetProgramResourceLocation = wrapper.wrapper(
    glGetProgramResourceLocation).setInputArraySize('name', None)
コード例 #35
0
	may have the luxury of more aggressive optimization at its disposal --
	program binaries generated online by the GL are interchangeable with those
	generated offline by an SDK tool.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ARB/get_program_binary.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.get_program_binary import *
from OpenGL.raw.GL.ARB.get_program_binary import _EXTENSION_NAME

def glInitGetProgramBinaryARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

glGetProgramBinary=wrapper.wrapper(glGetProgramBinary).setOutput(
    'binary',size=lambda x:(x,),pnameArg='bufSize',orPassIn=True
).setOutput(
    'binaryFormat',size=(1,),orPassIn=True
).setOutput(
    'length',size=(1,),orPassIn=True
)
# INPUT glProgramBinary.binary size not checked against length
glProgramBinary=wrapper.wrapper(glProgramBinary).setInputArraySize(
    'binary', None
)
### END AUTOGENERATED SECTION
コード例 #36
0
	
	The tessellation control and evaluation shaders are both optional.  If
	neither shader type is present, the tessellation stage has no effect.  If
	no tessellation control shader is present, the input patch provided by the
	application is passed directly to the tessellation primitive generator,
	and a set of default tessellation level parameters is used to control
	primitive generation.  In this extension, patches may not be passed beyond
	the tessellation evaluation shader, and an error is generated if an
	application provides patches and the current program object contains no
	tessellation evaluation shader.

The official definition of this extension is available here:
https://www.opengl.org/registry/specs/ARB/tessellation_shader.txt
"""
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.tessellation_shader import *
from OpenGL.raw.GL.ARB.tessellation_shader import _EXTENSION_NAME

def glInitTessellationShaderARB():
    """Return boolean indicating whether this extension is available"""
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)

# INPUT glPatchParameterfv.values size not checked against "pname"
glPatchParameterfv=wrapper.wrapper(glPatchParameterfv).setInputArraySize(
    "values", None
)
# END AUTOGENERATED SECTION
コード例 #37
0
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.EXT.convolution import *
from OpenGL.raw.GL.EXT.convolution import _EXTENSION_NAME

def glInitConvolutionEXT():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glConvolutionFilter1DEXT.image size not checked against 'format,type,width'
glConvolutionFilter1DEXT=wrapper.wrapper(glConvolutionFilter1DEXT).setInputArraySize(
    'image', None
)
# INPUT glConvolutionFilter2DEXT.image size not checked against 'format,type,width,height'
glConvolutionFilter2DEXT=wrapper.wrapper(glConvolutionFilter2DEXT).setInputArraySize(
    'image', None
)
# INPUT glConvolutionParameterfvEXT.params size not checked against 'pname'
glConvolutionParameterfvEXT=wrapper.wrapper(glConvolutionParameterfvEXT).setInputArraySize(
    'params', None
)
# INPUT glConvolutionParameterivEXT.params size not checked against 'pname'
glConvolutionParameterivEXT=wrapper.wrapper(glConvolutionParameterivEXT).setInputArraySize(
    'params', None
)
# OUTPUT glGetConvolutionFilterEXT.image COMPSIZE(target,format,type) 
glGetConvolutionParameterfvEXT=wrapper.wrapper(glGetConvolutionParameterfvEXT).setOutput(
	Additionally, this extension provides queryable implementation-dependent
	maximums for framebuffer width, height, layer count, and sample count,
	which may differ from similar limits on textures and renderbuffers.  These
	maximums will be used to error-check the default framebuffer parameters
	and also permit implementations to expose the ability to rasterize to an
	attachment-less framebuffer larger than the maximum supported texture
	size.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ARB/framebuffer_no_attachments.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.framebuffer_no_attachments import *
from OpenGL.raw.GL.ARB.framebuffer_no_attachments import _EXTENSION_NAME


def glInitFramebufferNoAttachmentsARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


glGetFramebufferParameteriv = wrapper.wrapper(
    glGetFramebufferParameteriv).setOutput('params',
                                           size=_glgets._glget_size_mapping,
                                           pnameArg='pname',
                                           orPassIn=True)
### END AUTOGENERATED SECTION
コード例 #39
0
ファイル: multitexture.py プロジェクト: CaptainAL/Spyder
http://www.opengl.org/registry/specs/ARB/multitexture.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.multitexture import *
from OpenGL.raw.GL.ARB.multitexture import _EXTENSION_NAME

def glInitMultitextureARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

glMultiTexCoord1dvARB=wrapper.wrapper(glMultiTexCoord1dvARB).setInputArraySize(
    'v', 1
)
glMultiTexCoord1fvARB=wrapper.wrapper(glMultiTexCoord1fvARB).setInputArraySize(
    'v', 1
)
glMultiTexCoord1ivARB=wrapper.wrapper(glMultiTexCoord1ivARB).setInputArraySize(
    'v', 1
)
glMultiTexCoord1svARB=wrapper.wrapper(glMultiTexCoord1svARB).setInputArraySize(
    'v', 1
)
glMultiTexCoord2dvARB=wrapper.wrapper(glMultiTexCoord2dvARB).setInputArraySize(
    'v', 2
)
glMultiTexCoord2fvARB=wrapper.wrapper(glMultiTexCoord2fvARB).setInputArraySize(
    'v', 2
コード例 #40
0
'''OpenGL extension EXT.framebuffer_object

This module customises the behaviour of the 
OpenGL.raw.GL.EXT.framebuffer_object to provide a more 
Python-friendly API
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL import extensions, wrapper
from OpenGL.GL import glget
import ctypes
from OpenGL.raw.GL.EXT.framebuffer_object import *
### END AUTOGENERATED SECTION
from OpenGL.lazywrapper import lazy

glGenFramebuffersEXT = wrapper.wrapper(glGenFramebuffersEXT).setOutput(
    'framebuffers', lambda x: (x, ), 'n')

glGenRenderbuffersEXT = wrapper.wrapper(glGenRenderbuffersEXT).setOutput(
    'renderbuffers', lambda x: (x, ), 'n')


@lazy(glDeleteFramebuffersEXT)
def glDeleteFramebuffersEXT(baseOperation, n, framebuffers=None):
    """glDeleteFramebuffersEXT( framebuffers ) -> None 
	"""
    if framebuffers is None:
        framebuffers = arrays.GLuintArray.asArray(n)
        n = arrays.GLuintArray.arraySize(framebuffers)
    return baseOperation(n, framebuffers)

コード例 #41
0
'''OpenGL extension OES.single_precision

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

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/OES/single_precision.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.OES.single_precision import *
from OpenGL.raw.GL.OES.single_precision import _EXTENSION_NAME

def glInitSinglePrecisionOES():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

glClipPlanefOES=wrapper.wrapper(glClipPlanefOES).setInputArraySize(
    'equation', 4
)
glGetClipPlanefOES=wrapper.wrapper(glGetClipPlanefOES).setInputArraySize(
    'equation', 4
)
### END AUTOGENERATED SECTION
コード例 #42
0
This module customises the behaviour of the 
OpenGL.raw.GLES1.EXT.multi_draw_arrays to provide a more 
Python-friendly API

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/EXT/multi_draw_arrays.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GLES1 import _types, _glgets
from OpenGL.raw.GLES1.EXT.multi_draw_arrays import *
from OpenGL.raw.GLES1.EXT.multi_draw_arrays import _EXTENSION_NAME


def glInitMultiDrawArraysEXT():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glMultiDrawArraysEXT.count size not checked against 'primcount'
# INPUT glMultiDrawArraysEXT.first size not checked against 'primcount'
glMultiDrawArraysEXT = wrapper.wrapper(glMultiDrawArraysEXT).setInputArraySize(
    'count', None).setInputArraySize('first', None)
# INPUT glMultiDrawElementsEXT.count size not checked against 'primcount'
# INPUT glMultiDrawElementsEXT.indices size not checked against 'primcount'
glMultiDrawElementsEXT = wrapper.wrapper(
    glMultiDrawElementsEXT).setInputArraySize('count', None).setInputArraySize(
        'indices', None)
### END AUTOGENERATED SECTION
コード例 #43
0
OpenGL.raw.GLES2.OES.get_program_binary to provide a more 
Python-friendly API

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/OES/get_program_binary.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GLES2 import _types, _glgets
from OpenGL.raw.GLES2.OES.get_program_binary import *
from OpenGL.raw.GLES2.OES.get_program_binary import _EXTENSION_NAME

def glInitGetProgramBinaryOES():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glGetProgramBinaryOES.binary size not checked against bufSize
glGetProgramBinaryOES=wrapper.wrapper(glGetProgramBinaryOES).setInputArraySize(
    'binary', None
).setInputArraySize(
    'binaryFormat', 1
).setInputArraySize(
    'length', 1
)
# INPUT glProgramBinaryOES.binary size not checked against length
glProgramBinaryOES=wrapper.wrapper(glProgramBinaryOES).setInputArraySize(
    'binary', None
)
### END AUTOGENERATED SECTION
コード例 #44
0
Overview (from the spec)
	
	This extension adds commands with single-precision floating-point
	parameters corresponding to the commands that only variants that
	accept double-precision floating-point input.  This allows an
	application to avoid using double-precision floating-point
	data types.  New commands are added with an 'f' prefix.
	

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/OES/single_precision.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.OES.single_precision import *
from OpenGL.raw.GL.OES.single_precision import _EXTENSION_NAME

def glInitSinglePrecisionOES():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

glClipPlanefOES=wrapper.wrapper(glClipPlanefOES).setInputArraySize(
    'equation', 4
)
glGetClipPlanefOES=wrapper.wrapper(glGetClipPlanefOES).setOutput(
    'equation',size=(4,),orPassIn=True
)
### END AUTOGENERATED SECTION
コード例 #45
0
ファイル: query_matrix.py プロジェクト: CaptainAL/Spyder
'''OpenGL extension OES.query_matrix

This module customises the behaviour of the 
OpenGL.raw.GLES1.OES.query_matrix to provide a more 
Python-friendly API

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/OES/query_matrix.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GLES1 import _types, _glgets
from OpenGL.raw.GLES1.OES.query_matrix import *
from OpenGL.raw.GLES1.OES.query_matrix import _EXTENSION_NAME

def glInitQueryMatrixOES():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

glQueryMatrixxOES=wrapper.wrapper(glQueryMatrixxOES).setOutput(
    'exponent',size=(16,),orPassIn=True
).setOutput(
    'mantissa',size=(16,),orPassIn=True
)
### END AUTOGENERATED SECTION
コード例 #46
0
import ctypes
from OpenGL.raw.GL.VERSION.GL_1_5 import *
### END AUTOGENERATED SECTION
from OpenGL.lazywrapper import lazy
from OpenGL.arrays import ArrayDatatype

glDeleteBuffers = arrays.setInputArraySizeType(
    glDeleteBuffers,
    None,
    arrays.GLuintArray,
    'buffers',
)

glGenBuffers = wrapper.wrapper(glGenBuffers).setOutput(
    'buffers',
    lambda n: (n, ),
    'n',
)


def _sizeOfArrayInput(pyArgs, index, wrapper):
    return (arrays.ArrayDatatype.arrayByteCount(pyArgs[index]))


@lazy(glBufferData)
def glBufferData(baseOperation, target, size, data=None, usage=None):
    """Copy given data into the currently bound vertex-buffer-data object

    target -- the symbolic constant indicating which buffer type is intended
    size -- if provided, the count-in-bytes of the array
    data -- data-pointer to be used, may be None to initialize without
コード例 #47
0
ファイル: color_subtable.py プロジェクト: CaptainAL/Spyder
OpenGL.raw.GL.EXT.color_subtable to provide a more 
Python-friendly API

Overview (from the spec)
	
	This extension allows a portion of a color table to be redefined.
	If EXT_copy_texture is implemented, this extension also defines a
	method to load a portion of a color lookup table from the 
	framebuffer.
	

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/EXT/color_subtable.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.EXT.color_subtable import *
from OpenGL.raw.GL.EXT.color_subtable import _EXTENSION_NAME

def glInitColorSubtableEXT():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glColorSubTableEXT.data size not checked against 'format,type,count'
glColorSubTableEXT=wrapper.wrapper(glColorSubTableEXT).setInputArraySize(
    'data', None
)
### END AUTOGENERATED SECTION
コード例 #48
0
	new built-in variables (gl_SecondaryFragColorEXT,
	gl_SecondaryFragDataEXT) are added to the ES 1.00 shading language
	rather than introduce more complex features for user-defined fragment
	outputs.  Because such built-in variable are deprecated in ES 3.0,
	these variables are NOT available in the OpenGL ES 3.xx shading
	language verisons.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/EXT/blend_func_extended.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GLES2 import _types, _glgets
from OpenGL.raw.GLES2.EXT.blend_func_extended import *
from OpenGL.raw.GLES2.EXT.blend_func_extended import _EXTENSION_NAME


def glInitBlendFuncExtendedEXT():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glBindFragDataLocationEXT.name size not checked against 'name'
glBindFragDataLocationEXT = wrapper.wrapper(
    glBindFragDataLocationEXT).setInputArraySize('name', None)
# INPUT glGetProgramResourceLocationIndexEXT.name size not checked against 'name'
glGetProgramResourceLocationIndexEXT = wrapper.wrapper(
    glGetProgramResourceLocationIndexEXT).setInputArraySize('name', None)
### END AUTOGENERATED SECTION
コード例 #49
0
http://www.opengl.org/registry/specs/NV/gpu_program4.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.NV.gpu_program4 import *
from OpenGL.raw.GL.NV.gpu_program4 import _EXTENSION_NAME

def glInitGpuProgram4NV():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

glProgramLocalParameterI4ivNV=wrapper.wrapper(glProgramLocalParameterI4ivNV).setInputArraySize(
    'params', 4
)
# INPUT glProgramLocalParametersI4ivNV.params size not checked against None
glProgramLocalParametersI4ivNV=wrapper.wrapper(glProgramLocalParametersI4ivNV).setInputArraySize(
    'params', None
)
glProgramLocalParameterI4uivNV=wrapper.wrapper(glProgramLocalParameterI4uivNV).setInputArraySize(
    'params', 4
)
# INPUT glProgramLocalParametersI4uivNV.params size not checked against None
glProgramLocalParametersI4uivNV=wrapper.wrapper(glProgramLocalParametersI4uivNV).setInputArraySize(
    'params', None
)
glProgramEnvParameterI4ivNV=wrapper.wrapper(glProgramEnvParameterI4ivNV).setInputArraySize(
    'params', 4
)
コード例 #50
0
ファイル: draw_instanced.py プロジェクト: CaptainAL/Spyder
	equivalent to a series of draw calls.  Each conceptual call in
	this series is considered an "instance" of the actual draw call.
	
	This extension also introduces a read-only built-in variable to
	GLSL which contains the "instance ID."  This variable initially
	contains 0, but increases by one after each conceptual draw call.
	
	By using the instance ID or multiples thereof as an index into
	a uniform array containing transform data, vertex shaders can 
	draw multiple instances of an object with a single draw call.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/ARB/draw_instanced.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.draw_instanced import *
from OpenGL.raw.GL.ARB.draw_instanced import _EXTENSION_NAME

def glInitDrawInstancedARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glDrawElementsInstancedARB.indices size not checked against 'count,type'
glDrawElementsInstancedARB=wrapper.wrapper(glDrawElementsInstancedARB).setInputArraySize(
    'indices', None
)
### END AUTOGENERATED SECTION
コード例 #51
0
ファイル: GL_3_0.py プロジェクト: CaptainAL/Spyder
http://www.opengl.org/registry/specs/VERSION/GL_3_0.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.VERSION.GL_3_0 import *
from OpenGL.raw.GL.VERSION.GL_3_0 import _EXTENSION_NAME

def glInitGl30VERSION():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

glGetBooleani_v=wrapper.wrapper(glGetBooleani_v).setOutput(
    'data',size=_glgets._glget_size_mapping,pnameArg='target',orPassIn=True
)
glGetIntegeri_v=wrapper.wrapper(glGetIntegeri_v).setOutput(
    'data',size=_glgets._glget_size_mapping,pnameArg='target',orPassIn=True
)
# INPUT glTransformFeedbackVaryings.varyings size not checked against count
glTransformFeedbackVaryings=wrapper.wrapper(glTransformFeedbackVaryings).setInputArraySize(
    'varyings', None
)
glGetTransformFeedbackVarying=wrapper.wrapper(glGetTransformFeedbackVarying).setOutput(
    'length',size=(1,),orPassIn=True
).setOutput(
    'name',size=lambda x:(x,),pnameArg='bufSize',orPassIn=True
).setOutput(
    'size',size=(1,),orPassIn=True
).setOutput(
コード例 #52
0
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.ES2_compatibility import *
from OpenGL.raw.GL.ARB.ES2_compatibility import _EXTENSION_NAME


def glInitEs2CompatibilityARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glShaderBinary.binary size not checked against length
# INPUT glShaderBinary.shaders size not checked against count
glShaderBinary = wrapper.wrapper(glShaderBinary).setInputArraySize(
    'binary', None).setInputArraySize('shaders', None)
glGetShaderPrecisionFormat = wrapper.wrapper(
    glGetShaderPrecisionFormat).setOutput('precision',
                                          size=(2, ),
                                          orPassIn=True).setOutput(
                                              'range',
                                              size=(2, ),
                                              orPassIn=True)
### END AUTOGENERATED SECTION
from OpenGL import lazywrapper as _lazywrapper
from OpenGL.arrays import GLintArray


@_lazywrapper.lazy(glGetShaderPrecisionFormat)
def glGetShaderPrecisionFormat(baseOperation,
                               shadertype,
コード例 #53
0
ファイル: sampler_objects.py プロジェクト: CaptainAL/Spyder
http://www.opengl.org/registry/specs/ARB/sampler_objects.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.sampler_objects import *
from OpenGL.raw.GL.ARB.sampler_objects import _EXTENSION_NAME

def glInitSamplerObjectsARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

glGenSamplers=wrapper.wrapper(glGenSamplers).setOutput(
    'samplers',size=lambda x:(x,),pnameArg='count',orPassIn=True
)
# INPUT glDeleteSamplers.samplers size not checked against count
glDeleteSamplers=wrapper.wrapper(glDeleteSamplers).setInputArraySize(
    'samplers', None
)
# INPUT glSamplerParameteriv.param size not checked against 'pname'
glSamplerParameteriv=wrapper.wrapper(glSamplerParameteriv).setInputArraySize(
    'param', None
)
# INPUT glSamplerParameterfv.param size not checked against 'pname'
glSamplerParameterfv=wrapper.wrapper(glSamplerParameterfv).setInputArraySize(
    'param', None
)
# INPUT glSamplerParameterIiv.param size not checked against 'pname'
glSamplerParameterIiv=wrapper.wrapper(glSamplerParameterIiv).setInputArraySize(
コード例 #54
0
ファイル: GL_4_3.py プロジェクト: ERicBastida/BEcopter
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.VERSION.GL_4_3 import *
from OpenGL.raw.GL.VERSION.GL_4_3 import _EXTENSION_NAME


def glInitGl43VERSION():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glClearBufferData.data size not checked against 'format,type'
glClearBufferData = wrapper.wrapper(glClearBufferData).setInputArraySize(
    'data', None)
# INPUT glClearBufferSubData.data size not checked against 'format,type'
glClearBufferSubData = wrapper.wrapper(glClearBufferSubData).setInputArraySize(
    'data', None)
glGetFramebufferParameteriv = wrapper.wrapper(
    glGetFramebufferParameteriv).setOutput('params',
                                           size=_glgets._glget_size_mapping,
                                           pnameArg='pname',
                                           orPassIn=True)
glGetInternalformati64v = wrapper.wrapper(glGetInternalformati64v).setOutput(
    'params', size=lambda x: (x, ), pnameArg='bufSize', orPassIn=True)
# INPUT glInvalidateFramebuffer.attachments size not checked against numAttachments
glInvalidateFramebuffer = wrapper.wrapper(
    glInvalidateFramebuffer).setInputArraySize('attachments', None)
# INPUT glInvalidateSubFramebuffer.attachments size not checked against numAttachments
glInvalidateSubFramebuffer = wrapper.wrapper(
コード例 #55
0
ファイル: GL_1_0.py プロジェクト: EdwardBetts/fs-uae-launcher
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.VERSION.GL_1_0 import *
from OpenGL.raw.GL.VERSION.GL_1_0 import _EXTENSION_NAME

def glInitGl10VERSION():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension( _EXTENSION_NAME )

# INPUT glTexParameterfv.params size not checked against 'pname'
glTexParameterfv=wrapper.wrapper(glTexParameterfv).setInputArraySize(
    'params', None
)
# INPUT glTexParameteriv.params size not checked against 'pname'
glTexParameteriv=wrapper.wrapper(glTexParameteriv).setInputArraySize(
    'params', None
)
# INPUT glTexImage1D.pixels size not checked against 'format,type,width'
glTexImage1D=wrapper.wrapper(glTexImage1D).setInputArraySize(
    'pixels', None
)
# INPUT glTexImage2D.pixels size not checked against 'format,type,width,height'
glTexImage2D=wrapper.wrapper(glTexImage2D).setInputArraySize(
    'pixels', None
)
# OUTPUT glReadPixels.pixels COMPSIZE(format,type,width,height) 
glGetBooleanv=wrapper.wrapper(glGetBooleanv).setOutput(
コード例 #56
0
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.EXT.coordinate_frame import *
from OpenGL.raw.GL.EXT.coordinate_frame import _EXTENSION_NAME


def glInitCoordinateFrameEXT():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


glTangent3bvEXT = wrapper.wrapper(glTangent3bvEXT).setInputArraySize('v', 3)
glTangent3dvEXT = wrapper.wrapper(glTangent3dvEXT).setInputArraySize('v', 3)
glTangent3fvEXT = wrapper.wrapper(glTangent3fvEXT).setInputArraySize('v', 3)
glTangent3ivEXT = wrapper.wrapper(glTangent3ivEXT).setInputArraySize('v', 3)
glTangent3svEXT = wrapper.wrapper(glTangent3svEXT).setInputArraySize('v', 3)
glBinormal3bvEXT = wrapper.wrapper(glBinormal3bvEXT).setInputArraySize('v', 3)
glBinormal3dvEXT = wrapper.wrapper(glBinormal3dvEXT).setInputArraySize('v', 3)
glBinormal3fvEXT = wrapper.wrapper(glBinormal3fvEXT).setInputArraySize('v', 3)
glBinormal3ivEXT = wrapper.wrapper(glBinormal3ivEXT).setInputArraySize('v', 3)
glBinormal3svEXT = wrapper.wrapper(glBinormal3svEXT).setInputArraySize('v', 3)
# INPUT glTangentPointerEXT.pointer size not checked against 'type,stride'
glTangentPointerEXT = wrapper.wrapper(glTangentPointerEXT).setInputArraySize(
    'pointer', None)
# INPUT glBinormalPointerEXT.pointer size not checked against 'type,stride'
glBinormalPointerEXT = wrapper.wrapper(glBinormalPointerEXT).setInputArraySize(
    'pointer', None)
コード例 #57
0
from OpenGL.GL import glget
import ctypes
from OpenGL.raw.GL.ARB.vertex_buffer_object import *
### END AUTOGENERATED SECTION
from OpenGL.lazywrapper import lazy
from OpenGL.arrays import ArrayDatatype

glDeleteBuffersARB = arrays.setInputArraySizeType(
    glDeleteBuffersARB,
    None,
    arrays.GLuintArray,
    'buffers',
)

glGenBuffersARB = wrapper.wrapper( glGenBuffersARB ).setOutput(
    'buffers', lambda n: (n,), 'n',
)

def _sizeOfArrayInput( pyArgs, index, wrapper ):
    return (
        arrays.ArrayDatatype.arrayByteCount( pyArgs[index] )
    )

@lazy( glBufferDataARB )
def glBufferDataARB( baseOperation, target, size, data=None, usage=None ):
    """Copy given data into the currently bound vertex-buffer-data object
    
    target -- the symbolic constant indicating which buffer type is intended
    size -- if provided, the count-in-bytes of the array
    data -- data-pointer to be used, may be None to initialize without 
        copying over a data-set 
コード例 #58
0
	feedback (NV_transform_feedback), buffer object loading functions such as
	MapBuffer and BufferData, as well as dedicated parameter buffer update
	functions provided by this extension.

The official definition of this extension is available here:
http://www.opengl.org/registry/specs/NV/parameter_buffer_object.txt
'''
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.NV.parameter_buffer_object import *
from OpenGL.raw.GL.NV.parameter_buffer_object import _EXTENSION_NAME


def glInitParameterBufferObjectNV():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glProgramBufferParametersfvNV.params size not checked against count
glProgramBufferParametersfvNV = wrapper.wrapper(
    glProgramBufferParametersfvNV).setInputArraySize('params', None)
# INPUT glProgramBufferParametersIivNV.params size not checked against count
glProgramBufferParametersIivNV = wrapper.wrapper(
    glProgramBufferParametersIivNV).setInputArraySize('params', None)
# INPUT glProgramBufferParametersIuivNV.params size not checked against count
glProgramBufferParametersIuivNV = wrapper.wrapper(
    glProgramBufferParametersIuivNV).setInputArraySize('params', None)
### END AUTOGENERATED SECTION
コード例 #59
0
ファイル: GL_2_0.py プロジェクト: zoccolan/eyetracker
glShaderSource = platform.createBaseFunction( 
	'glShaderSource', dll=platform.GL,
	resultType=None, 
	argTypes=(constants.GLhandle, constants.GLsizei, ctypes.POINTER(ctypes.c_char_p), arrays.GLintArray,),
	doc = 'glShaderSource( GLhandle(shaderObj), str( string) ) -> None',
	argNames = ('shaderObj', 'count', 'string', 'length',),
)
conv = converters.StringLengths( name='string' )
glShaderSource = wrapper.wrapper(
	glShaderSource
).setPyConverter(
	'count' # number of strings
).setPyConverter( 
	'length' # lengths of strings
).setPyConverter(
	'string', conv.stringArray
).setCResolver(
	'string', conv.stringArrayForC,
).setCConverter(
	'length', conv,
).setCConverter(
	'count', conv.totalCount,
)
del conv

for size in (1,2,3,4):
	for format,arrayType in (
		('f',arrays.GLfloatArray),
		('i',arrays.GLintArray),
	):
		name = 'glUniform%(size)s%(format)sv'%globals()
コード例 #60
0
from OpenGL import platform, constant, arrays
from OpenGL import extensions, wrapper
import ctypes
from OpenGL.raw.GL import _types, _glgets
from OpenGL.raw.GL.ARB.vertex_blend import *
from OpenGL.raw.GL.ARB.vertex_blend import _EXTENSION_NAME


def glInitVertexBlendARB():
    '''Return boolean indicating whether this extension is available'''
    from OpenGL import extensions
    return extensions.hasGLExtension(_EXTENSION_NAME)


# INPUT glWeightbvARB.weights size not checked against size
glWeightbvARB = wrapper.wrapper(glWeightbvARB).setInputArraySize(
    'weights', None)
# INPUT glWeightsvARB.weights size not checked against size
glWeightsvARB = wrapper.wrapper(glWeightsvARB).setInputArraySize(
    'weights', None)
# INPUT glWeightivARB.weights size not checked against size
glWeightivARB = wrapper.wrapper(glWeightivARB).setInputArraySize(
    'weights', None)
# INPUT glWeightfvARB.weights size not checked against size
glWeightfvARB = wrapper.wrapper(glWeightfvARB).setInputArraySize(
    'weights', None)
# INPUT glWeightdvARB.weights size not checked against size
glWeightdvARB = wrapper.wrapper(glWeightdvARB).setInputArraySize(
    'weights', None)
# INPUT glWeightubvARB.weights size not checked against size
glWeightubvARB = wrapper.wrapper(glWeightubvARB).setInputArraySize(
    'weights', None)