1'''OpenGL extension ARB.gpu_shader_fp64 2 3This module customises the behaviour of the 4OpenGL.raw.GL.ARB.gpu_shader_fp64 to provide a more 5Python-friendly API 6 7Overview (from the spec) 8 9 This extension allows GLSL shaders to use double-precision floating-point 10 data types, including vectors and matrices of doubles. Doubles may be 11 used as inputs, outputs, and uniforms. 12 13 The shading language supports various arithmetic and comparison operators 14 on double-precision scalar, vector, and matrix types, and provides a set 15 of built-in functions including: 16 17 * square roots and inverse square roots; 18 19 * fused floating-point multiply-add operations; 20 21 * splitting a floating-point number into a significand and exponent 22 (frexp), or building a floating-point number from a significand and 23 exponent (ldexp); 24 25 * absolute value, sign tests, various functions to round to an integer 26 value, modulus, minimum, maximum, clamping, blending two values, step 27 functions, and testing for infinity and NaN values; 28 29 * packing and unpacking doubles into a pair of 32-bit unsigned integers; 30 31 * matrix component-wise multiplication, and computation of outer 32 products, transposes, determinants, and inverses; and 33 34 * vector relational functions. 35 36 Double-precision versions of angle, trigonometry, and exponential 37 functions are not supported. 38 39 Implicit conversions are supported from integer and single-precision 40 floating-point values to doubles, and this extension uses the relaxed 41 function overloading rules specified by the ARB_gpu_shader5 extension to 42 resolve ambiguities. 43 44 This extension provides API functions for specifying double-precision 45 uniforms in the default uniform block, including functions similar to the 46 uniform functions added by EXT_direct_state_access (if supported). 47 48 This extension provides an "LF" suffix for specifying double-precision 49 constants. Floating-point constants without a suffix in GLSL are treated 50 as single-precision values for backward compatibility with versions not 51 supporting doubles; similar constants are treated as double-precision 52 values in the "C" programming language. 53 54 This extension does not support interpolation of double-precision values; 55 doubles used as fragment shader inputs must be qualified as "flat". 56 Additionally, this extension does not allow vertex attributes with 64-bit 57 components. That support is added separately by EXT_vertex_attrib_64bit. 58 59The official definition of this extension is available here: 60http://www.opengl.org/registry/specs/ARB/gpu_shader_fp64.txt 61''' 62from OpenGL import platform, constant, arrays 63from OpenGL import extensions, wrapper 64import ctypes 65from OpenGL.raw.GL import _types, _glgets 66from OpenGL.raw.GL.ARB.gpu_shader_fp64 import * 67from OpenGL.raw.GL.ARB.gpu_shader_fp64 import _EXTENSION_NAME 68 69def glInitGpuShaderFp64ARB(): 70 '''Return boolean indicating whether this extension is available''' 71 from OpenGL import extensions 72 return extensions.hasGLExtension( _EXTENSION_NAME ) 73 74# INPUT glUniform1dv.value size not checked against count 75glUniform1dv=wrapper.wrapper(glUniform1dv).setInputArraySize( 76 'value', None 77) 78# INPUT glUniform2dv.value size not checked against count*2 79glUniform2dv=wrapper.wrapper(glUniform2dv).setInputArraySize( 80 'value', None 81) 82# INPUT glUniform3dv.value size not checked against count*3 83glUniform3dv=wrapper.wrapper(glUniform3dv).setInputArraySize( 84 'value', None 85) 86# INPUT glUniform4dv.value size not checked against count*4 87glUniform4dv=wrapper.wrapper(glUniform4dv).setInputArraySize( 88 'value', None 89) 90# INPUT glUniformMatrix2dv.value size not checked against count*4 91glUniformMatrix2dv=wrapper.wrapper(glUniformMatrix2dv).setInputArraySize( 92 'value', None 93) 94# INPUT glUniformMatrix3dv.value size not checked against count*9 95glUniformMatrix3dv=wrapper.wrapper(glUniformMatrix3dv).setInputArraySize( 96 'value', None 97) 98# INPUT glUniformMatrix4dv.value size not checked against count*16 99glUniformMatrix4dv=wrapper.wrapper(glUniformMatrix4dv).setInputArraySize( 100 'value', None 101) 102# INPUT glUniformMatrix2x3dv.value size not checked against count*6 103glUniformMatrix2x3dv=wrapper.wrapper(glUniformMatrix2x3dv).setInputArraySize( 104 'value', None 105) 106# INPUT glUniformMatrix2x4dv.value size not checked against count*8 107glUniformMatrix2x4dv=wrapper.wrapper(glUniformMatrix2x4dv).setInputArraySize( 108 'value', None 109) 110# INPUT glUniformMatrix3x2dv.value size not checked against count*6 111glUniformMatrix3x2dv=wrapper.wrapper(glUniformMatrix3x2dv).setInputArraySize( 112 'value', None 113) 114# INPUT glUniformMatrix3x4dv.value size not checked against count*12 115glUniformMatrix3x4dv=wrapper.wrapper(glUniformMatrix3x4dv).setInputArraySize( 116 'value', None 117) 118# INPUT glUniformMatrix4x2dv.value size not checked against count*8 119glUniformMatrix4x2dv=wrapper.wrapper(glUniformMatrix4x2dv).setInputArraySize( 120 'value', None 121) 122# INPUT glUniformMatrix4x3dv.value size not checked against count*12 123glUniformMatrix4x3dv=wrapper.wrapper(glUniformMatrix4x3dv).setInputArraySize( 124 'value', None 125) 126# OUTPUT glGetUniformdv.params COMPSIZE(program, location) 127### END AUTOGENERATED SECTION