; #INDEX# ======================================================================================================================= ; Title .........: The one and only OpenGl UDF ; AutoIt Version : 3.3.8.1 (!!!) ; Description ...: Wrapper for ALL OpenGl constants and functions ; Author(s) .....: Matwachich, minx, trancexxx, and many other ; Dll ...........: opengl32.dll, user32.dll, gdi32.dll ; =============================================================================================================================== ; Version ; Global Const $GL_VERSION_1_1 = 1 ; AccumOp ; Global Const $GL_ACCUM = 0x0100 Global Const $GL_LOAD = 0x0101 Global Const $GL_RETURN = 0x0102 Global Const $GL_MULT = 0x0103 Global Const $GL_ADD = 0x0104 ; AlphaFunction ; Global Const $GL_NEVER = 0x0200 Global Const $GL_LESS = 0x0201 Global Const $GL_EQUAL = 0x0202 Global Const $GL_LEQUAL = 0x0203 Global Const $GL_GREATER = 0x0204 Global Const $GL_NOTEQUAL = 0x0205 Global Const $GL_GEQUAL = 0x0206 Global Const $GL_ALWAYS = 0x0207 ; Attrib$mask ; Global Const $GL_CURRENT_BIT = 0x00000001 Global Const $GL_POINT_BIT = 0x00000002 Global Const $GL_LINE_BIT = 0x00000004 Global Const $GL_POLYGON_BIT = 0x00000008 Global Const $GL_POLYGON_STIPPLE_BIT = 0x00000010 Global Const $GL_PIXEL_MODE_BIT = 0x00000020 Global Const $GL_LIGHTING_BIT = 0x00000040 Global Const $GL_FOG_BIT = 0x00000080 Global Const $GL_DEPTH_BUFFER_BIT = 0x00000100 Global Const $GL_ACCUM_BUFFER_BIT = 0x00000200 Global Const $GL_STENCIL_BUFFER_BIT = 0x00000400 Global Const $GL_VIEWPORT_BIT = 0x00000800 Global Const $GL_TRANSFORM_BIT = 0x00001000 Global Const $GL_ENABLE_BIT = 0x00002000 Global Const $GL_COLOR_BUFFER_BIT = 0x00004000 Global Const $GL_HINT_BIT = 0x00008000 Global Const $GL_EVAL_BIT = 0x00010000 Global Const $GL_LIST_BIT = 0x00020000 Global Const $GL_TEXTURE_BIT = 0x00040000 Global Const $GL_SCISSOR_BIT = 0x00080000 Global Const $GL_ALL_ATTRIB_BITS = 0x000fffff ; BeginMode ; Global Const $GL_POINTS = 0x0000 Global Const $GL_LINES = 0x0001 Global Const $GL_LINE_LOOP = 0x0002 Global Const $GL_LINE_STRIP = 0x0003 Global Const $GL_TRIANGLES = 0x0004 Global Const $GL_TRIANGLE_STRIP = 0x0005 Global Const $GL_TRIANGLE_FAN = 0x0006 Global Const $GL_QUADS = 0x0007 Global Const $GL_QUAD_STRIP = 0x0008 Global Const $GL_POLYGON = 0x0009 ; BlendingFactorDest ; Global Const $GL_ZERO = 0 Global Const $GL_ONE = 1 Global Const $GL_SRC_COLOR = 0x0300 Global Const $GL_ONE_MINUS_SRC_COLOR = 0x0301 Global Const $GL_SRC_ALPHA = 0x0302 Global Const $GL_ONE_MINUS_SRC_ALPHA = 0x0303 Global Const $GL_DST_ALPHA = 0x0304 Global Const $GL_ONE_MINUS_DST_ALPHA = 0x0305 ; BlendingFactorSrc ; Global Const $GL_DST_COLOR = 0x0306 Global Const $GL_ONE_MINUS_DST_COLOR = 0x0307 Global Const $GL_SRC_ALPHA_SATURATE = 0x0308 ; Boolean ; Global Const $GL_TRUE = 1 Global Const $GL_FALSE = 0 ; ClipPlaneName ; Global Const $GL_CLIP_PLANE0 = 0x3000 Global Const $GL_CLIP_PLANE1 = 0x3001 Global Const $GL_CLIP_PLANE2 = 0x3002 Global Const $GL_CLIP_PLANE3 = 0x3003 Global Const $GL_CLIP_PLANE4 = 0x3004 Global Const $GL_CLIP_PLANE5 = 0x3005 ; Data$type ; Global Const $GL_BYTE = 0x1400 Global Const $GL_UNSIGNED_BYTE = 0x1401 Global Const $GL_SHORT = 0x1402 Global Const $GL_UNSIGNED_SHORT = 0x1403 Global Const $GL_INT = 0x1404 Global Const $GL_UNSIGNED_INT = 0x1405 Global Const $GL_FLOAT = 0x1406 Global Const $GL_2_BYTES = 0x1407 Global Const $GL_3_BYTES = 0x1408 Global Const $GL_4_BYTES = 0x1409 Global Const $GL_DOUBLE = 0x140A ; DrawBufferMode ; Global Const $GL_NONE = 0 Global Const $GL_FRONT_LEFT = 0x0400 Global Const $GL_FRONT_RIGHT = 0x0401 Global Const $GL_BACK_LEFT = 0x0402 Global Const $GL_BACK_RIGHT = 0x0403 Global Const $GL_FRONT = 0x0404 Global Const $GL_BACK = 0x0405 Global Const $GL_LEFT = 0x0406 Global Const $GL_RIGHT = 0x0407 Global Const $GL_FRONT_AND_BACK = 0x0408 Global Const $GL_AUX0 = 0x0409 Global Const $GL_AUX1 = 0x040A Global Const $GL_AUX2 = 0x040B Global Const $GL_AUX3 = 0x040C ; ErrorCode ; Global Const $GL_NO_ERROR = 0 Global Const $GL_INVALID_ENUM = 0x0500 Global Const $GL_INVALID_VALUE = 0x0501 Global Const $GL_INVALID_OPERATION = 0x0502 Global Const $GL_STACK_OVERFLOW = 0x0503 Global Const $GL_STACK_UNDERFLOW = 0x0504 Global Const $GL_OUT_OF_MEMORY = 0x0505 ; FeedBackMode ; Global Const $GL_2D = 0x0600 Global Const $GL_3D = 0x0601 Global Const $GL_3D_COLOR = 0x0602 Global Const $GL_3D_COLOR_TEXTURE = 0x0603 Global Const $GL_4D_COLOR_TEXTURE = 0x0604 ; FeedBackToken ; Global Const $GL_PASS_THROUGH_TOKEN = 0x0700 Global Const $GL_POINT_TOKEN = 0x0701 Global Const $GL_LINE_TOKEN = 0x0702 Global Const $GL_POLYGON_TOKEN = 0x0703 Global Const $GL_BITMAP_TOKEN = 0x0704 Global Const $GL_DRAW_PIXEL_TOKEN = 0x0705 Global Const $GL_COPY_PIXEL_TOKEN = 0x0706 Global Const $GL_LINE_RESET_TOKEN = 0x0707 ; FogMode ; Global Const $GL_EXP = 0x0800 Global Const $GL_EXP2 = 0x0801 ; FrontFaceDirection ; Global Const $GL_CW = 0x0900 Global Const $GL_CCW = 0x0901 ; GetMap$target ; Global Const $GL_COEFF = 0x0A00 Global Const $GL_ORDER = 0x0A01 Global Const $GL_DOMAIN = 0x0A02 ; Get$target ; Global Const $GL_CURRENT_COLOR = 0x0B00 Global Const $GL_CURRENT_INDEX = 0x0B01 Global Const $GL_CURRENT_NORMAL = 0x0B02 Global Const $GL_CURRENT_TEXTURE_COORDS = 0x0B03 Global Const $GL_CURRENT_RASTER_COLOR = 0x0B04 Global Const $GL_CURRENT_RASTER_INDEX = 0x0B05 Global Const $GL_CURRENT_RASTER_TEXTURE_COORD = 0x0B06 Global Const $GL_CURRENT_RASTER_POSITION = 0x0B07 Global Const $GL_CURRENT_RASTER_POSITION_VALID = 0x0B08 Global Const $GL_CURRENT_RASTER_DISTANCE = 0x0B09 Global Const $GL_POINT_SMOOTH = 0x0B10 Global Const $GL_POINT_SIZE = 0x0B11 Global Const $GL_POINT_SIZE_RANGE = 0x0B12 Global Const $GL_POINT_SIZE_GRANULARITY = 0x0B13 Global Const $GL_LINE_SMOOTH = 0x0B20 Global Const $GL_LINE_WIDTH = 0x0B21 Global Const $GL_LINE_WIDTH_RANGE = 0x0B22 Global Const $GL_LINE_WIDTH_GRANULARITY = 0x0B23 Global Const $GL_LINE_STIPPLE = 0x0B24 Global Const $GL_LINE_STIPPLE_PATTERN = 0x0B25 Global Const $GL_LINE_STIPPLE_REPEAT = 0x0B26 Global Const $GL_LIST_MODE = 0x0B30 Global Const $GL_MAX_LIST_NESTING = 0x0B31 Global Const $GL_LIST_BASE = 0x0B32 Global Const $GL_LIST_INDEX = 0x0B33 Global Const $GL_POLYGON_MODE = 0x0B40 Global Const $GL_POLYGON_SMOOTH = 0x0B41 Global Const $GL_POLYGON_STIPPLE = 0x0B42 Global Const $GL_EDGE_FLAG = 0x0B43 Global Const $GL_CULL_FACE = 0x0B44 Global Const $GL_CULL_FACE_MODE = 0x0B45 Global Const $GL_FRONT_FACE = 0x0B46 Global Const $GL_LIGHTING = 0x0B50 Global Const $GL_LIGHT_MODEL_LOCAL_VIEWER = 0x0B51 Global Const $GL_LIGHT_MODEL_TWO_SIDE = 0x0B52 Global Const $GL_LIGHT_MODEL_AMBIENT = 0x0B53 Global Const $GL_SHADE_MODEL = 0x0B54 Global Const $GL_COLOR_MATERIAL_FACE = 0x0B55 Global Const $GL_COLOR_MATERIAL_PARAMETER = 0x0B56 Global Const $GL_COLOR_MATERIAL = 0x0B57 Global Const $GL_FOG = 0x0B60 Global Const $GL_FOG_INDEX = 0x0B61 Global Const $GL_FOG_DENSITY = 0x0B62 Global Const $GL_FOG_START = 0x0B63 Global Const $GL_FOG_END = 0x0B64 Global Const $GL_FOG_MODE = 0x0B65 Global Const $GL_FOG_COLOR = 0x0B66 Global Const $GL_DEPTH_RANGE = 0x0B70 Global Const $GL_DEPTH_TEST = 0x0B71 Global Const $GL_DEPTH_WRITEMASK = 0x0B72 Global Const $GL_DEPTH_CLEAR_VALUE = 0x0B73 Global Const $GL_DEPTH_FUNC = 0x0B74 Global Const $GL_ACCUM_CLEAR_VALUE = 0x0B80 Global Const $GL_STENCIL_TEST = 0x0B90 Global Const $GL_STENCIL_CLEAR_VALUE = 0x0B91 Global Const $GL_STENCIL_FUNC = 0x0B92 Global Const $GL_STENCIL_VALUE_MASK = 0x0B93 Global Const $GL_STENCIL_FAIL = 0x0B94 Global Const $GL_STENCIL_PASS_DEPTH_FAIL = 0x0B95 Global Const $GL_STENCIL_PASS_DEPTH_PASS = 0x0B96 Global Const $GL_STENCIL_REF = 0x0B97 Global Const $GL_STENCIL_WRITEMASK = 0x0B98 Global Const $GL_MATRIX_MODE = 0x0BA0 Global Const $GL_NORMALIZE = 0x0BA1 Global Const $GL_VIEWPORT = 0x0BA2 Global Const $GL_MODELVIEW_STACK_DEPTH = 0x0BA3 Global Const $GL_PROJECTION_STACK_DEPTH = 0x0BA4 Global Const $GL_TEXTURE_STACK_DEPTH = 0x0BA5 Global Const $GL_MODELVIEW_MATRIX = 0x0BA6 Global Const $GL_PROJECTION_MATRIX = 0x0BA7 Global Const $GL_TEXTURE_MATRIX = 0x0BA8 Global Const $GL_ATTRIB_STACK_DEPTH = 0x0BB0 Global Const $GL_CLIENT_ATTRIB_STACK_DEPTH = 0x0BB1 Global Const $GL_ALPHA_TEST = 0x0BC0 Global Const $GL_ALPHA_TEST_FUNC = 0x0BC1 Global Const $GL_ALPHA_TEST_REF = 0x0BC2 Global Const $GL_DITHER = 0x0BD0 Global Const $GL_BLEND_DST = 0x0BE0 Global Const $GL_BLEND_SRC = 0x0BE1 Global Const $GL_BLEND = 0x0BE2 Global Const $GL_LOGIC_OP_MODE = 0x0BF0 Global Const $GL_INDEX_LOGIC_OP = 0x0BF1 Global Const $GL_COLOR_LOGIC_OP = 0x0BF2 Global Const $GL_AUX_BUFFERS = 0x0C00 Global Const $GL_DRAW_BUFFER = 0x0C01 Global Const $GL_READ_BUFFER = 0x0C02 Global Const $GL_SCISSOR_BOX = 0x0C10 Global Const $GL_SCISSOR_TEST = 0x0C11 Global Const $GL_INDEX_CLEAR_VALUE = 0x0C20 Global Const $GL_INDEX_WRITEMASK = 0x0C21 Global Const $GL_COLOR_CLEAR_VALUE = 0x0C22 Global Const $GL_COLOR_WRITEMASK = 0x0C23 Global Const $GL_INDEX_MODE = 0x0C30 Global Const $GL_RGBA_MODE = 0x0C31 Global Const $GL_DOUBLEBUFFER = 0x0C32 Global Const $GL_STEREO = 0x0C33 Global Const $GL_RENDER_MODE = 0x0C40 Global Const $GL_PERSPECTIVE_CORRECTION_HINT = 0x0C50 Global Const $GL_POINT_SMOOTH_HINT = 0x0C51 Global Const $GL_LINE_SMOOTH_HINT = 0x0C52 Global Const $GL_POLYGON_SMOOTH_HINT = 0x0C53 Global Const $GL_FOG_HINT = 0x0C54 Global Const $GL_TEXTURE_GEN_S = 0x0C60 Global Const $GL_TEXTURE_GEN_T = 0x0C61 Global Const $GL_TEXTURE_GEN_R = 0x0C62 Global Const $GL_TEXTURE_GEN_Q = 0x0C63 Global Const $GL_PIXEL_MAP_I_TO_I = 0x0C70 Global Const $GL_PIXEL_MAP_S_TO_S = 0x0C71 Global Const $GL_PIXEL_MAP_I_TO_R = 0x0C72 Global Const $GL_PIXEL_MAP_I_TO_G = 0x0C73 Global Const $GL_PIXEL_MAP_I_TO_B = 0x0C74 Global Const $GL_PIXEL_MAP_I_TO_A = 0x0C75 Global Const $GL_PIXEL_MAP_R_TO_R = 0x0C76 Global Const $GL_PIXEL_MAP_G_TO_G = 0x0C77 Global Const $GL_PIXEL_MAP_B_TO_B = 0x0C78 Global Const $GL_PIXEL_MAP_A_TO_A = 0x0C79 Global Const $GL_PIXEL_MAP_I_TO_I_SIZE = 0x0CB0 Global Const $GL_PIXEL_MAP_S_TO_S_SIZE = 0x0CB1 Global Const $GL_PIXEL_MAP_I_TO_R_SIZE = 0x0CB2 Global Const $GL_PIXEL_MAP_I_TO_G_SIZE = 0x0CB3 Global Const $GL_PIXEL_MAP_I_TO_B_SIZE = 0x0CB4 Global Const $GL_PIXEL_MAP_I_TO_A_SIZE = 0x0CB5 Global Const $GL_PIXEL_MAP_R_TO_R_SIZE = 0x0CB6 Global Const $GL_PIXEL_MAP_G_TO_G_SIZE = 0x0CB7 Global Const $GL_PIXEL_MAP_B_TO_B_SIZE = 0x0CB8 Global Const $GL_PIXEL_MAP_A_TO_A_SIZE = 0x0CB9 Global Const $GL_UNPACK_SWAP_BYTES = 0x0CF0 Global Const $GL_UNPACK_LSB_FIRST = 0x0CF1 Global Const $GL_UNPACK_ROW_LENGTH = 0x0CF2 Global Const $GL_UNPACK_SKIP_ROWS = 0x0CF3 Global Const $GL_UNPACK_SKIP_PIXELS = 0x0CF4 Global Const $GL_UNPACK_ALIGNMENT = 0x0CF5 Global Const $GL_PACK_SWAP_BYTES = 0x0D00 Global Const $GL_PACK_LSB_FIRST = 0x0D01 Global Const $GL_PACK_ROW_LENGTH = 0x0D02 Global Const $GL_PACK_SKIP_ROWS = 0x0D03 Global Const $GL_PACK_SKIP_PIXELS = 0x0D04 Global Const $GL_PACK_ALIGNMENT = 0x0D05 Global Const $GL_MAP_COLOR = 0x0D10 Global Const $GL_MAP_STENCIL = 0x0D11 Global Const $GL_INDEX_SHIFT = 0x0D12 Global Const $GL_INDEX_OFFSET = 0x0D13 Global Const $GL_RED_SCALE = 0x0D14 Global Const $GL_RED_BIAS = 0x0D15 Global Const $GL_ZOOM_X = 0x0D16 Global Const $GL_ZOOM_Y = 0x0D17 Global Const $GL_GREEN_SCALE = 0x0D18 Global Const $GL_GREEN_BIAS = 0x0D19 Global Const $GL_BLUE_SCALE = 0x0D1A Global Const $GL_BLUE_BIAS = 0x0D1B Global Const $GL_ALPHA_SCALE = 0x0D1C Global Const $GL_ALPHA_BIAS = 0x0D1D Global Const $GL_DEPTH_SCALE = 0x0D1E Global Const $GL_DEPTH_BIAS = 0x0D1F Global Const $GL_MAX_EVAL_ORDER = 0x0D30 Global Const $GL_MAX_LIGHTS = 0x0D31 Global Const $GL_MAX_CLIP_PLANES = 0x0D32 Global Const $GL_MAX_TEXTURE_SIZE = 0x0D33 Global Const $GL_MAX_PIXEL_MAP_TABLE = 0x0D34 Global Const $GL_MAX_ATTRIB_STACK_DEPTH = 0x0D35 Global Const $GL_MAX_MODELVIEW_STACK_DEPTH = 0x0D36 Global Const $GL_MAX_NAME_STACK_DEPTH = 0x0D37 Global Const $GL_MAX_PROJECTION_STACK_DEPTH = 0x0D38 Global Const $GL_MAX_TEXTURE_STACK_DEPTH = 0x0D39 Global Const $GL_MAX_VIEWPORT_DIMS = 0x0D3A Global Const $GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = 0x0D3B Global Const $GL_SUBPIXEL_BITS = 0x0D50 Global Const $GL_INDEX_BITS = 0x0D51 Global Const $GL_RED_BITS = 0x0D52 Global Const $GL_GREEN_BITS = 0x0D53 Global Const $GL_BLUE_BITS = 0x0D54 Global Const $GL_ALPHA_BITS = 0x0D55 Global Const $GL_DEPTH_BITS = 0x0D56 Global Const $GL_STENCIL_BITS = 0x0D57 Global Const $GL_ACCUM_RED_BITS = 0x0D58 Global Const $GL_ACCUM_GREEN_BITS = 0x0D59 Global Const $GL_ACCUM_BLUE_BITS = 0x0D5A Global Const $GL_ACCUM_ALPHA_BITS = 0x0D5B Global Const $GL_NAME_STACK_DEPTH = 0x0D70 Global Const $GL_AUTO_NORMAL = 0x0D80 Global Const $GL_MAP1_COLOR_4 = 0x0D90 Global Const $GL_MAP1_INDEX = 0x0D91 Global Const $GL_MAP1_NORMAL = 0x0D92 Global Const $GL_MAP1_TEXTURE_COORD_1 = 0x0D93 Global Const $GL_MAP1_TEXTURE_COORD_2 = 0x0D94 Global Const $GL_MAP1_TEXTURE_COORD_3 = 0x0D95 Global Const $GL_MAP1_TEXTURE_COORD_4 = 0x0D96 Global Const $GL_MAP1_VERTEX_3 = 0x0D97 Global Const $GL_MAP1_VERTEX_4 = 0x0D98 Global Const $GL_MAP2_COLOR_4 = 0x0DB0 Global Const $GL_MAP2_INDEX = 0x0DB1 Global Const $GL_MAP2_NORMAL = 0x0DB2 Global Const $GL_MAP2_TEXTURE_COORD_1 = 0x0DB3 Global Const $GL_MAP2_TEXTURE_COORD_2 = 0x0DB4 Global Const $GL_MAP2_TEXTURE_COORD_3 = 0x0DB5 Global Const $GL_MAP2_TEXTURE_COORD_4 = 0x0DB6 Global Const $GL_MAP2_VERTEX_3 = 0x0DB7 Global Const $GL_MAP2_VERTEX_4 = 0x0DB8 Global Const $GL_MAP1_GRID_DOMAIN = 0x0DD0 Global Const $GL_MAP1_GRID_SEGMENTS = 0x0DD1 Global Const $GL_MAP2_GRID_DOMAIN = 0x0DD2 Global Const $GL_MAP2_GRID_SEGMENTS = 0x0DD3 Global Const $GL_TEXTURE_1D = 0x0DE0 Global Const $GL_TEXTURE_2D = 0x0DE1 Global Const $GL_FEEDBACK_BUFFER_POINTER = 0x0DF0 Global Const $GL_FEEDBACK_BUFFER_SIZE = 0x0DF1 Global Const $GL_FEEDBACK_BUFFER_TYPE = 0x0DF2 Global Const $GL_SELECTION_BUFFER_POINTER = 0x0DF3 Global Const $GL_SELECTION_BUFFER_SIZE = 0x0DF4 ; GetTexture$parameter ; Global Const $GL_TEXTURE_WIDTH = 0x1000 Global Const $GL_TEXTURE_HEIGHT = 0x1001 Global Const $GL_TEXTURE_INTERNAL_FORMAT = 0x1003 Global Const $GL_TEXTURE_BORDER_COLOR = 0x1004 Global Const $GL_TEXTURE_BORDER = 0x1005 ; HintMode ; Global Const $GL_DONT_CARE = 0x1100 Global Const $GL_FASTEST = 0x1101 Global Const $GL_NICEST = 0x1102 ; $lightName ; Global Const $GL_LIGHT0 = 0x4000 Global Const $GL_LIGHT1 = 0x4001 Global Const $GL_LIGHT2 = 0x4002 Global Const $GL_LIGHT3 = 0x4003 Global Const $GL_LIGHT4 = 0x4004 Global Const $GL_LIGHT5 = 0x4005 Global Const $GL_LIGHT6 = 0x4006 Global Const $GL_LIGHT7 = 0x4007 ; $light$parameter ; Global Const $GL_AMBIENT = 0x1200 Global Const $GL_DIFFUSE = 0x1201 Global Const $GL_SPECULAR = 0x1202 Global Const $GL_POSITION = 0x1203 Global Const $GL_SPOT_DIRECTION = 0x1204 Global Const $GL_SPOT_EXPONENT = 0x1205 Global Const $GL_SPOT_CUTOFF = 0x1206 Global Const $GL_CONSTANT_ATTENUATION = 0x1207 Global Const $GL_LINEAR_ATTENUATION = 0x1208 Global Const $GL_QUADRATIC_ATTENUATION = 0x1209 ; ListMode ; Global Const $GL_COMPILE = 0x1300 Global Const $GL_COMPILE_AND_EXECUTE = 0x1301 ; LogicOp ; Global Const $GL_CLEAR = 0x1500 Global Const $GL_AND = 0x1501 Global Const $GL_AND_REVERSE = 0x1502 Global Const $GL_COPY = 0x1503 Global Const $GL_AND_INVERTED = 0x1504 Global Const $GL_NOOP = 0x1505 Global Const $GL_XOR = 0x1506 Global Const $GL_OR = 0x1507 Global Const $GL_NOR = 0x1508 Global Const $GL_EQUIV = 0x1509 Global Const $GL_INVERT = 0x150A Global Const $GL_OR_REVERSE = 0x150B Global Const $GL_COPY_INVERTED = 0x150C Global Const $GL_OR_INVERTED = 0x150D Global Const $GL_NAND = 0x150E Global Const $GL_SET = 0x150F ; Material$parameter ; Global Const $GL_EMISSION = 0x1600 Global Const $GL_SHININESS = 0x1601 Global Const $GL_AMBIENT_AND_DIFFUSE = 0x1602 Global Const $GL_COLOR_INDEXES = 0x1603 ; MatrixMode ; Global Const $GL_MODELVIEW = 0x1700 Global Const $GL_PROJECTION = 0x1701 Global Const $GL_TEXTURE = 0x1702 ; PixelCopy$type ; Global Const $GL_COLOR = 0x1800 Global Const $GL_DEPTH = 0x1801 Global Const $GL_STENCIL = 0x1802 ; Pixel$format ; Global Const $GL_COLOR_INDEX = 0x1900 Global Const $GL_STENCIL_INDEX = 0x1901 Global Const $GL_DEPTH_COMPONENT = 0x1902 Global Const $GL_RED = 0x1903 Global Const $GL_GREEN = 0x1904 Global Const $GL_BLUE = 0x1905 Global Const $GL_ALPHA = 0x1906 Global Const $GL_RGB = 0x1907 Global Const $GL_RGBA = 0x1908 Global Const $GL_LUMINANCE = 0x1909 Global Const $GL_LUMINANCE_ALPHA = 0x190A ; Pixel$type ; Global Const $GL_BITMAP = 0x1A00 ; PolygonMode ; Global Const $GL_POINT = 0x1B00 Global Const $GL_LINE = 0x1B01 Global Const $GL_FILL = 0x1B02 ; RenderingMode ; Global Const $GL_RENDER = 0x1C00 Global Const $GL_FEEDBACK = 0x1C01 Global Const $GL_SELECT = 0x1C02 ; ShadingModel ; Global Const $GL_FLAT = 0x1D00 Global Const $GL_SMOOTH = 0x1D01 ; StencilOp ; Global Const $GL_KEEP = 0x1E00 Global Const $GL_REPLACE = 0x1E01 Global Const $GL_INCR = 0x1E02 Global Const $GL_DECR = 0x1E03 ; StringName ; Global Const $GL_VENDOR = 0x1F00 Global Const $GL_RENDERER = 0x1F01 Global Const $GL_VERSION = 0x1F02 Global Const $GL_EXTENSIONS = 0x1F03 ; Texture$coordName ; Global Const $GL_S = 0x2000 Global Const $GL_T = 0x2001 Global Const $GL_R = 0x2002 Global Const $GL_Q = 0x2003 ; TextureEnvMode ; Global Const $GL_MODULATE = 0x2100 Global Const $GL_DECAL = 0x2101 ; TextureEnv$parameter ; Global Const $GL_TEXTURE_ENV_MODE = 0x2200 Global Const $GL_TEXTURE_ENV_COLOR = 0x2201 ; TextureEnv$target ; Global Const $GL_TEXTURE_ENV = 0x2300 ; TextureGenMode ; Global Const $GL_EYE_LINEAR = 0x2400 Global Const $GL_OBJECT_LINEAR = 0x2401 Global Const $GL_SPHERE_MAP = 0x2402 ; TextureGen$parameter ; Global Const $GL_TEXTURE_GEN_MODE = 0x2500 Global Const $GL_OBJECT_PLANE = 0x2501 Global Const $GL_EYE_PLANE = 0x2502 ; TextureMagFilter ; Global Const $GL_NEAREST = 0x2600 Global Const $GL_LINEAR = 0x2601 ; TextureMinFilter ; Global Const $GL_NEAREST_MIPMAP_NEAREST = 0x2700 Global Const $GL_LINEAR_MIPMAP_NEAREST = 0x2701 Global Const $GL_NEAREST_MIPMAP_LINEAR = 0x2702 Global Const $GL_LINEAR_MIPMAP_LINEAR = 0x2703 ; Texture$parameterName ; Global Const $GL_TEXTURE_MAG_FILTER = 0x2800 Global Const $GL_TEXTURE_MIN_FILTER = 0x2801 Global Const $GL_TEXTURE_WRAP_S = 0x2802 Global Const $GL_TEXTURE_WRAP_T = 0x2803 ; TextureWrapMode ; Global Const $GL_CLAMP = 0x2900 Global Const $GL_REPEAT = 0x2901 ; ClientAttrib$mask ; Global Const $GL_CLIENT_PIXEL_STORE_BIT = 0x00000001 Global Const $GL_CLIENT_VERTEX_ARRAY_BIT = 0x00000002 Global Const $GL_CLIENT_ALL_ATTRIB_BITS = 0xffffffff ; polygon_offset ; Global Const $GL_POLYGON_OFFSET_FACTOR = 0x8038 Global Const $GL_POLYGON_OFFSET_UNITS = 0x2A00 Global Const $GL_POLYGON_OFFSET_POINT = 0x2A01 Global Const $GL_POLYGON_OFFSET_LINE = 0x2A02 Global Const $GL_POLYGON_OFFSET_FILL = 0x8037 ; texture ; Global Const $GL_ALPHA4 = 0x803B Global Const $GL_ALPHA8 = 0x803C Global Const $GL_ALPHA12 = 0x803D Global Const $GL_ALPHA16 = 0x803E Global Const $GL_LUMINANCE4 = 0x803F Global Const $GL_LUMINANCE8 = 0x8040 Global Const $GL_LUMINANCE12 = 0x8041 Global Const $GL_LUMINANCE16 = 0x8042 Global Const $GL_LUMINANCE4_ALPHA4 = 0x8043 Global Const $GL_LUMINANCE6_ALPHA2 = 0x8044 Global Const $GL_LUMINANCE8_ALPHA8 = 0x8045 Global Const $GL_LUMINANCE12_ALPHA4 = 0x8046 Global Const $GL_LUMINANCE12_ALPHA12 = 0x8047 Global Const $GL_LUMINANCE16_ALPHA16 = 0x8048 Global Const $GL_INTENSITY = 0x8049 Global Const $GL_INTENSITY4 = 0x804A Global Const $GL_INTENSITY8 = 0x804B Global Const $GL_INTENSITY12 = 0x804C Global Const $GL_INTENSITY16 = 0x804D Global Const $GL_R3_G3_B2 = 0x2A10 Global Const $GL_RGB4 = 0x804F Global Const $GL_RGB5 = 0x8050 Global Const $GL_RGB8 = 0x8051 Global Const $GL_RGB10 = 0x8052 Global Const $GL_RGB12 = 0x8053 Global Const $GL_RGB16 = 0x8054 Global Const $GL_RGBA2 = 0x8055 Global Const $GL_RGBA4 = 0x8056 Global Const $GL_RGB5_A1 = 0x8057 Global Const $GL_RGBA8 = 0x8058 Global Const $GL_RGB10_A2 = 0x8059 Global Const $GL_RGBA12 = 0x805A Global Const $GL_RGBA16 = 0x805B Global Const $GL_TEXTURE_RED_SIZE = 0x805C Global Const $GL_TEXTURE_GREEN_SIZE = 0x805D Global Const $GL_TEXTURE_BLUE_SIZE = 0x805E Global Const $GL_TEXTURE_ALPHA_SIZE = 0x805F Global Const $GL_TEXTURE_LUMINANCE_SIZE = 0x8060 Global Const $GL_TEXTURE_INTENSITY_SIZE = 0x8061 Global Const $GL_PROXY_TEXTURE_1D = 0x8063 Global Const $GL_PROXY_TEXTURE_2D = 0x8064 ; texture_object ; Global Const $GL_TEXTURE_PRIORITY = 0x8066 Global Const $GL_TEXTURE_RESIDENT = 0x8067 Global Const $GL_TEXTURE_BINDING_1D = 0x8068 Global Const $GL_TEXTURE_BINDING_2D = 0x8069 ; vertex_ARRAY ; Global Const $GL_VERTEX_ARRAY = 0x8074 Global Const $GL_NORMAL_ARRAY = 0x8075 Global Const $GL_COLOR_ARRAY = 0x8076 Global Const $GL_INDEX_ARRAY = 0x8077 Global Const $GL_TEXTURE_COORD_ARRAY = 0x8078 Global Const $GL_EDGE_FLAG_ARRAY = 0x8079 Global Const $GL_VERTEX_ARRAY_SIZE = 0x807A Global Const $GL_VERTEX_ARRAY_TYPE = 0x807B Global Const $GL_VERTEX_ARRAY_STRIDE = 0x807C Global Const $GL_NORMAL_ARRAY_TYPE = 0x807E Global Const $GL_NORMAL_ARRAY_STRIDE = 0x807F Global Const $GL_COLOR_ARRAY_SIZE = 0x8081 Global Const $GL_COLOR_ARRAY_TYPE = 0x8082 Global Const $GL_COLOR_ARRAY_STRIDE = 0x8083 Global Const $GL_INDEX_ARRAY_TYPE = 0x8085 Global Const $GL_INDEX_ARRAY_STRIDE = 0x8086 Global Const $GL_TEXTURE_COORD_ARRAY_SIZE = 0x8088 Global Const $GL_TEXTURE_COORD_ARRAY_TYPE = 0x8089 Global Const $GL_TEXTURE_COORD_ARRAY_STRIDE = 0x808A Global Const $GL_EDGE_FLAG_ARRAY_STRIDE = 0x808C Global Const $GL_VERTEX_ARRAY_POINTER = 0x808E Global Const $GL_NORMAL_ARRAY_POINTER = 0x808F Global Const $GL_COLOR_ARRAY_POINTER = 0x8090 Global Const $GL_INDEX_ARRAY_POINTER = 0x8091 Global Const $GL_TEXTURE_COORD_ARRAY_POINTER = 0x8092 Global Const $GL_EDGE_FLAG_ARRAY_POINTER = 0x8093 Global Const $GL_V2F = 0x2A20 Global Const $GL_V3F = 0x2A21 Global Const $GL_C4UB_V2F = 0x2A22 Global Const $GL_C4UB_V3F = 0x2A23 Global Const $GL_C3F_V3F = 0x2A24 Global Const $GL_N3F_V3F = 0x2A25 Global Const $GL_C4F_N3F_V3F = 0x2A26 Global Const $GL_T2F_V3F = 0x2A27 Global Const $GL_T4F_V4F = 0x2A28 Global Const $GL_T2F_C4UB_V3F = 0x2A29 Global Const $GL_T2F_C3F_V3F = 0x2A2A Global Const $GL_T2F_N3F_V3F = 0x2A2B Global Const $GL_T2F_C4F_N3F_V3F = 0x2A2C Global Const $GL_T4F_C4F_N3F_V4F = 0x2A2D ; Extensions ; Global Const $GL_EXT_VERTEX_ARRAY = 1 Global Const $GL_EXT_BGRA = 1 Global Const $GL_EXT_PALETTED_TEXTURE = 1 Global Const $GL_WIN_SWAP_HINT = 1 Global Const $GL_WIN_DRAW_RANGE_ELEMENTS = 1 ; EXT_vertex_ARRAY ; Global Const $GL_VERTEX_ARRAY_EXT = 0x8074 Global Const $GL_NORMAL_ARRAY_EXT = 0x8075 Global Const $GL_COLOR_ARRAY_EXT = 0x8076 Global Const $GL_INDEX_ARRAY_EXT = 0x8077 Global Const $GL_TEXTURE_COORD_ARRAY_EXT = 0x8078 Global Const $GL_EDGE_FLAG_ARRAY_EXT = 0x8079 Global Const $GL_VERTEX_ARRAY_SIZE_EXT = 0x807A Global Const $GL_VERTEX_ARRAY_TYPE_EXT = 0x807B Global Const $GL_VERTEX_ARRAY_STRIDE_EXT = 0x807C Global Const $GL_VERTEX_ARRAY_COUNT_EXT = 0x807D Global Const $GL_NORMAL_ARRAY_TYPE_EXT = 0x807E Global Const $GL_NORMAL_ARRAY_STRIDE_EXT = 0x807F Global Const $GL_NORMAL_ARRAY_COUNT_EXT = 0x8080 Global Const $GL_COLOR_ARRAY_SIZE_EXT = 0x8081 Global Const $GL_COLOR_ARRAY_TYPE_EXT = 0x8082 Global Const $GL_COLOR_ARRAY_STRIDE_EXT = 0x8083 Global Const $GL_COLOR_ARRAY_COUNT_EXT = 0x8084 Global Const $GL_INDEX_ARRAY_TYPE_EXT = 0x8085 Global Const $GL_INDEX_ARRAY_STRIDE_EXT = 0x8086 Global Const $GL_INDEX_ARRAY_COUNT_EXT = 0x8087 Global Const $GL_TEXTURE_COORD_ARRAY_SIZE_EXT = 0x8088 Global Const $GL_TEXTURE_COORD_ARRAY_TYPE_EXT = 0x8089 Global Const $GL_TEXTURE_COORD_ARRAY_STRIDE_EXT = 0x808A Global Const $GL_TEXTURE_COORD_ARRAY_COUNT_EXT = 0x808B Global Const $GL_EDGE_FLAG_ARRAY_STRIDE_EXT = 0x808C Global Const $GL_EDGE_FLAG_ARRAY_COUNT_EXT = 0x808D Global Const $GL_VERTEX_ARRAY_POINTER_EXT = 0x808E Global Const $GL_NORMAL_ARRAY_POINTER_EXT = 0x808F Global Const $GL_COLOR_ARRAY_POINTER_EXT = 0x8090 Global Const $GL_INDEX_ARRAY_POINTER_EXT = 0x8091 Global Const $GL_TEXTURE_COORD_ARRAY_POINTER_EXT = 0x8092 Global Const $GL_EDGE_FLAG_ARRAY_POINTER_EXT = 0x8093 Global Const $GL_DOUBLE_EXT = $GL_DOUBLE ; EXT_bgra ; Global Const $GL_BGR_EXT = 0x80E0 Global Const $GL_BGRA_EXT = 0x80E1 ; EXT_paletted_texture ; ; These must match the GL_COLOR_TABLE_*_SGI enumerants ; Global Const $GL_COLOR_TABLE_FORMAT_EXT = 0x80D8 Global Const $GL_COLOR_TABLE_WIDTH_EXT = 0x80D9 Global Const $GL_COLOR_TABLE_RED_SIZE_EXT = 0x80DA Global Const $GL_COLOR_TABLE_GREEN_SIZE_EXT = 0x80DB Global Const $GL_COLOR_TABLE_BLUE_SIZE_EXT = 0x80DC Global Const $GL_COLOR_TABLE_ALPHA_SIZE_EXT = 0x80DD Global Const $GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = 0x80DE Global Const $GL_COLOR_TABLE_INTENSITY_SIZE_EXT = 0x80DF Global Const $GL_COLOR_INDEX1_EXT = 0x80E2 Global Const $GL_COLOR_INDEX2_EXT = 0x80E3 Global Const $GL_COLOR_INDEX4_EXT = 0x80E4 Global Const $GL_COLOR_INDEX8_EXT = 0x80E5 Global Const $GL_COLOR_INDEX12_EXT = 0x80E6 Global Const $GL_COLOR_INDEX16_EXT = 0x80E7 ; WIN_draw_range_elements ; Global Const $GL_MAX_ELEMENTS_VERTICES_WIN = 0x80E8 Global Const $GL_MAX_ELEMENTS_INDICES_WIN = 0x80E9 ; WIN_phong_shading ; Global Const $GL_PHONG_WIN = 0x80EA Global Const $GL_PHONG_HINT_WIN = 0x80EB ; WIN_specular_fog ; Global Const $GL_FOG_SPECULAR_TEXTURE_WIN = 0x80EC Global Const $PFD_TYPE_RGBA = 0 Global Const $PFD_MAIN_PLANE = 0 Global Const $PFD_DOUBLEBUFFER = 1 Global Const $PFD_DRAW_TO_WINDOW = 4 Global Const $PFD_SUPPORT_OPENGL = 32 Global $glDll = "OpenGL32.dll" ;~ Func glInit() ;~ $glDll = DllOpen("OpenGL32.dll") ;~ If $glDll = -1 Then ;~ $glDll = "OpenGL32.dll" ;~ Return SetError(1, 0, 0) ;~ Else ;~ Return SetError(0, 0, 1) ;~ EndIf ;~ EndFunc ;~ Func glTerminate() ;~ DllClose($glDll) ;~ $glDll = "OpenGL32.dll" ;~ Return SetError(0, 0, 1) ;~ EndFunc Func glInit($hWnd, ByRef $hDeviceContext, ByRef $hOpenGLRenderingContext) Local $tPIXELFORMATDESCRIPTOR = DllStructCreate("ushort Size;" & _ "ushort Version;" & _ "dword Flags;" & _ "ubyte PixelType;" & _ "ubyte ColorBits;" & _ "ubyte RedBits;" & _ "ubyte RedShift;" & _ "ubyte GreenBits;" & _ "ubyte GreenShift;" & _ "ubyte BlueBits;" & _ "ubyte BlueShift;" & _ "ubyte AlphaBits;" & _ "ubyte AlphaShift;" & _ "ubyte AccumBits;" & _ "ubyte AccumRedBits;" & _ "ubyte AccumGreenBits;" & _ "ubyte AccumBlueBits;" & _ "ubyte AccumAlphaBits;" & _ "ubyte DepthBits;" & _ "ubyte StencilBits;" & _ "ubyte AuxBuffers;" & _ "ubyte LayerType;" & _ "ubyte Reserved;" & _ "dword LayerMask;" & _ "dword VisibleMask;" & _ "dword DamageMask") DllStructSetData($tPIXELFORMATDESCRIPTOR, "Size", DllStructGetSize($tPIXELFORMATDESCRIPTOR)) DllStructSetData($tPIXELFORMATDESCRIPTOR, "Version", $GL_VERSION_1_1) DllStructSetData($tPIXELFORMATDESCRIPTOR, "Flags", BitOR($PFD_DRAW_TO_WINDOW, $PFD_SUPPORT_OPENGL, $PFD_DOUBLEBUFFER)) DllStructSetData($tPIXELFORMATDESCRIPTOR, "PixelType", $PFD_TYPE_RGBA) DllStructSetData($tPIXELFORMATDESCRIPTOR, "ColorBits", 24) DllStructSetData($tPIXELFORMATDESCRIPTOR, "DepthBits", 32) DllStructSetData($tPIXELFORMATDESCRIPTOR, "LayerType", $PFD_MAIN_PLANE) Local $a_hCall = DllCall("kernel32.dll", "hwnd", "GetModuleHandleW", "wstr", "opengl32.dll") If @error Then Return SetError(1, 0, 0) EndIf If Not $a_hCall[0] Then If DllOpen("opengl32.dll") = -1 Then Return SetError(2, 0, 0) ; opengl32.dll konnte nicht geöffnet werden EndIf EndIf $a_hCall = DllCall("user32.dll", "hwnd", "GetDC", "hwnd", $hWnd) If @error Or Not $a_hCall[0] Then Return SetError(3, 0, 0) ; kein re vom handle EndIf $hDeviceContext = $a_hCall[0] Local $a_iCall = DllCall("gdi32.dll", "int", "ChoosePixelFormat", "hwnd", $hDeviceContext, "ptr", DllStructGetPtr($tPIXELFORMATDESCRIPTOR)) If @error Or Not $a_iCall[0] Then Return SetError(4, 0, 0) ; appropriate nicht gleich EndIf Local $iFormat = $a_iCall[0] $a_iCall = DllCall("gdi32.dll", "int", "SetPixelFormat", "hwnd", $hDeviceContext, "int", $iFormat, "ptr", DllStructGetPtr($tPIXELFORMATDESCRIPTOR)) If @error Or Not $a_iCall[0] Then Return SetError(5, 0, 0) ;fehler mit dem pixel und format spez EndIf $a_hCall = DllCall("opengl32.dll", "hwnd", "wglCreateContext", "hwnd", $hDeviceContext) If @error Or Not $a_hCall[0] Then Return SetError(6, 0, 0) ; konnte nicht gerendert werden EndIf $hOpenGLRenderingContext = $a_hCall[0] $a_iCall = DllCall("opengl32.dll", "int", "wglMakeCurrent", "hwnd", $hDeviceContext, "hwnd", $hOpenGLRenderingContext) If @error Or Not $a_iCall[0] Then Return SetError(7, 0, 0) ; thread call ist fehlgeschlagen EndIf Return SetError(0, 0, 1) ; alles ok EndFunc Func glTerminate($hWnd, $hDeviceContext, $hOpenGLRenderingContext) DllCall("opengl32.dll", "int", "wglMakeCurrent", "hwnd", $hDeviceContext, "hwnd", 0) DllCall("opengl32.dll", "int", "wglDeleteContext", "hwnd", $hOpenGLRenderingContext) DllCall("user32.dll", "int", "ReleaseDC", "hwnd", $hWnd, "hwnd", $hDeviceContext) DllCall("gdi32.dll", "int", "DeleteDC", "hwnd", $hDeviceContext) EndFunc #region ### Miscellaneous ### ;GLAPI void APIENTRY glClearIndex ( float c ) Func glClearIndex($fC) DllCall($glDll, "none", "glClearIndex", "float", $fC) EndFunc ;GLAPI void APIENTRY glClearColor ( float red, float green, float blue, float alpha ) Func glClearColor($fRed, $fGreen, $fBlue, $fAlpha) DllCall($glDll, "none", "glClearColor", "float", $fRed, "float", $fGreen, "float", $fBlue, "float", $fAlpha) EndFunc ;GLAPI void APIENTRY glClear ( unsigned int mask ) Func glClear($iMask) DllCall($glDll, "none", "glClear", "uint", $iMask) EndFunc ;GLAPI void APIENTRY glIndexMask ( unsigned int mask ) Func glIndexMask($iMask) DllCall($glDll, "none", "glIndexMask", "uint", $iMask) EndFunc ;GLAPI void APIENTRY glColorMask ( unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha ) Func glColorMask($iRed, $iGreen, $iBlue, $iAlpha) DllCall($glDll, "none", "glColorMask", "byte", $iRed, "byte", $iGreen, "byte", $iBlue, "byte", $iAlpha) EndFunc ;GLAPI void APIENTRY glAlphaFunc ( unsigned int func, float ref ) Func glAlphaFunc($iFunc, $fRef) DllCall($glDll, "none", "glAlphaFunc", "uint", $iFunc, "float", $fRef) EndFunc ;GLAPI void APIENTRY glBlendFunc ( unsigned int sfactor, unsigned int dfactor ) Func glBlendFunc($iSfactor, $iDfactor) DllCall($glDll, "none", "glBlendFunc", "uint", $iSfactor, "uint", $iDfactor) EndFunc ;GLAPI void APIENTRY glLogicOp ( unsigned int opcode ) Func glLogicOp($iOpCode) DllCall($glDll, "none", "glLogicOp", "uint", $iOpCode) EndFunc ;GLAPI void APIENTRY glCullFace ( unsigned int mode ) Func glCullFace($iMode) DllCall($glDll, "none", "glCullFace", "uint", $iMode) EndFunc ;GLAPI void APIENTRY glFrontFace ( unsigned int mode ) Func glFrontFace($iMode) DllCall($glDll, "none", "glFrontFace", "uint", $iMode) EndFunc ;GLAPI void APIENTRY glPointSize ( float size ) Func glPointSize($fSize) DllCall($glDll, "none", "glPointSize", "float", $fSize) EndFunc ;GLAPI void APIENTRY glLineWidth ( float width ) Func glLineWidth($fWidth) DllCall($glDll, "none", "glLineWidth", "float", $fWidth) EndFunc ;GLAPI void APIENTRY glLineStipple ( int factor, unsigned short pattern ) Func glLineStipple($iFactor, $iPattern) DllCall($glDll, "none", "glLineStipple", "int", $iFactor, "ushort", $iPattern) EndFunc ;GLAPI void APIENTRY glPolygonMode ( unsigned int face, unsigned int mode ) Func glPolygonMode($iFace, $iMode) DllCall($glDll, "none", "glPolygonMode", "uint", $iFace, "uint", $iMode) EndFunc ;GLAPI void APIENTRY glPolygonOffset ( float factor, float units ) Func glPolygonOffset($fFactor, $fUnits) DllCall($glDll, "none", "glPolygonOffset", "float", $fFactor, "float", $fUnits) EndFunc ;GLAPI void APIENTRY glPolygonStipple ( const unsigned char *mask ) Func glPolygonStipple($iMask) DllCall($glDll, "none", "glPolygonStipple", "byte*", $iMask) EndFunc ;GLAPI void APIENTRY glGetPolygonStipple ( unsigned char *mask ) Func glGetPolygonStipple() Local $ret = DllCall($glDll, "none", "glGetPolygonStipple", "byte*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[1] EndFunc ;GLAPI void APIENTRY glEdgeFlag ( unsigned char flag ) Func glEdgeFlag($iFlag) DllCall($glDll, "none", "glEdgeFlag", "byte", $iFlag) EndFunc ;GLAPI void APIENTRY glEdgeFlagv ( const unsigned char *flag ) Func glEdgeFlagv($iFlag) DllCall($glDll, "none", "glEdgeFlag", "byte", $iFlag) EndFunc ;GLAPI void APIENTRY glScissor ( int x, int y, int width, int height) Func glScissor($iX, $iY, $iWidth, $iHeight) DllCall($glDll, "none", "glScissor", "int", $iX, "int", $iY, "int", $iWidth, "int", $iHeight) EndFunc ;GLAPI void APIENTRY glClipPlane ( unsigned int plane, const double *equation ) Func glClipPlane($iPlane, $fEquation) ; check DllCall($glDll, "none", "glClipPlane", "uint", $iPlane, "double*", $fEquation) EndFunc ;GLAPI void APIENTRY glGetClipPlane ( unsigned int plane, double *equation ) Func glGetClipPlane($iPlane, ByRef $fEquation) ; check DllCall($glDll, "none", "glGetClipPlane", "uint", $iPlane, "double*", $fEquation) EndFunc ;GLAPI void APIENTRY glDrawBuffer ( unsigned int mode ) Func glDrawBuffer($iMode) DllCall($glDll, "none", "glDrawBuffer", "uint", $iMode) EndFunc ;GLAPI void APIENTRY glReadBuffer ( unsigned int mode ) Func glReadBuffer($iMode) DllCall($glDll, "none", "glReadBuffer", "uint", $iMode) EndFunc ;GLAPI void APIENTRY glEnable ( unsigned int cap ) Func glEnable($iCap) DllCall($glDll, "none", "glEnable", "uint", $iCap) EndFunc ;GLAPI void APIENTRY glDisable ( unsigned int cap ) Func glDisable($iCap) DllCall($glDll, "none", "glDisable", "uint", $iCap) EndFunc ;GLAPI unsigned char APIENTRY glIsEnabled ( unsigned int cap ) Func glIsEnabled($iCap) Local $ret = DllCall($glDll, "byte", "glIsEnabled", "uint", $iCap) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[0] EndFunc ;GLAPI void APIENTRY glEnableClientState ( unsigned int cap ) ; 1.1 Func glEnableClientState($iCap) DllCall($glDll, "none", "glEnableClientState", "uint", $iCap) EndFunc ;GLAPI void APIENTRY glDisableClientState ( unsigned int cap ) ; 1.1 Func glDisableClientState($iCap) DllCall($glDll, "none", "glDisableClientState", "uint", $iCap) EndFunc ;GLAPI void APIENTRY glGetBooleanv ( unsigned int pname, unsigned char *params ) Func glGetBooleanv($iPname) Local $ret = DllCall($glDll, "none", "glGetBooleanv", "uint", $iPname, "byte*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[2] EndFunc ;GLAPI void APIENTRY glGetDoublev ( unsigned int pname, double *params ) Func glGetDoublev($iPname) Local $ret = DllCall($glDll, "none", "glGetDoublev", "uint", $iPname, "double*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[2] EndFunc ;GLAPI void APIENTRY glGetFloatv ( unsigned int pname, float *params ) Func glGetFloatv($iPname) Local $ret = DllCall($glDll, "none", "glGetFloatv", "uint", $iPname, "float*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[2] EndFunc ;GLAPI void APIENTRY glGetIntegerv ( unsigned int pname, int *params ) Func glGetIntegerv($iPname) Local $ret = DllCall($glDll, "none", "glGetIntegerv", "uint", $iPname, "int*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[2] EndFunc ;GLAPI void APIENTRY glPushAttrib ( unsigned int mask ) Func glPushAttrib($iMask) DllCall($glDll, "none", "glPushAttrib", "uint", $iMask) EndFunc ;GLAPI void APIENTRY glPopAttrib ( void ) Func glPopAttrib() DllCall($glDll, "none", "glPopAttrib") EndFunc ;GLAPI void APIENTRY glPushClientAttrib ( unsigned int mask ) ; 1.1 Func glPushClientAttrib($iMask) DllCall($glDll, "none", "glPushClientAttrib", "uint", $iMask) EndFunc ;GLAPI void APIENTRY glPopClientAttrib ( void ) ; 1.1 Func glPopClientAttrib() DllCall($glDll, "none", "glPopClientAttrib") EndFunc ;GLAPI int APIENTRY glRenderMode ( unsigned int mode ) Func glRenderMode($iMode) Local $ret = DllCall($glDll, "int", "glRenderMode", "uint", $iMode) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[0] EndFunc ;GLAPI unsigned int APIENTRY glGetError ( void ) Func glGetError() Local $ret = DllCall($glDll, "uint", "glGetError") If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[0] EndFunc ;GLAPI const unsigned char* APIENTRY glGetString ( unsigned int name ) Func glGetString($iName) ; check Local $ret = DllCall($glDll, "str", "glGetString", "uint", $iName) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[0] EndFunc ;GLAPI void APIENTRY glFinish ( void ) Func glFinish() DllCall($glDll, "none", "glFinish") EndFunc ;GLAPI void APIENTRY glFlush ( void ) Func glFlush() DllCall($glDll, "none", "glFlush") EndFunc ;GLAPI void APIENTRY glHint ( unsigned int target, unsigned int mode ) Func glHint($iTarget, $iMode) DllCall($glDll, "none", "glHint", "uint", $iTarget, "uint", $iMode) EndFunc #endregion ### Miscellaneous ### ; ############################################################## #region ### Depth Buffer ### ;GLAPI void APIENTRY glClearDepth ( double depth ) Func glClearDepth($fDepth) DllCall($glDll, "none", "glClearDepth", "double", $fDepth) EndFunc ;GLAPI void APIENTRY glDepthFunc ( unsigned int func ) Func glDepthFunc($iFunc) DllCall($glDll, "none", "glDepthFunc", "uint", $iFunc) EndFunc ;GLAPI void APIENTRY glDepthMask ( unsigned char flag ) Func glDepthMask($iFlag) DllCall($glDll, "none", "glDepthMask", "byte", $iFlag) EndFunc ;GLAPI void APIENTRY glDepthRange ( double near_val, double far_val ) Func glDepthRange($fNearVal, $fFarVal) DllCall($glDll, "none", "glDepthRange", "double", $fNearVal, "double", $fFarVal) EndFunc #endregion ### Depth Buffer ### ; ############################################################## #region ### Accumulation Buffer ### ;GLAPI void APIENTRY glClearAccum ( float red, float green, float blue, float alpha ) Func glClearAccum($fRed, $fGreen, $fBlue, $fAlpha) DllCall($glDll, "none", "glClearAccum", "float", $fRed, "float", $fGreen, "float", $fBlue, "float", $fAlpha) EndFunc ;GLAPI void APIENTRY glAccum ( unsigned int op, float value ) Func glAccum($iOp, $fValue) DllCall($glDll, "none", "glAccum", "uint", $iOp, "float", $fValue) EndFunc #endregion ### Accumulation Buffer ### ; ############################################################## #region ### Transformation ### ;GLAPI void APIENTRY glMatrixMode ( unsigned int mode ) Func glMatrixMode($iMode) DllCall($glDll, "none", "glMatrixMode", "uint", $iMode) EndFunc ;GLAPI void APIENTRY glOrtho ( double left, double right, double bottom, double top, double near_val, double far_val ) Func glOrtho($fLeft, $fRight, $fBottom, $fTop, $fNearVal, $fFarVal) DllCall($glDll, "none", "glOrtho", "double", $fLeft, "double", $fRight, "double", $fBottom, "double", $fTop, "double", $fNearVal, "double", $fFarVal) EndFunc ;GLAPI void APIENTRY glFrustum ( double left, double right, double bottom, double top, double near_val, double far_val ) Func glFrustum($fLeft, $fRight, $fBottom, $fTop, $fNearVal, $fFarVal) DllCall($glDll, "none", "glFrustum", "double", $fLeft, "double", $fRight, "double", $fBottom, "double", $fTop, "double", $fNearVal, "double", $fFarVal) EndFunc ;GLAPI void APIENTRY glViewport ( int x, int y, int width, int height ) Func glViewport($iX, $iY, $iWidth, $iHeight) DllCall($glDll, "none", "glViewport", "int", $iX, "int", $iY, "int", $iWidth, "int", $iHeight) EndFunc ;GLAPI void APIENTRY glPushMatrix ( void ) Func glPushMatrix() DllCall($glDll, "none", "glPushMatrix") EndFunc ;GLAPI void APIENTRY glPopMatrix ( void ) Func glPopMatrix() DllCall($glDll, "none", "glPopMatrix") EndFunc ;GLAPI void APIENTRY glLoadIdentity ( void ) Func glLoadIdentity() DllCall($glDll, "none", "glLoadIdentity") EndFunc ;GLAPI void APIENTRY glLoadMatrixd ( const double *m ) Func glLoadMatrixd($aM) ; not tested If Not IsArray($aM) Or UBound($aM) <> 16 Then Return SetError(1, 0, 0) ; --- Local $struct = DllStructCreate("double[16]") For $i = 0 To 15 DllStructSetData($struct, 1, $aM[$i], $i + 1) Next DllCall($glDll, "none", "glLoadMatrixd", "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glLoadMatrixf ( const float *m ) Func glLoadMatrixf($aM) ; not tested If Not IsArray($aM) Or UBound($aM) <> 16 Then Return SetError(1, 0, 0) ; --- Local $struct = DllStructCreate("float[16]") For $i = 0 To 15 DllStructSetData($struct, 1, $aM[$i], $i + 1) Next DllCall($glDll, "none", "glLoadMatrixf", "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glMultMatrixd ( const double *m ) Func glMultMatrixd($aM) ; not tested If Not IsArray($aM) Or UBound($aM) <> 16 Then Return SetError(1, 0, 0) ; --- Local $struct = DllStructCreate("double[16]") For $i = 0 To 15 DllStructSetData($struct, 1, $aM[$i], $i + 1) Next DllCall($glDll, "none", "glMultMatrixd", "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glMultMatrixf ( const float *m ) Func glMultMatrixf($aM) ; not tested If Not IsArray($aM) Or UBound($aM) <> 16 Then Return SetError(1, 0, 0) ; --- Local $struct = DllStructCreate("float[16]") For $i = 0 To 15 DllStructSetData($struct, 1, $aM[$i], $i + 1) Next DllCall($glDll, "none", "glMultMatrixf", "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glRotated ( double angle, double x, double y, double z ) Func glRotated($fAngle, $fX, $fY, $fZ) DllCall($glDll, "none", "glRotated", "double", $fAngle, "double", $fX, "double", $fY, "double", $fZ) EndFunc ;GLAPI void APIENTRY glRotatef ( float angle, float x, float y, float z ) Func glRotatef($fAngle, $fX, $fY, $fZ) DllCall($glDll, "none", "glRotatef", "float", $fAngle, "float", $fX, "float", $fY, "float", $fZ) EndFunc ;GLAPI void APIENTRY glScaled ( double x, double y, double z ) Func glScaled($fX, $fY, $fZ) DllCall($glDll, "none", "glScaled", "double", $fX, "double", $fY, "double", $fZ) EndFunc ;GLAPI void APIENTRY glScalef ( float x, float y, float z ) Func glScalef($fX, $fY, $fZ) DllCall($glDll, "none", "glScalef", "float", $fX, "float", $fY, "float", $fZ) EndFunc ;GLAPI void APIENTRY glTranslated ( double x, double y, double z ) Func glTranslated($fX, $fY, $fZ) DllCall($glDll, "none", "glTranslated", "double", $fX, "double", $fY, "double", $fZ) EndFunc ;GLAPI void APIENTRY glTranslatef ( float x, float y, float z ) Func glTranslatef($fX, $fY, $fZ) DllCall($glDll, "none", "glTranslatef", "float", $fX, "float", $fY, "float", $fZ) EndFunc #endregion ### Transformation ### ; ############################################################## #region ### Display Lists ### ;GLAPI unsigned char APIENTRY glIsList ( unsigned int list ) Func glIsList($iList) Local $ret = DllCall($glDll, "byte", "glIsList", "uint", $iList) If @error Then Return SetError(@error, @extended, $ret) ; --- Return SetError(0, 0, $ret[0]) EndFunc ;GLAPI void APIENTRY glDeleteLists ( unsigned int list, int range ) Func glDeleteLists($iList, $iRange = 1) DllCall($glDll, "none", "glDeleteLists", "uint", $iList, "int", $iRange) EndFunc ;GLAPI unsigned int APIENTRY glGenLists ( int range ) Func glGenLists($iRange = 1) Local $ret = DllCall($glDll, "uint", "glGenLists", "int", $iRange) If @error Then Return SetError(@error, @extended, $ret) ; --- Return SetError(0, 0, $ret[0]) EndFunc ;GLAPI void APIENTRY glNewList ( unsigned int list, unsigned int mode ) Func glNewList($iList, $iMode) DllCall($glDll, "none", "glNewList", "uint", $iList, "uint", $iMode) EndFunc ;GLAPI void APIENTRY glEndList ( void ) Func glEndList() DllCall($glDll, "none", "glEndList") EndFunc ;GLAPI void APIENTRY glCallList ( unsigned int list ) Func glCallList($iList) DllCall($glDll, "none", "glCallList", "uint", $iList) EndFunc ;GLAPI void APIENTRY glCallLists ( int n, unsigned int type, const void *lists ) Func glCallLists($aLists) If Not IsArray($aLists) Then Return SetError(1, 0, 0) ; --- Local $ub = UBound($aLists) Local $struct = DllStructCreate("uint[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $ub[$i], $i + 1) Next DllCall($glDll, "none", "glCallLists", "int", $ub, "uint", $GL_UNSIGNED_INT, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glListBase ( unsigned int base ) Func glListBase($iBase) DllCall($glDll, "none", "glListBase", "uint", $iBase) EndFunc #endregion ### Display Lists ### ; ############################################################## #region ### Drawing Functions ### ;GLAPI void APIENTRY glBegin ( unsigned int mode ) Func glBegin($iMode) DllCall($glDll, "none", "glBegin", "uint", $iMode) EndFunc ;GLAPI void APIENTRY glEnd ( void ) Func glEnd() DllCall($glDll, "none", "glEnd") EndFunc ;GLAPI void APIENTRY glVertex2d ( double x, double y ) Func glVertex2d($fX, $fY) DllCall($glDll, "none", "glVertex2d", "double", $fX, "double", $fY) EndFunc ;GLAPI void APIENTRY glVertex2f ( float x, float y ) Func glVertex2f($fX, $fY) DllCall($glDll, "none", "glVertex2f", "float", $fX, "float", $fY) EndFunc ;GLAPI void APIENTRY glVertex2i ( int x, int y ) Func glVertex2i($iX, $iY) DllCall($glDll, "none", "glVertex2i", "int", $iX, "int", $iY) EndFunc ;GLAPI void APIENTRY glVertex2s ( short x, short y ) Func glVertex2s($iX, $iY) DllCall($glDll, "none", "glVertex2s", "short", $iX, "short", $iY) EndFunc ;GLAPI void APIENTRY glVertex3d ( double x, double y, double z ) Func glVertex3d($fX, $fY, $fZ) DllCall($glDll, "none", "glVertex3d", "double", $fX, "double", $fY, "double", $fZ) EndFunc ;GLAPI void APIENTRY glVertex3f ( float x, float y, float z ) Func glVertex3f($fX, $fY, $fZ) DllCall($glDll, "none", "glVertex3f", "float", $fX, "float", $fY, "float", $fZ) EndFunc ;GLAPI void APIENTRY glVertex3i ( int x, int y, int z ) Func glVertex3i($iX, $iY, $iZ) DllCall($glDll, "none", "glVertex3i", "int", $iX, "int", $iY, "int", $iZ) EndFunc ;GLAPI void APIENTRY glVertex3s ( short x, short y, short z ) Func glVertex3s($iX, $iY, $iZ) DllCall($glDll, "none", "glVertex3s", "short", $iX, "short", $iY, "short", $iZ) EndFunc ;GLAPI void APIENTRY glVertex4d ( double x, double y, double z, double w ) Func glVertex4d($fX, $fY, $fZ, $fW) DllCall($glDll, "none", "glVertex4d", "double", $fX, "double", $fY, "double", $fZ, "double", $fW) EndFunc ;GLAPI void APIENTRY glVertex4f ( float x, float y, float z, float w ) Func glVertex4f($fX, $fY, $fZ, $fW) DllCall($glDll, "none", "glVertex4f", "float", $fX, "float", $fY, "float", $fZ, "float", $fW) EndFunc ;GLAPI void APIENTRY glVertex4i ( int x, int y, int z, int w ) Func glVertex4i($iX, $iY, $iZ, $iW) DllCall($glDll, "none", "glVertex4i", "int", $iX, "int", $iY, "int", $iZ, "int", $iW) EndFunc ;GLAPI void APIENTRY glVertex4s ( short x, short y, short z, short w ) Func glVertex4s($iX, $iY, $iZ, $iW) DllCall($glDll, "none", "glVertex4s", "short", $iX, "short", $iY, "short", $iZ, "short", $iW) EndFunc ;GLAPI void APIENTRY glVertex2dv ( const double *v ) Func glVertex2dv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex2d", "double", $aV[0], "double", $aV[1]) EndFunc ;GLAPI void APIENTRY glVertex2fv ( const float *v ) Func glVertex2fv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex2f", "float", $aV[0], "float", $aV[1]) EndFunc ;GLAPI void APIENTRY glVertex2iv ( const int *v ) Func glVertex2iv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex2i", "int", $aV[0], "int", $aV[1]) EndFunc ;GLAPI void APIENTRY glVertex2sv ( const short *v ) Func glVertex2sv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex2s", "short", $aV[0], "short", $aV[1]) EndFunc ;GLAPI void APIENTRY glVertex3dv ( const double *v ) Func glVertex3dv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex3d", "double", $aV[0], "double", $aV[1], "double", $aV[2]) EndFunc ;GLAPI void APIENTRY glVertex3fv ( const float *v ) Func glVertex3fv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex3f", "float", $aV[0], "float", $aV[1], "float", $aV[2]) EndFunc ;GLAPI void APIENTRY glVertex3iv ( const int *v ) Func glVertex3iv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex3i", "int", $aV[0], "int", $aV[1], "int", $aV[2]) EndFunc ;GLAPI void APIENTRY glVertex3sv ( const short *v ) Func glVertex3sv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex3s", "short", $aV[0], "short", $aV[1], "short", $aV[2]) EndFunc ;GLAPI void APIENTRY glVertex4dv ( const double *v ) Func glVertex4dv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex4d", "double", $aV[0], "double", $aV[1], "double", $aV[2], "double", $aV[3]) EndFunc ;GLAPI void APIENTRY glVertex4fv ( const float *v ) Func glVertex4fv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex4f", "float", $aV[0], "float", $aV[1], "float", $aV[2], "float", $aV[3]) EndFunc ;GLAPI void APIENTRY glVertex4iv ( const int *v ) Func glVertex4iv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex4i", "int", $aV[0], "int", $aV[1], "int", $aV[2], "int", $aV[3]) EndFunc ;GLAPI void APIENTRY glVertex4sv ( const short *v ) Func glVertex4sv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glVertex4s", "short", $aV[0], "short", $aV[1], "short", $aV[2], "short", $aV[3]) EndFunc ;GLAPI void APIENTRY glNormal3b ( signed char nx, signed char ny, signed char nz ) Func glNormal3b($iNx, $iNy, $iNz) DllCall($glDll, "none", "glNormal3b", "char", $iNx, "char", $iNy, "char", $iNz) EndFunc ;GLAPI void APIENTRY glNormal3d ( double nx, double ny, double nz ) Func glNormal3d($fNx, $fNy, $fNz) DllCall($glDll, "none", "glNormal3d", "double", $fNx, "double", $fNy, "double", $fNz) EndFunc ;GLAPI void APIENTRY glNormal3f ( float nx, float ny, float nz ) Func glNormal3f($fNx, $fNy, $fNz) DllCall($glDll, "none", "glNormal3f", "float", $fNx, "float", $fNy, "float", $fNz) EndFunc ;GLAPI void APIENTRY glNormal3i ( int nx, int ny, int nz ) Func glNormal3i($iNx, $iNy, $iNz) DllCall($glDll, "none", "glNormal3i", "int", $iNx, "int", $iNy, "int", $iNz) EndFunc ;GLAPI void APIENTRY glNormal3s ( short nx, short ny, short nz ) Func glNormal3s($iNx, $iNy, $iNz) DllCall($glDll, "none", "glNormal3s", "short", $iNx, "short", $iNy, "short", $iNz) EndFunc ;GLAPI void APIENTRY glNormal3bv ( const signed char *v ) Func glNormal3bv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glNormal3b", "char", $aV[0], "char", $aV[1], "char", $aV[2]) EndFunc ;GLAPI void APIENTRY glNormal3dv ( const double *v ) Func glNormal3dv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glNormal3d", "double", $aV[0], "double", $aV[1], "double", $aV[2]) EndFunc ;GLAPI void APIENTRY glNormal3fv ( const float *v ) Func glNormal3fv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glNormal3f", "float", $aV[0], "float", $aV[1], "float", $aV[2]) EndFunc ;GLAPI void APIENTRY glNormal3iv ( const int *v ) Func glNormal3iv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glNormal3i", "int", $aV[0], "int", $aV[1], "int", $aV[2]) EndFunc ;GLAPI void APIENTRY glNormal3sv ( const short *v ) Func glNormal3sv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glNormal3s", "short", $aV[0], "short", $aV[1], "short", $aV[2]) EndFunc ;GLAPI void APIENTRY glIndexd ( double c ) Func glIndexd($fC) DllCall($glDll, "none", "glIndexd", "double", $fC) EndFunc ;GLAPI void APIENTRY glIndexf ( float c ) Func glIndexf($fC) DllCall($glDll, "none", "glIndexf", "float", $fC) EndFunc ;GLAPI void APIENTRY glIndexi ( int c ) Func glIndexi($iC) DllCall($glDll, "none", "glIndexi", "int", $iC) EndFunc ;GLAPI void APIENTRY glIndexs ( short c ) Func glIndexs($iC) DllCall($glDll, "none", "glIndexs", "short", $iC) EndFunc ;GLAPI void APIENTRY glIndexub ( unsigned char c ) ; 1.1 Func glIndexub($iC) DllCall($glDll, "none", "glIndexub", "byte", $iC) EndFunc ;GLAPI void APIENTRY glIndexdv ( const double *c ) Func glIndexdv($fC) DllCall($glDll, "none", "glIndexd", "double", $fC) EndFunc ;GLAPI void APIENTRY glIndexfv ( const float *c ) Func glIndexfv($fC) DllCall($glDll, "none", "glIndexf", "float", $fC) EndFunc ;GLAPI void APIENTRY glIndexiv ( const int *c ) Func glIndexiv($iC) DllCall($glDll, "none", "glIndexi", "int", $iC) EndFunc ;GLAPI void APIENTRY glIndexsv ( const short *c ) Func glIndexsv($iC) DllCall($glDll, "none", "glIndexs", "short", $iC) EndFunc ;GLAPI void APIENTRY glIndexubv ( const unsigned char *c ) ; 1.1 Func glIndexubv($iC) DllCall($glDll, "none", "glIndexubv", "byte", $iC) EndFunc ;GLAPI void APIENTRY glColor3b ( signed char red, signed char green, signed char blue ) Func glColor3b($iRed, $iGreen, $iBlue) DllCall($glDll, "none", "glColor3b", "char", $iRed, "char", $iGreen, "char", $iBlue) EndFunc ;GLAPI void APIENTRY glColor3d ( double red, double green, double blue ) Func glColor3d($fRed, $fGreen, $fBlue) DllCall($glDll, "none", "glColor3d", "double", $fRed, "double", $fGreen, "double", $fBlue) EndFunc ;GLAPI void APIENTRY glColor3f ( float red, float green, float blue ) Func glColor3f($fRed, $fGreen, $fBlue) DllCall($glDll, "none", "glColor3f", "float", $fRed, "float", $fGreen, "float", $fBlue) EndFunc ;GLAPI void APIENTRY glColor3i ( int red, int green, int blue ) Func glColor3i($iRed, $iGreen, $iBlue) DllCall($glDll, "none", "glColor3i", "int", $iRed, "int", $iGreen, "int", $iBlue) EndFunc ;GLAPI void APIENTRY glColor3s ( short red, short green, short blue ) Func glColor3s($iRed, $iGreen, $iBlue) DllCall($glDll, "none", "glColor3s", "short", $iRed, "short", $iGreen, "short", $iBlue) EndFunc ;GLAPI void APIENTRY glColor3ub ( unsigned char red, unsigned char green, unsigned char blue ) Func glColor3ub($iRed, $iGreen, $iBlue) DllCall($glDll, "none", "glColor3ub", "byte", $iRed, "byte", $iGreen, "byte", $iBlue) EndFunc ;GLAPI void APIENTRY glColor3ui ( unsigned int red, unsigned int green, unsigned int blue ) Func glColor3ui($iRed, $iGreen, $iBlue) DllCall($glDll, "none", "glColor3ui", "uint", $iRed, "uint", $iGreen, "uint", $iBlue) EndFunc ;GLAPI void APIENTRY glColor3us ( unsigned short red, unsigned short green, unsigned short blue ) Func glColor3us($iRed, $iGreen, $iBlue) DllCall($glDll, "none", "glColor3us", "ushort", $iRed, "ushort", $iGreen, "ushort", $iBlue) EndFunc ;GLAPI void APIENTRY glColor4b ( signed char red, signed char green, signed char blue, signed char alpha ) Func glColor4b($iRed, $iGreen, $iBlue, $iAlpha) DllCall($glDll, "none", "glColor4b", "char", $iRed, "char", $iGreen, "char", $iBlue, "char", $iAlpha) EndFunc ;GLAPI void APIENTRY glColor4d ( double red, double green, double blue, double alpha ) Func glColor4d($fRed, $fGreen, $fBlue, $fAlpha) DllCall($glDll, "none", "glColor4d", "double", $fRed, "double", $fGreen, "double", $fBlue, "double", $fAlpha) EndFunc ;GLAPI void APIENTRY glColor4f ( float red, float green, float blue, float alpha ) Func glColor4f($fRed, $fGreen, $fBlue, $fAlpha) DllCall($glDll, "none", "glColor4f", "float", $fRed, "float", $fGreen, "float", $fBlue, "float", $fAlpha) EndFunc ;GLAPI void APIENTRY glColor4i ( int red, int green, int blue, int alpha ) Func glColor4i($iRed, $iGreen, $iBlue, $iAlpha) DllCall($glDll, "none", "glColor4i", "int", $iRed, "int", $iGreen, "int", $iBlue, "int", $iAlpha) EndFunc ;GLAPI void APIENTRY glColor4s ( short red, short green, short blue, short alpha ) Func glColor4s($iRed, $iGreen, $iBlue, $iAlpha) DllCall($glDll, "none", "glColor4s", "short", $iRed, "short", $iGreen, "short", $iBlue, "short", $iAlpha) EndFunc ;GLAPI void APIENTRY glColor4ub ( unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha ) Func glColor4ub($iRed, $iGreen, $iBlue, $iAlpha) DllCall($glDll, "none", "glColor4ub", "byte", $iRed, "byte", $iGreen, "byte", $iBlue, "byte", $iAlpha) EndFunc ;GLAPI void APIENTRY glColor4ui ( unsigned int red, unsigned int green, unsigned int blue, unsigned int alpha ) Func glColor4ui($iRed, $iGreen, $iBlue, $iAlpha) DllCall($glDll, "none", "glColor4ui", "uint", $iRed, "uint", $iGreen, "uint", $iBlue, "uint", $iAlpha) EndFunc ;GLAPI void APIENTRY glColor4us ( unsigned short red, unsigned short green, unsigned short blue, unsigned short alpha ) Func glColor4us($iRed, $iGreen, $iBlue, $iAlpha) DllCall($glDll, "none", "glColor4us", "ushort", $iRed, "ushort", $iGreen, "ushort", $iBlue, "ushort", $iAlpha) EndFunc ;GLAPI void APIENTRY glColor3bv ( const signed char *v ) Func glColor3bv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor3b", "char", $aV[0], "char", $aV[1], "char", $aV[2]) EndFunc ;GLAPI void APIENTRY glColor3dv ( const double *v ) Func glColor3dv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor3d", "double", $aV[0], "double", $aV[1], "double", $aV[2]) EndFunc ;GLAPI void APIENTRY glColor3fv ( const float *v ) Func glColor3fv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor3f", "float", $aV[0], "float", $aV[1], "float", $aV[2]) EndFunc ;GLAPI void APIENTRY glColor3iv ( const int *v ) Func glColor3iv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor3i", "int", $aV[0], "int", $aV[1], "int", $aV[2]) EndFunc ;GLAPI void APIENTRY glColor3sv ( const short *v ) Func glColor3sv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor3s", "short", $aV[0], "short", $aV[1], "short", $aV[2]) EndFunc ;GLAPI void APIENTRY glColor3ubv ( const unsigned char *v ) Func glColor3ubv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor3ub", "byte", $aV[0], "byte", $aV[1], "byte", $aV[2]) EndFunc ;GLAPI void APIENTRY glColor3uiv ( const unsigned int *v ) Func glColor3uiv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor3ui", "uint", $aV[0], "uint", $aV[1], "uint", $aV[2]) EndFunc ;GLAPI void APIENTRY glColor3usv ( const unsigned short *v ) Func glColor3usv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor3us", "ushort", $aV[0], "ushort", $aV[1], "ushort", $aV[2]) EndFunc ;GLAPI void APIENTRY glColor4bv ( const signed char *v ) Func glColor4bv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor4b", "char", $aV[0], "char", $aV[1], "char", $aV[2], "char", $aV[3]) EndFunc ;GLAPI void APIENTRY glColor4dv ( const double *v ) Func glColor4dv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor4d", "double", $aV[0], "double", $aV[1], "double", $aV[2], "double", $aV[3]) EndFunc ;GLAPI void APIENTRY glColor4fv ( const float *v ) Func glColor4fv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor4f", "float", $aV[0], "float", $aV[1], "float", $aV[2], "float", $aV[3]) EndFunc ;GLAPI void APIENTRY glColor4iv ( const int *v ) Func glColor4iv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor4i", "int", $aV[0], "int", $aV[1], "int", $aV[2], "int", $aV[3]) EndFunc ;GLAPI void APIENTRY glColor4sv ( const short *v ) Func glColor4sv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor4s", "short", $aV[0], "short", $aV[1], "short", $aV[2], "short", $aV[3]) EndFunc ;GLAPI void APIENTRY glColor4ubv ( const unsigned char *v ) Func glColor4ubv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor4ub", "byte", $aV[0], "byte", $aV[1], "byte", $aV[2], "byte", $aV[3]) EndFunc ;GLAPI void APIENTRY glColor4uiv ( const unsigned int *v ) Func glColor4uiv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor4ui", "uint", $aV[0], "uint", $aV[1], "uint", $aV[2], "uint", $aV[3]) EndFunc ;GLAPI void APIENTRY glColor4usv ( const unsigned short *v ) Func glColor4usv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glColor4us", "ushort", $aV[0], "ushort", $aV[1], "ushort", $aV[2], "ushort", $aV[3]) EndFunc ;GLAPI void APIENTRY glTexCoord1d ( double s ) Func glTexCoord1d($fS) DllCall($glDll, "none", "glTexCoord1d", "double", $fS) EndFunc ;GLAPI void APIENTRY glTexCoord1f ( float s ) Func glTexCoord1f($fS) DllCall($glDll, "none", "glTexCoord1f", "float", $fS) EndFunc ;GLAPI void APIENTRY glTexCoord1i ( int s ) Func glTexCoord1i($iS) DllCall($glDll, "none", "glTexCoord1i", "int", $iS) EndFunc ;GLAPI void APIENTRY glTexCoord1s ( short s ) Func glTexCoord1s($iS) DllCall($glDll, "none", "glTexCoord1s", "short", $iS) EndFunc ;GLAPI void APIENTRY glTexCoord2d ( double s, double t ) Func glTexCoord2d($fS, $fT) DllCall($glDll, "none", "glTexCoord2d", "double", $fS, "double", $fT) EndFunc ;GLAPI void APIENTRY glTexCoord2f ( float s, float t ) Func glTexCoord2f($fS, $fT) DllCall($glDll, "none", "glTexCoord2f", "float", $fS, "float", $fT) EndFunc ;GLAPI void APIENTRY glTexCoord2i ( int s, int t ) Func glTexCoord2i($fS, $fT) DllCall($glDll, "none", "glTexCoord2i", "int", $fS, "int", $fT) EndFunc ;GLAPI void APIENTRY glTexCoord2s ( short s, short t ) Func glTexCoord2s($fS, $fT) DllCall($glDll, "none", "glTexCoord2s", "short", $fS, "short", $fT) EndFunc ;GLAPI void APIENTRY glTexCoord3d ( double s, double t, double r ) Func glTexCoord3d($fS, $fT, $fR) DllCall($glDll, "none", "glTexCoord3d", "double", $fS, "double", $fT, "double", $fR) EndFunc ;GLAPI void APIENTRY glTexCoord3f ( float s, float t, float r ) Func glTexCoord3f($fS, $fT, $fR) DllCall($glDll, "none", "glTexCoord3f", "float", $fS, "float", $fT, "float", $fR) EndFunc ;GLAPI void APIENTRY glTexCoord3i ( int s, int t, int r ) Func glTexCoord3i($fS, $fT, $iR) DllCall($glDll, "none", "glTexCoord3i", "int", $fS, "int", $fT, "int", $iR) EndFunc ;GLAPI void APIENTRY glTexCoord3s ( short s, short t, short r ) Func glTexCoord3s($fS, $fT, $iR) DllCall($glDll, "none", "glTexCoord3s", "short", $fS, "short", $fT, "short", $iR) EndFunc ;GLAPI void APIENTRY glTexCoord4d ( double s, double t, double r, double q ) Func glTexCoord4d($fS, $fT, $fR, $fQ) DllCall($glDll, "none", "glTexCoord4d", "double", $fS, "double", $fT, "double", $fR, "double", $fQ) EndFunc ;GLAPI void APIENTRY glTexCoord4f ( float s, float t, float r, float q ) Func glTexCoord4f($fS, $fT, $fR, $fQ) DllCall($glDll, "none", "glTexCoord4f", "float", $fS, "float", $fT, "float", $fR, "float", $fQ) EndFunc ;GLAPI void APIENTRY glTexCoord4i ( int s, int t, int r, int q ) Func glTexCoord4i($fS, $fT, $iR, $iQ) DllCall($glDll, "none", "glTexCoord4i", "int", $fS, "int", $fT, "int", $iR, "int", $iQ) EndFunc ;GLAPI void APIENTRY glTexCoord4s ( short s, short t, short r, short q ) Func glTexCoord4s($fS, $fT, $iR, $iQ) DllCall($glDll, "none", "glTexCoord4s", "short", $fS, "short", $fT, "short", $iR, "short", $iQ) EndFunc ;GLAPI void APIENTRY glTexCoord1dv ( const double *v ) Func glTexCoord1dv($aV) If Not IsArray($aV) Or UBound($aV) <> 1 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord1d", "double", $aV[0]) EndFunc ;GLAPI void APIENTRY glTexCoord1fv ( const float *v ) Func glTexCoord1fv($aV) If Not IsArray($aV) Or UBound($aV) <> 1 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord1f", "float", $aV[0]) EndFunc ;GLAPI void APIENTRY glTexCoord1iv ( const int *v ) Func glTexCoord1iv($aV) If Not IsArray($aV) Or UBound($aV) <> 1 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord1i", "int", $aV[0]) EndFunc ;GLAPI void APIENTRY glTexCoord1sv ( const short *v ) Func glTexCoord1sv($aV) If Not IsArray($aV) Or UBound($aV) <> 1 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord1s", "short", $aV[0]) EndFunc ;GLAPI void APIENTRY glTexCoord2dv ( const double *v ) Func glTexCoord2dv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord2d", "double", $aV[0], "double", $aV[1]) EndFunc ;GLAPI void APIENTRY glTexCoord2fv ( const float *v ) Func glTexCoord2fv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord2f", "float", $aV[0], "float", $aV[1]) EndFunc ;GLAPI void APIENTRY glTexCoord2iv ( const int *v ) Func glTexCoord2iv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord2i", "int", $aV[0], "int", $aV[1]) EndFunc ;GLAPI void APIENTRY glTexCoord2sv ( const short *v ) Func glTexCoord2sv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord2s", "short", $aV[0], "short", $aV[1]) EndFunc ;GLAPI void APIENTRY glTexCoord3dv ( const double *v ) Func glTexCoord3dv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord3d", "double", $aV[0], "double", $aV[1], "double", $aV[2]) EndFunc ;GLAPI void APIENTRY glTexCoord3fv ( const float *v ) Func glTexCoord3fv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord3f", "float", $aV[0], "float", $aV[1], "float", $aV[2]) EndFunc ;GLAPI void APIENTRY glTexCoord3iv ( const int *v ) Func glTexCoord3iv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord3i", "int", $aV[0], "int", $aV[1], "int", $aV[2]) EndFunc ;GLAPI void APIENTRY glTexCoord3sv ( const short *v ) Func glTexCoord3sv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord3s", "short", $aV[0], "short", $aV[1], "short", $aV[2]) EndFunc ;GLAPI void APIENTRY glTexCoord4dv ( const double *v ) Func glTexCoord4dv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord4d", "double", $aV[0], "double", $aV[1], "double", $aV[2], "double", $aV[3]) EndFunc ;GLAPI void APIENTRY glTexCoord4fv ( const float *v ) Func glTexCoord4fv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord4f", "float", $aV[0], "float", $aV[1], "float", $aV[2], "float", $aV[3]) EndFunc ;GLAPI void APIENTRY glTexCoord4iv ( const int *v ) Func glTexCoord4iv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord4i", "int", $aV[0], "int", $aV[1], "int", $aV[2], "int", $aV[3]) EndFunc ;GLAPI void APIENTRY glTexCoord4sv ( const short *v ) Func glTexCoord4sv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glTexCoord4s", "short", $aV[0], "short", $aV[1], "short", $aV[2], "short", $aV[3]) EndFunc ;GLAPI void APIENTRY glRasterPos2d ( double x, double y ) Func glRasterPos2d($fX, $fY) DllCall($glDll, "none", "glRasterPos2d", "double", $fX, "double", $fY) EndFunc ;GLAPI void APIENTRY glRasterPos2f ( float x, float y ) Func glRasterPos2f($fX, $fY) DllCall($glDll, "none", "glRasterPos2f", "float", $fX, "float", $fY) EndFunc ;GLAPI void APIENTRY glRasterPos2i ( int x, int y ) Func glRasterPos2i($iX, $iY) DllCall($glDll, "none", "glRasterPos2i", "int", $iX, "int", $iY) EndFunc ;GLAPI void APIENTRY glRasterPos2s ( short x, short y ) Func glRasterPos2s($iX, $iY) DllCall($glDll, "none", "glRasterPos2s", "short", $iX, "short", $iY) EndFunc ;GLAPI void APIENTRY glRasterPos3d ( double x, double y, double z ) Func glRasterPos3d($fX, $fY, $fZ) DllCall($glDll, "none", "glRasterPos3d", "double", $fX, "double", $fY, "double", $fZ) EndFunc ;GLAPI void APIENTRY glRasterPos3f ( float x, float y, float z ) Func glRasterPos3f($fX, $fY, $fZ) DllCall($glDll, "none", "glRasterPos3f", "float", $fX, "float", $fY, "float", $fZ) EndFunc ;GLAPI void APIENTRY glRasterPos3i ( int x, int y, int z ) Func glRasterPos3i($iX, $iY, $iZ) DllCall($glDll, "none", "glRasterPos3i", "int", $iX, "int", $iY, "int", $iZ) EndFunc ;GLAPI void APIENTRY glRasterPos3s ( short x, short y, short z ) Func glRasterPos3s($iX, $iY, $iZ) DllCall($glDll, "none", "glRasterPos3s", "short", $iX, "short", $iY, "short", $iZ) EndFunc ;GLAPI void APIENTRY glRasterPos4d ( double x, double y, double z, double w ) Func glRasterPos4d($fX, $fY, $fZ, $fW) DllCall($glDll, "none", "glRasterPos4d", "double", $fX, "double", $fY, "double", $fZ, "double", $fW) EndFunc ;GLAPI void APIENTRY glRasterPos4f ( float x, float y, float z, float w ) Func glRasterPos4f($fX, $fY, $fZ, $fW) DllCall($glDll, "none", "glRasterPos4f", "float", $fX, "float", $fY, "float", $fZ, "float", $fW) EndFunc ;GLAPI void APIENTRY glRasterPos4i ( int x, int y, int z, int w ) Func glRasterPos4i($iX, $iY, $iZ, $iW) DllCall($glDll, "none", "glRasterPos4i", "int", $iX, "int", $iY, "int", $iZ, "int", $iW) EndFunc ;GLAPI void APIENTRY glRasterPos4s ( short x, short y, short z, short w ) Func glRasterPos4s($iX, $iY, $iZ, $iW) DllCall($glDll, "none", "glRasterPos4s", "short", $iX, "short", $iY, "short", $iZ, "short", $iW) EndFunc ;GLAPI void APIENTRY glRasterPos2dv ( const double *v ) Func glRasterPos2dv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos2d", "double", $aV[0], "double", $aV[1]) EndFunc ;GLAPI void APIENTRY glRasterPos2fv ( const float *v ) Func glRasterPos2fv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos2f", "float", $aV[0], "float", $aV[1]) EndFunc ;GLAPI void APIENTRY glRasterPos2iv ( const int *v ) Func glRasterPos2iv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos2i", "int", $aV[0], "int", $aV[1]) EndFunc ;GLAPI void APIENTRY glRasterPos2sv ( const short *v ) Func glRasterPos2sv($aV) If Not IsArray($aV) Or UBound($aV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos2s", "short", $aV[0], "short", $aV[1]) EndFunc ;GLAPI void APIENTRY glRasterPos3dv ( const double *v ) Func glRasterPos3dv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos3d", "double", $aV[0], "double", $aV[1], "double", $aV[2]) EndFunc ;GLAPI void APIENTRY glRasterPos3fv ( const float *v ) Func glRasterPos3fv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos3f", "float", $aV[0], "float", $aV[1], "float", $aV[2]) EndFunc ;GLAPI void APIENTRY glRasterPos3iv ( const int *v ) Func glRasterPos3iv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos3i", "int", $aV[0], "int", $aV[1], "int", $aV[2]) EndFunc ;GLAPI void APIENTRY glRasterPos3sv ( const short *v ) Func glRasterPos3sv($aV) If Not IsArray($aV) Or UBound($aV) <> 3 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos3s", "short", $aV[0], "short", $aV[1], "short", $aV[2]) EndFunc ;GLAPI void APIENTRY glRasterPos4dv ( const double *v ) Func glRasterPos4dv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos4d", "double", $aV[0], "double", $aV[1], "double", $aV[2], "double", $aV[3]) EndFunc ;GLAPI void APIENTRY glRasterPos4fv ( const float *v ) Func glRasterPos4fv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos4f", "float", $aV[0], "float", $aV[1], "float", $aV[2], "float", $aV[3]) EndFunc ;GLAPI void APIENTRY glRasterPos4iv ( const int *v ) Func glRasterPos4iv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos4i", "int", $aV[0], "int", $aV[1], "int", $aV[2], "int", $aV[3]) EndFunc ;GLAPI void APIENTRY glRasterPos4sv ( const short *v ) Func glRasterPos4sv($aV) If Not IsArray($aV) Or UBound($aV) <> 4 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glRasterPos4s", "short", $aV[0], "short", $aV[1], "short", $aV[2], "short", $aV[3]) EndFunc ;GLAPI void APIENTRY glRectd ( double x1, double y1, double x2, double y2 ) Func glRectd($fX1, $fY1, $fX2, $fY2) DllCall($glDll, "none", "glRectd", "double", $fX1, "double", $fY1, "double", $fX2, "double", $fY2) EndFunc ;GLAPI void APIENTRY glRectf ( float x1, float y1, float x2, float y2 ) Func glRectf($fX1, $fY1, $fX2, $fY2) DllCall($glDll, "none", "glRectf", "float", $fX1, "float", $fY1, "float", $fX2, "float", $fY2) EndFunc ;GLAPI void APIENTRY glRecti ( int x1, int y1, int x2, int y2 ) Func glRecti($iX1, $iY1, $iX2, $iY2) DllCall($glDll, "none", "glRecti", "int", $iX1, "int", $iY1, "int", $iX2, "int", $iY2) EndFunc ;GLAPI void APIENTRY glRects ( short x1, short y1, short x2, short y2 ) Func glRects($iX1, $iY1, $iX2, $iY2) DllCall($glDll, "none", "glRects", "short", $iX1, "short", $iY1, "short", $iX2, "short", $iY2) EndFunc ;GLAPI void APIENTRY glRectdv ( const double *v1, const double *v2 ) Func glRectdv($aV1, $aV2) DllCall($glDll, "none", "glRectdv", "double", $aV1[0], "double", $aV1[1], "double", $aV2[0], "double", $aV2[1]) EndFunc ;GLAPI void APIENTRY glRectfv ( const float *v1, const float *v2 ) Func glRectfv($aV1, $aV2) DllCall($glDll, "none", "glRectfv", "float", $aV1[0], "float", $aV1[1], "float", $aV2[0], "float", $aV2[1]) EndFunc ;GLAPI void APIENTRY glRectiv ( const int *v1, const int *v2 ) Func glRectiv($aV1, $aV2) DllCall($glDll, "none", "glRectiv", "int", $aV1[0], "int", $aV1[1], "int", $aV2[0], "int", $aV2[1]) EndFunc ;GLAPI void APIENTRY glRectsv ( const short *v1, const short *v2 ) Func glRectsv($aV1, $aV2) DllCall($glDll, "none", "glRectsv", "short", $aV1[0], "short", $aV1[1], "short", $aV2[0], "short", $aV2[1]) EndFunc #endregion ### Drawing Functions ### ; ############################################################## #region ### Lighting ### ;GLAPI void APIENTRY glShadeModel ( unsigned int mode ) Func glShadeModel($iMode) DllCall($glDll, "none", "glShadeModel", "uint", $iMode) EndFunc ;GLAPI void APIENTRY glLightf ( unsigned int light, unsigned int pname, float param ) Func glLightf($iLight, $iPname, $fParam) DllCall($glDll, "none", "glLightf", "uint", $iLight, "uint", $iPname, "float", $fParam) EndFunc ;GLAPI void APIENTRY glLighti ( unsigned int light, unsigned int pname, int param ) Func glLighti($iLight, $iPname, $iParam) DllCall($glDll, "none", "glLighti", "uint", $iLight, "uint", $iPname, "int", $iParam) EndFunc ;GLAPI void APIENTRY glLightfv ( unsigned int light, unsigned int pname, const float *params ) Func glLightfv($iLight, $iPname, $aParams) If Not IsArray($aParams) Then glLightf($iLight, $iPname, $aParams) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("float[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next ; --- DllCall($glDll, "none", "glLightfv", "uint", $iLight, "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glLightiv ( unsigned int light, unsigned int pname, const int *params ) Func glLightiv($iLight, $iPname, $aParams) If Not IsArray($aParams) Then glLighti($iLight, $iPname, $aParams) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("int[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next ; --- DllCall($glDll, "none", "glLightiv", "uint", $iLight, "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glGetLightfv ( unsigned int light, unsigned int pname, float *params ) Func glGetLightfv($iLight, $iPname) Local $ret = DllCall($glDll, "none", "glGetLightfv", "uint", $iLight, "uint", $iPname, "float*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[3] EndFunc ;GLAPI void APIENTRY glGetLightiv ( unsigned int light, unsigned int pname, int *params ) Func glGetLightiv($iLight, $iPname) Local $ret = DllCall($glDll, "none", "glGetLightiv", "uint", $iLight, "uint", $iPname, "int*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[3] EndFunc ;GLAPI void APIENTRY glLightModelf ( unsigned int pname, float param ) Func glLightModelf($iPname, $fParam) DllCall($glDll, "none", "glLightModelf", "uint", $iPname, "float", $fParam) EndFunc ;GLAPI void APIENTRY glLightModeli ( unsigned int pname, int param ) Func glLightModeli($iPname, $iParam) DllCall($glDll, "none", "glLightModeli", "uint", $iPname, "int", $iParam) EndFunc ;GLAPI void APIENTRY glLightModelfv ( unsigned int pname, const float *params ) Func glLightModelfv($iPname, $aParams) If Not IsArray($aParams) Then Return glLightModelf($iPname, $aParams) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("float[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next DllCall($glDll, "none", "glLightModelfv", "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glLightModeliv ( unsigned int pname, const int *params ) Func glLightModeliv($iPname, $aParams) If Not IsArray($aParams) Then Return glLightModeli($iPname, $aParams) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("int[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next DllCall($glDll, "none", "glLightModeliv", "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glMaterialf ( unsigned int face, unsigned int pname, float param ) Func glMaterialf($iFace, $iPname, $fParam) DllCall($glDll, "none", "glMaterialf", "uint", $iFace, "uint", $iPname, "float", $fParam) EndFunc ;GLAPI void APIENTRY glMateriali ( unsigned int face, unsigned int pname, int param ) Func glMateriali($iFace, $iPname, $iParam) DllCall($glDll, "none", "glMateriali", "uint", $iFace, "uint", $iPname, "int", $iParam) EndFunc ;GLAPI void APIENTRY glMaterialfv ( unsigned int face, unsigned int pname, const float *params ) Func glMaterialfv($iFace, $iPname, $aParams) If Not IsArray($aParams) Then Return glMaterialf($iFace, $iPname, $aParams) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("float[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next DllCall($glDll, "none", "glMaterialfv", "uint", $iFace, "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glMaterialiv ( unsigned int face, unsigned int pname, const int *params ) Func glMaterialiv($iFace, $iPname, $aParams) If Not IsArray($aParams) Then Return glMateriali($iFace, $iPname, $aParams) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("int[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next DllCall($glDll, "none", "glMaterialiv", "uint", $iFace, "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glGetMaterialfv ( unsigned int face, unsigned int pname, float *params ) Func glGetMaterialfv($iFace, $iPname) Local $ret = DllCall($glDll, "none", "glGetMaterialfv", "uint", $iFace, "uint", $iPname, "float*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[3] EndFunc ;GLAPI void APIENTRY glGetMaterialiv ( unsigned int face, unsigned int pname, int *params ) Func glGetMaterialiv($iFace, $iPname) Local $ret = DllCall($glDll, "none", "glGetMaterialiv", "uint", $iFace, "uint", $iPname, "iny*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[3] EndFunc ;GLAPI void APIENTRY glColorMaterial ( unsigned int face, unsigned int mode ) Func glColorMaterial($iFace, $iMode) DllCall($glDll, "none", "glColorMaterial", "uint", $iFace, "uint", $iMode) EndFunc #endregion ### Lighting ### ; ############################################################## #region ### Raster functions ### ;GLAPI void APIENTRY glPixelZoom ( float xfactor, float yfactor ) Func glPixelZoom($fXfactor, $fYfactor) DllCall($glDll, "none", "glPixelZoom", "float", $fXfactor, "float", $fYfactor) EndFunc ;GLAPI void APIENTRY glPixelStoref ( unsigned int pname, float param ) Func glPixelStoref($iPname, $fParam) DllCall($glDll, "none", "glPixelStoref", "uint", $iPname, "float", $fParam) EndFunc ;GLAPI void APIENTRY glPixelStorei ( unsigned int pname, int param ) Func glPixelStorei($iPname, $iParam) DllCall($glDll, "none", "glPixelStorei", "uint", $iPname, "int", $iParam) EndFunc ;GLAPI void APIENTRY glPixelTransferf ( unsigned int pname, float param ) Func glPixelTransferf($iPname, $fParam) DllCall($glDll, "none", "glPixelTransferf", "uint", $iPname, "float", $fParam) EndFunc ;GLAPI void APIENTRY glPixelTransferi ( unsigned int pname, int param ) Func glPixelTransferi($iPname, $iParam) DllCall($glDll, "none", "glPixelTransferi", "uint", $iPname, "int", $iParam) EndFunc ;GLAPI void APIENTRY glPixelMapfv ( unsigned int map, int mapsize, const float *values ) ;GLAPI void APIENTRY glPixelMapuiv ( unsigned int map, int mapsize, const unsigned int *values ) ;GLAPI void APIENTRY glPixelMapusv ( unsigned int map, int mapsize, const unsigned short *values ) ;GLAPI void APIENTRY glGetPixelMapfv ( unsigned int map, float *values ) ;GLAPI void APIENTRY glGetPixelMapuiv ( unsigned int map, unsigned int *values ) ;GLAPI void APIENTRY glGetPixelMapusv ( unsigned int map, unsigned short *values ) ;GLAPI void APIENTRY glBitmap ( int width, int height, float xorig, float yorig, float xmove, float ymove, const unsigned char *bitmap ) ;GLAPI void APIENTRY glReadPixels ( int x, int y, int width, int height, unsigned int format, unsigned int type, void *pixels ) ;GLAPI void APIENTRY glDrawPixels ( int width, int height, unsigned int format, unsigned int type, const void *pixels ) ;GLAPI void APIENTRY glCopyPixels ( int x, int y, int width, int height, unsigned int type ) #endregion ### Raster functions ### ; ############################################################## #region ### Stenciling ### ;GLAPI void APIENTRY glStencilFunc ( unsigned int func, int ref, unsigned int mask ) Func glStencilFunc($iFunc, $iRef, $iMask) DllCall($glDll, "none", "glStencilFunc", "uint", $iFunc, "int", $iRef, "uint", $iMask) EndFunc ;GLAPI void APIENTRY glStencilMask ( unsigned int mask ) Func glStencilMask($iMask) DllCall($glDll, "none", "glStencilMask", "uint", $iMask) EndFunc ;GLAPI void APIENTRY glStencilOp ( unsigned int fail, unsigned int zfail, unsigned int zpass ) Func glStencilOp($iFail, $iZfail, $iZpass) DllCall($glDll, "none", "glStencilOp", "uint", $iFail, "uint", $iZfail, "uint", $iZpass) EndFunc ;GLAPI void APIENTRY glClearStencil ( int s ) Func glClearStencil($iS) DllCall($glDll, "none", "glClearStencil", "int", $iS) EndFunc #endregion ### Stenciling ### ; ############################################################## #region ### Texture mapping ### ;GLAPI void APIENTRY glTexGend ( unsigned int coord, unsigned int pname, double param ) Func glTexGend($iCoord, $iPname, $fParam) DllCall($glDll, "none", "glTexGend", "uint", $iCoord, "uint", $iPname, "double", $fParam) EndFunc ;GLAPI void APIENTRY glTexGenf ( unsigned int coord, unsigned int pname, float param ) Func glTexGenf($iCoord, $iPname, $fParam) DllCall($glDll, "none", "glTexGenf", "uint", $iCoord, "uint", $iPname, "float", $fParam) EndFunc ;GLAPI void APIENTRY glTexGeni ( unsigned int coord, unsigned int pname, int param ) Func glTexGeni($iCoord, $iPname, $iParam) DllCall($glDll, "none", "glTexGeni", "uint", $iCoord, "uint", $iPname, "int", $iParam) EndFunc ;GLAPI void APIENTRY glTexGendv ( unsigned int coord, unsigned int pname, const double *params ) Func glTexGendv($iCoord, $iPname, $aParams) If Not IsArray($aParams) Then Return SetError(1, 0, 0) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("double[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next DllCall($glDll, "none", "glTexGendv", "uint", $iCoord, "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glTexGenfv ( unsigned int coord, unsigned int pname, const float *params ) Func glTexGenfv($iCoord, $iPname, $aParams) If Not IsArray($aParams) Then Return SetError(1, 0, 0) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("float[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next DllCall($glDll, "none", "glTexGenfv", "uint", $iCoord, "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glTexGeniv ( unsigned int coord, unsigned int pname, const int *params ) Func glTexGeniv($iCoord, $iPname, $aParams) If Not IsArray($aParams) Then Return SetError(1, 0, 0) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("int[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next DllCall($glDll, "none", "glTexGeniv", "uint", $iCoord, "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glGetTexGendv ( unsigned int coord, unsigned int pname, double *params ) Func glGetTexGendv($iCoord, $iPname) Local $ret = DllCall($glDll, "none", "glGetTexGendv", "uint", $iCoord, "uint", $iPname, "double*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[3] EndFunc ;GLAPI void APIENTRY glGetTexGenfv ( unsigned int coord, unsigned int pname, float *params ) Func glGetTexGenfv($iCoord, $iPname) Local $ret = DllCall($glDll, "none", "glGetTexGenfv", "uint", $iCoord, "uint", $iPname, "float*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[3] EndFunc ;GLAPI void APIENTRY glGetTexGeniv ( unsigned int coord, unsigned int pname, int *params ) Func glGetTexGeniv($iCoord, $iPname) Local $ret = DllCall($glDll, "none", "glGetTexGeniv", "uint", $iCoord, "uint", $iPname, "int*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[3] EndFunc ;GLAPI void APIENTRY glTexEnvf ( unsigned int target, unsigned int pname, float param ) Func glTexEnvf($iTarget, $iPname, $fParam) DllCall($glDll, "none", "glTexEnvf", "uint", $iTarget, "uint", $iPname, "float", $fParam) EndFunc ;GLAPI void APIENTRY glTexEnvi ( unsigned int target, unsigned int pname, int param ) Func glTexEnvi($iTarget, $iPname, $iParam) DllCall($glDll, "none", "glTexEnvi", "uint", $iTarget, "uint", $iPname, "int", $iParam) EndFunc ;GLAPI void APIENTRY glTexEnvfv ( unsigned int target, unsigned int pname, const float *params ) Func glTexEnvfv($iTarget, $iPname, $aParams) If Not IsArray($aParams) Then Return SetError(1, 0, 0) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("float[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next DllCall($glDll, "none", "glTexEnvfv", "uint", $iTarget, "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glTexEnviv ( unsigned int target, unsigned int pname, const int *params ) Func glTexEnviv($iTarget, $iPname, $aParams) If Not IsArray($aParams) Then Return SetError(1, 0, 0) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("int[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next DllCall($glDll, "none", "glTexEnviv", "uint", $iTarget, "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glGetTexEnvfv ( unsigned int target, unsigned int pname, float *params ) Func glGetTexEnvfv($iTarget, $iPname) Local $ret = DllCall($glDll, "none", "glGetTexEnvfv", "uint", $iTarget, "uint", $iPname, "float*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[3] EndFunc ;GLAPI void APIENTRY glGetTexEnviv ( unsigned int target, unsigned int pname, int *params ) Func glGetTexEnviv($iTarget, $iPname) Local $ret = DllCall($glDll, "none", "glGetTexEnviv", "uint", $iTarget, "uint", $iPname, "int*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[3] EndFunc ;GLAPI void APIENTRY glTexParameterf ( unsigned int target, unsigned int pname, float param ) Func glTexParameterf($iTarget, $iPname, $fParam) DllCall($glDll, "none", "glTexParameterf", "uint", $iTarget, "uint", $iPname, "float", $fParam) EndFunc ;GLAPI void APIENTRY glTexParameteri ( unsigned int target, unsigned int pname, int param ) Func glTexParameteri($iTarget, $iPname, $iParam) DllCall($glDll, "none", "glTexParameteri", "uint", $iTarget, "uint", $iPname, "int", $iParam) EndFunc ;GLAPI void APIENTRY glTexParameterfv ( unsigned int target, unsigned int pname, const float *params ) Func glTexParameterfv($iTarget, $iPname, $aParams) If Not IsArray($aParams) Then Return SetError(1, 0, 0) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("float[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next DllCall($glDll, "none", "glTexParameterfv", "uint", $iTarget, "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glTexParameteriv ( unsigned int target, unsigned int pname, const int *params ) Func glTexParameteriv($iTarget, $iPname, $aParams) If Not IsArray($aParams) Then Return SetError(1, 0, 0) ; --- Local $ub = UBound($aParams) Local $struct = DllStructCreate("int[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($struct, 1, $aParams[$i], $i + 1) Next DllCall($glDll, "none", "glTexParameteriv", "uint", $iTarget, "uint", $iPname, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glGetTexParameterfv ( unsigned int target, unsigned int pname, float *params) Func glGetTexParameterfv($iTarget, $iPname) Local $ret = DllCall($glDll, "none", "glGetTexParameterfv", "uint", $iTarget, "uint", $iPname, "float*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[3] EndFunc ;GLAPI void APIENTRY glGetTexParameteriv ( unsigned int target, unsigned int pname, int *params ) Func glGetTexParameteriv($iTarget, $iPname) Local $ret = DllCall($glDll, "none", "glGetTexParameteriv", "uint", $iTarget, "uint", $iPname, "int*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[3] EndFunc ;GLAPI void APIENTRY glGetTexLevelParameterfv ( unsigned int target, int level, unsigned int pname, float *params ) Func glGetTexLevelParameterfv($iTarget, $iLevel, $iPname) Local $ret = DllCall($glDll, "none", "glGetTexLevelParameterfv", "uint", $iTarget, "int", $iLevel, "uint", $iPname, "float*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[4] EndFunc ;GLAPI void APIENTRY glGetTexLevelParameteriv ( unsigned int target, int level, unsigned int pname, int *params ) Func glGetTexLevelParameteriv($iTarget, $iLevel, $iPname) Local $ret = DllCall($glDll, "none", "glGetTexLevelParameteriv", "uint", $iTarget, "int", $iLevel, "uint", $iPname, "int*", 0) If @error Then Return SetError(@error, @extended, $ret) ; --- Return $ret[4] EndFunc ;GLAPI void APIENTRY glTexImage1D ( unsigned int target, int level, int internalFormat, int width, int border, unsigned int format, unsigned int type, const void *pixels ) ;GLAPI void APIENTRY glTexImage2D ( unsigned int target, int level, int internalFormat, int width, int height, int border, unsigned int format, unsigned int type, const void *pixels ) ;GLAPI void APIENTRY glGetTexImage ( unsigned int target, int level, unsigned int format, unsigned int type, void *pixels ) #endregion ### Texture mapping ### ; ############################################################## #region ### Evaluators ### ;GLAPI void APIENTRY glMap1d ( unsigned int target, double u1, double u2, int stride, int order, const double *points ) Func glMap1d($iTarget, $fU1, $fU2, $iStride, $iOrder, Const ByRef $aPoints) Local $struct = DllStructCreate("double[" & $iOrder & "]") For $i = 0 To $iOrder - 1 DllStructSetData($struct, 1, $aPoints[$i], $i + 1) Next DllCall($glDll, "none", "glMap1d", "uint", $iTarget, "double", $fU1, "double", $fU2, "int", $iStride, "int", $iOrder, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glMap1f ( unsigned int target, float u1, float u2, int stride, int order, const float *points ) Func glMap1f($iTarget, $fU1, $fU2, $iStride, $iOrder, Const ByRef $aPoints) Local $struct = DllStructCreate("float[" & $iOrder & "]") For $i = 0 To $iOrder - 1 DllStructSetData($struct, 1, $aPoints[$i], $i + 1) Next DllCall($glDll, "none", "glMap1f", "uint", $iTarget, "double", $fU1, "double", $fU2, "int", $iStride, "int", $iOrder, "ptr", DllStructGetPtr($struct)) EndFunc ;GLAPI void APIENTRY glMap2d ( unsigned int target, double u1, double u2, int ustride, int uorder, double v1, double v2, int vstride, int vorder, const double *points ) ;GLAPI void APIENTRY glMap2f ( unsigned int target, float u1, float u2, int ustride, int uorder, float v1, float v2, int vstride, int vorder, const float *points ) ;GLAPI void APIENTRY glGetMapdv ( unsigned int target, unsigned int query, double *v ) ;GLAPI void APIENTRY glGetMapfv ( unsigned int target, unsigned int query, float *v ) ;GLAPI void APIENTRY glGetMapiv ( unsigned int target, unsigned int query, int *v ) ;GLAPI void APIENTRY glEvalCoord1d ( double u ) Func glEvalCoord1d($fU) DllCall($glDll, "none", "glEvalCoord1d", "double", $fU) EndFunc ;GLAPI void APIENTRY glEvalCoord1f ( float u ) Func glEvalCoord1f($fU) DllCall($glDll, "none", "glEvalCoord1f", "float", $fU) EndFunc ;GLAPI void APIENTRY glEvalCoord1dv ( const double *u ) Func glEvalCoord1dv($fU) DllCall($glDll, "none", "glEvalCoord1d", "double", $fU) EndFunc ;GLAPI void APIENTRY glEvalCoord1fv ( const float *u ) Func glEvalCoord1fv($fU) DllCall($glDll, "none", "glEvalCoord1f", "float", $fU) EndFunc ;GLAPI void APIENTRY glEvalCoord2d ( double u, double v ) Func glEvalCoord2d($fU, $fV) DllCall($glDll, "none", "glEvalCoord2d", "double", $fU, "double", $fV) EndFunc ;GLAPI void APIENTRY glEvalCoord2f ( float u, float v ) Func glEvalCoord2f($fU, $fV) DllCall($glDll, "none", "glEvalCoord2f", "float", $fU, "float", $fV) EndFunc ;GLAPI void APIENTRY glEvalCoord2dv ( const double *u ) Func glEvalCoord2dv($aUV) If UBound($aUV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glEvalCoord2d", "double", $aUV[0], "double", $aUV[1]) EndFunc ;GLAPI void APIENTRY glEvalCoord2fv ( const float *u ) Func glEvalCoord2fv($aUV) If UBound($aUV) <> 2 Then Return SetError(1, 0, 0) ; --- DllCall($glDll, "none", "glEvalCoord2f", "float", $aUV[0], "float", $aUV[1]) EndFunc ;GLAPI void APIENTRY glMapGrid1d ( int un, double u1, double u2 ) Func glMapGrid1d($iUn, $fU1, $fU2) DllCall($glDll, "none", "glMapGrid1d", "int", $iUn, "double", $fU1, "double", $fU2) EndFunc ;GLAPI void APIENTRY glMapGrid1f ( int un, float u1, float u2 ) Func glMapGrid1f($iUn, $fU1, $fU2) DllCall($glDll, "none", "glMapGrid1f", "int", $iUn, "float", $fU1, "float", $fU2) EndFunc ;GLAPI void APIENTRY glMapGrid2d ( int un, double u1, double u2, int vn, double v1, double v2 ) Func glMapGrid2d($iUn, $fU1, $fU2, $iVn, $fV1, $fV2) DllCall($glDll, "none", "glMapGrid2d", "int", $iUn, "double", $fU1, "double", $fU2, "int", $iVn, "double", $fV1, "double", $fV2) EndFunc ;GLAPI void APIENTRY glMapGrid2f ( int un, float u1, float u2, int vn, float v1, float v2 ) Func glMapGrid2f($iUn, $fU1, $fU2, $iVn, $fV1, $fV2) DllCall($glDll, "none", "glMapGrid2f", "int", $iUn, "float", $fU1, "float", $fU2, "int", $iVn, "float", $fV1, "float", $fV2) EndFunc ;GLAPI void APIENTRY glEvalPoint1 ( int i ) Func glEvalPoint1($iI) DllCall($glDll, "none", "glEvalPoint1", "int", $iI) EndFunc ;GLAPI void APIENTRY glEvalPoint2 ( int i, int j ) Func glEvalPoint2($iI, $iJ) DllCall($glDll, "none", "glEvalPoint2", "int", $iI, "int", $iJ) EndFunc ;GLAPI void APIENTRY glEvalMesh1 ( unsigned int mode, int i1, int i2 ) Func glEvalMesh1($iMode, $iI1, $iI2) DllCall($glDll, "none", "glEvalMesh1", "uint", $iMode, "int", $iI1, "int", $iI2) EndFunc ;GLAPI void APIENTRY glEvalMesh2 ( unsigned int mode, int i1, int i2, int j1, int j2 ) Func glEvalMesh2($iMode, $iI1, $iI2, $iJ1, $iJ2) DllCall($glDll, "none", "glEvalMesh2", "uint", $iMode, "int", $iI1, "int", $iI2, "int", $iJ1, "int", $iJ2) EndFunc #endregion ### Evaluators ### ; ############################################################## #region ### Fog ### ;GLAPI void APIENTRY glFogf ( unsigned int pname, float param ) Func glFogf($iPname, $fParam) DllCall($glDll, "none", "glFogf", "uint", $iPname, "float", $fParam) EndFunc ;GLAPI void APIENTRY glFogi ( unsigned int pname, int param ) Func glFogi($iPname, $iParam) DllCall($glDll, "none", "glFogi", "uint", $iPname, "int", $iParam) EndFunc ;GLAPI void APIENTRY glFogfv ( unsigned int pname, const float *params ) Func glFogfv($iPname, $aParams) If $iPname = $GL_FOG_COLOR Then If UBound($aParams) = 4 Then Local $struct = DllStructCreate("float[4]") DllStructSetData($struct, 1, $aParams[0], 1) DllStructSetData($struct, 1, $aParams[1], 2) DllStructSetData($struct, 1, $aParams[2], 3) DllStructSetData($struct, 1, $aParams[3], 4) DllCall($glDll, "none", "glFogfv", "uint", $iPname, "ptr", DllStructGetPtr($struct)) Else Return SetError(1, 0, 0) EndIf Else If IsArray($aParams) Then DllCall($glDll, "none", "glFogf", "uint", $iPname, "float", $aParams[0]) Else DllCall($glDll, "none", "glFogf", "uint", $iPname, "float", $aParams) EndIf EndIf EndFunc ;GLAPI void APIENTRY glFogiv ( unsigned int pname, const int *params ) Func glFogiv($iPname, $aParams) If $iPname = $GL_FOG_COLOR Then If UBound($aParams) = 4 Then Local $struct = DllStructCreate("int[4]") DllStructSetData($struct, 1, $aParams[0], 1) DllStructSetData($struct, 1, $aParams[1], 2) DllStructSetData($struct, 1, $aParams[2], 3) DllStructSetData($struct, 1, $aParams[3], 4) DllCall($glDll, "none", "glFogfv", "uint", $iPname, "ptr", DllStructGetPtr($struct)) Else Return SetError(1, 0, 0) EndIf Else If IsArray($aParams) Then DllCall($glDll, "none", "glFogi", "uint", $iPname, "int", $aParams[0]) Else DllCall($glDll, "none", "glFogi", "uint", $iPname, "int", $aParams) EndIf EndIf EndFunc #endregion ### Fog ### ; ############################################################## #region ### Selection and Feedback ### ;GLAPI void APIENTRY glFeedbackBuffer ( int size, unsigned int type, float *buffer ) Func glFeedbackBuffer($iSize, $iType, ByRef $aBuffer) Local $struct = DllStructCreate("float[" & $iSize & "]") DllCall($glDll, "none", "glFeedbackBuffer", "int", $iSize, "uint", $iType, "ptr", DllStructGetPtr($struct)) ; --- Dim $aBuffer[$iSize] For $i = 0 To $iSize - 1 $aBuffer[$i] = DllStructGetData($struct, 1, $i + 1) Next EndFunc ;GLAPI void APIENTRY glPassThrough ( float token ) Func glPassThrough($fToken) DllCall($glDll, "none", "glPassThrough", "float", $fToken) EndFunc ;GLAPI void APIENTRY glSelectBuffer ( int size, unsigned int *buffer ) Func glSelectBuffer($iSize, ByRef $aBuffer) Local $struct = DllStructCreate("uint[" & $iSize & "]") DllCall($glDll, "none", "glSelectBuffer", "int", $iSize, "ptr", DllStructGetPtr($struct)) ; --- Dim $aBuffer[$iSize] For $i = 0 To $iSize - 1 $aBuffer[$i] = DllStructGetData($struct, 1, $i + 1) Next EndFunc ;GLAPI void APIENTRY glInitNames ( void ) Func glInitNames() DllCall($glDll, "none", "glInitNames") EndFunc ;GLAPI void APIENTRY glLoadName ( unsigned int name ) Func glLoadName($iName) DllCall($glDll, "none", "glLoadName", "uint", $iName) EndFunc ;GLAPI void APIENTRY glPushName ( unsigned int name ) Func glPushName($iName) DllCall($glDll, "none", "glPushName", "uint", $iName) EndFunc ;GLAPI void APIENTRY glPopName ( void ) Func glPopName() DllCall($glDll, "none", "glPopName") EndFunc #endregion ### Selection and Feedback ### ; ############################################################## #region ### 1.1 functions ### ; texture objects ;GLAPI void APIENTRY glGenTextures ( int n, unsigned int *textures ) Func glGenTextures($iN) Local $struct = DllStructCreate("int[" & $iN & "]") Local $ret = DllCall($glDll, "none", "glGenTextures", "int", $iN, "ptr", DllStructGetPtr($struct)) If @error Then Return SetError(@error, @extended, $ret) ; --- If $iN = 1 Then Return DllStructGetData($struct, 1, 1) Else Local $aTex[$iN + 1] $aTex[0] = $iN ; --- For $i = 1 To $iN $aTex[$i] = DllStructGetData($struct, 1, $i) Next Return $aTex EndIf EndFunc ;GLAPI void APIENTRY glDeleteTextures ( int n, const unsigned int *textures) Func glDeleteTextures($iN, $aTex) If $iN = 1 Then Dim $aTex[$iN] = [$aTex] EndIf ; --- Local $struct = DllStructCreate("int[" & $iN & "]") For $i = 0 To $iN - 1 DllStructSetData($struct, 1, $aTex[$i], $i + 1) Next ; --- Local $ret = DllCall($glDll, "none", "glDeleteTextures", "int", $iN, "ptr", DllStructGetPtr($struct)) If @error Then Return SetError(@error, @extended, $ret) ; --- Return SetError(0, 0, 1) EndFunc ;GLAPI void APIENTRY glBindTexture ( unsigned int target, unsigned int texture ) Func glBindTexture($iTarget, $iTexture) DllCall($glDll, "none", "glBindTexture", "uint", $iTarget, "uint", $iTexture) EndFunc ;GLAPI void APIENTRY glPrioritizeTextures ( int n, const unsigned int *textures, const float *priorities ) Func glPrioritizeTextures($iN, Const ByRef $aTextures, Const ByRef $aPriorities) ; Not tested If Not IsArray($aTextures) Or Not IsArray($aPriorities) Then Return SetError(1, 0, 0) ; --- Local $ub1 = UBound($aTextures), $ub2 = UBound($aPriorities) If $ub1 <> $ub2 Then Return SetError(2, 0, 0) ; --- Local $s1 = DllStructCreate("uint[" & $ub1 & "]") Local $s2 = DllStructCreate("float[" & $ub2 & "]") For $i = 0 To $ub1 - 1 DllStructSetData($s1, 1, $aTextures[$i], $i + 1) DllStructSetData($s2, 1, $aPriorities[$i], $i + 1) Next DllCall($glDll, "none", "glPrioritizeTextures", "int", $iN, "ptr", DllStructGetPtr($s1), "ptr", DllStructGetPtr($s2)) EndFunc ;GLAPI unsigned char APIENTRY glAreTexturesResident ( int n, const unsigned int *textures, unsigned char *residences ) Func glAreTexturesResident($iN, Const ByRef $aTextures, ByRef $aResidences) ; Not tested If Not IsArray($aTextures) Then Return SetError(1, 0, 0) ; --- Local $ub = UBound($aTextures) Local $s_in = DllStructCreate("uint[" & $ub & "]") Local $s_out = DllStructCreate("byte[" & $ub & "]") For $i = 0 To $ub - 1 DllStructSetData($s_in, 1, $aTextures[$i], $i + 1) Next Local $ret = DllCall($glDll, "none", "glAreTexturesResident", "int", $iN, "ptr", $s_in, "ptr", $s_out) If @error Then Return SetError(@error, @extended, $ret) ; --- Dim $aResidences[$ub] For $i = 0 To $ub - 1 $aResidences[$i] = DllStructGetData($s_out, 1, $i + 1) Next ; --- Return $ret[0] EndFunc ;GLAPI unsigned char APIENTRY glIsTexture ( unsigned int texture ) Func glIsTexture($iTexture) Local $ret = DllCall($glDll, "byte", "glIsTexture", "uint", $iTexture) If @error Then Return SetError(@error, @extended, $ret) ; --- Return SetError(0, 0, $ret[0]) EndFunc Func glSwapBuffers($hDC) DllCall("gdi32.dll", "int", "SwapBuffers", "hwnd", $hDC) EndFunc