Commit 7233930e by Nicolas Capens Committed by Nicolas Capens

Added HelloRAD test sample.

BUG=18218488 Change-Id: Iab4432360de4f3ac6921e4ed84790bcd772d147d Reviewed-on: https://swiftshader-review.googlesource.com/1222Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarNicolas Capens <nicolascapens@google.com>
parent 9d4c9210
rad: src/app/rad.cpp src/app/radfnptrinit.c src/app/radexample.cpp
gcc -o rad src/app/rad.cpp src/app/radfnptrinit.c src/app/radexample.cpp -I/usr/include/GL -I./ -I./src/GL -lGL -lglut -lX11

Microsoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rad", "rad.vcproj", "{B4537008-1302-4EE7-98C8-6897472B9E36}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{B4537008-1302-4EE7-98C8-6897472B9E36}.Debug|Win32.ActiveCfg = Debug|Win32
{B4537008-1302-4EE7-98C8-6897472B9E36}.Debug|Win32.Build.0 = Debug|Win32
{B4537008-1302-4EE7-98C8-6897472B9E36}.Release|Win32.ActiveCfg = Release|Win32
{B4537008-1302-4EE7-98C8-6897472B9E36}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="rad"
ProjectGUID="{B4537008-1302-4EE7-98C8-6897472B9E36}"
RootNamespace="rad"
Keyword="Win32Proj"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="0"
AdditionalIncludeDirectories=".\src\GL"
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE"
MinimalRebuild="true"
BasicRuntimeChecks="3"
RuntimeLibrary="3"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="2"
AdditionalLibraryDirectories="E:\p4-14\sw\apps\gpu\drivers\opengl\lib"
GenerateDebugInformation="true"
SubSystem="1"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="1"
CharacterSet="1"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
Optimization="2"
EnableIntrinsicFunctions="true"
AdditionalIncludeDirectories=".\src\GL"
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE"
RuntimeLibrary="2"
EnableFunctionLevelLinking="true"
UsePrecompiledHeader="0"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLinkerTool"
LinkIncremental="1"
AdditionalLibraryDirectories="E:\p4-14\sw\apps\gpu\drivers\opengl\lib"
GenerateDebugInformation="true"
SubSystem="1"
OptimizeReferences="2"
EnableCOMDATFolding="2"
TargetMachine="1"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCManifestTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCAppVerifierTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\src\app\rad.cpp"
>
</File>
<File
RelativePath=".\src\app\radexample.cpp"
>
</File>
<File
RelativePath=".\src\app\radfnptrinit.c"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
CompileAs="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\src\GL\rad.h"
>
</File>
<File
RelativePath=".\src\app\radfnptrinit.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
<File
RelativePath=".\ReadMe.txt"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>
/*++ BUILD Version: 0004 // Increment this if a change has global effects
Copyright (c) 1985-96, Microsoft Corporation
Module Name:
gl.h
Abstract:
Procedure declarations, constant definitions and macros for the OpenGL
component.
--*/
#ifndef __gl_h_
#ifndef __GL_H__
#define __gl_h_
#define __GL_H__
#ifdef __cplusplus
extern "C" {
#endif
/*
** Copyright 1996 Silicon Graphics, Inc.
** All Rights Reserved.
**
** This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
** the contents of this file may not be disclosed to third parties, copied or
** duplicated in any form, in whole or in part, without the prior written
** permission of Silicon Graphics, Inc.
**
** RESTRICTED RIGHTS LEGEND:
** Use, duplication or disclosure by the Government is subject to restrictions
** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
** and Computer Software clause at DFARS 252.227-7013, and/or in similar or
** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
** rights reserved under the Copyright Laws of the United States.
*/
typedef unsigned int GLenum;
typedef unsigned char GLboolean;
typedef unsigned int GLbitfield;
typedef signed char GLbyte;
typedef short GLshort;
typedef int GLint;
typedef int GLsizei;
typedef unsigned char GLubyte;
typedef unsigned short GLushort;
typedef unsigned int GLuint;
typedef float GLfloat;
typedef float GLclampf;
typedef double GLdouble;
typedef double GLclampd;
typedef void GLvoid;
/*************************************************************/
/* Version */
#define GL_VERSION_1_1 1
/* AccumOp */
#define GL_ACCUM 0x0100
#define GL_LOAD 0x0101
#define GL_RETURN 0x0102
#define GL_MULT 0x0103
#define GL_ADD 0x0104
/* AlphaFunction */
#define GL_NEVER 0x0200
#define GL_LESS 0x0201
#define GL_EQUAL 0x0202
#define GL_LEQUAL 0x0203
#define GL_GREATER 0x0204
#define GL_NOTEQUAL 0x0205
#define GL_GEQUAL 0x0206
#define GL_ALWAYS 0x0207
/* AttribMask */
#define GL_CURRENT_BIT 0x00000001
#define GL_POINT_BIT 0x00000002
#define GL_LINE_BIT 0x00000004
#define GL_POLYGON_BIT 0x00000008
#define GL_POLYGON_STIPPLE_BIT 0x00000010
#define GL_PIXEL_MODE_BIT 0x00000020
#define GL_LIGHTING_BIT 0x00000040
#define GL_FOG_BIT 0x00000080
#define GL_DEPTH_BUFFER_BIT 0x00000100
#define GL_ACCUM_BUFFER_BIT 0x00000200
#define GL_STENCIL_BUFFER_BIT 0x00000400
#define GL_VIEWPORT_BIT 0x00000800
#define GL_TRANSFORM_BIT 0x00001000
#define GL_ENABLE_BIT 0x00002000
#define GL_COLOR_BUFFER_BIT 0x00004000
#define GL_HINT_BIT 0x00008000
#define GL_EVAL_BIT 0x00010000
#define GL_LIST_BIT 0x00020000
#define GL_TEXTURE_BIT 0x00040000
#define GL_SCISSOR_BIT 0x00080000
#define GL_ALL_ATTRIB_BITS 0x000fffff
/* BeginMode */
#define GL_POINTS 0x0000
#define GL_LINES 0x0001
#define GL_LINE_LOOP 0x0002
#define GL_LINE_STRIP 0x0003
#define GL_TRIANGLES 0x0004
#define GL_TRIANGLE_STRIP 0x0005
#define GL_TRIANGLE_FAN 0x0006
#define GL_QUADS 0x0007
#define GL_QUAD_STRIP 0x0008
#define GL_POLYGON 0x0009
/* BlendingFactorDest */
#define GL_ZERO 0
#define GL_ONE 1
#define GL_SRC_COLOR 0x0300
#define GL_ONE_MINUS_SRC_COLOR 0x0301
#define GL_SRC_ALPHA 0x0302
#define GL_ONE_MINUS_SRC_ALPHA 0x0303
#define GL_DST_ALPHA 0x0304
#define GL_ONE_MINUS_DST_ALPHA 0x0305
/* BlendingFactorSrc */
/* GL_ZERO */
/* GL_ONE */
#define GL_DST_COLOR 0x0306
#define GL_ONE_MINUS_DST_COLOR 0x0307
#define GL_SRC_ALPHA_SATURATE 0x0308
/* GL_SRC_ALPHA */
/* GL_ONE_MINUS_SRC_ALPHA */
/* GL_DST_ALPHA */
/* GL_ONE_MINUS_DST_ALPHA */
/* Boolean */
#define GL_TRUE 1
#define GL_FALSE 0
/* ClearBufferMask */
/* GL_COLOR_BUFFER_BIT */
/* GL_ACCUM_BUFFER_BIT */
/* GL_STENCIL_BUFFER_BIT */
/* GL_DEPTH_BUFFER_BIT */
/* ClientArrayType */
/* GL_VERTEX_ARRAY */
/* GL_NORMAL_ARRAY */
/* GL_COLOR_ARRAY */
/* GL_INDEX_ARRAY */
/* GL_TEXTURE_COORD_ARRAY */
/* GL_EDGE_FLAG_ARRAY */
/* ClipPlaneName */
#define GL_CLIP_PLANE0 0x3000
#define GL_CLIP_PLANE1 0x3001
#define GL_CLIP_PLANE2 0x3002
#define GL_CLIP_PLANE3 0x3003
#define GL_CLIP_PLANE4 0x3004
#define GL_CLIP_PLANE5 0x3005
/* ColorMaterialFace */
/* GL_FRONT */
/* GL_BACK */
/* GL_FRONT_AND_BACK */
/* ColorMaterialParameter */
/* GL_AMBIENT */
/* GL_DIFFUSE */
/* GL_SPECULAR */
/* GL_EMISSION */
/* GL_AMBIENT_AND_DIFFUSE */
/* ColorPointerType */
/* GL_BYTE */
/* GL_UNSIGNED_BYTE */
/* GL_SHORT */
/* GL_UNSIGNED_SHORT */
/* GL_INT */
/* GL_UNSIGNED_INT */
/* GL_FLOAT */
/* GL_DOUBLE */
/* CullFaceMode */
/* GL_FRONT */
/* GL_BACK */
/* GL_FRONT_AND_BACK */
/* DataType */
#define GL_BYTE 0x1400
#define GL_UNSIGNED_BYTE 0x1401
#define GL_SHORT 0x1402
#define GL_UNSIGNED_SHORT 0x1403
#define GL_INT 0x1404
#define GL_UNSIGNED_INT 0x1405
#define GL_FLOAT 0x1406
#define GL_2_BYTES 0x1407
#define GL_3_BYTES 0x1408
#define GL_4_BYTES 0x1409
#define GL_DOUBLE 0x140A
/* DepthFunction */
/* GL_NEVER */
/* GL_LESS */
/* GL_EQUAL */
/* GL_LEQUAL */
/* GL_GREATER */
/* GL_NOTEQUAL */
/* GL_GEQUAL */
/* GL_ALWAYS */
/* DrawBufferMode */
#define GL_NONE 0
#define GL_FRONT_LEFT 0x0400
#define GL_FRONT_RIGHT 0x0401
#define GL_BACK_LEFT 0x0402
#define GL_BACK_RIGHT 0x0403
#define GL_FRONT 0x0404
#define GL_BACK 0x0405
#define GL_LEFT 0x0406
#define GL_RIGHT 0x0407
#define GL_FRONT_AND_BACK 0x0408
#define GL_AUX0 0x0409
#define GL_AUX1 0x040A
#define GL_AUX2 0x040B
#define GL_AUX3 0x040C
/* Enable */
/* GL_FOG */
/* GL_LIGHTING */
/* GL_TEXTURE_1D */
/* GL_TEXTURE_2D */
/* GL_LINE_STIPPLE */
/* GL_POLYGON_STIPPLE */
/* GL_CULL_FACE */
/* GL_ALPHA_TEST */
/* GL_BLEND */
/* GL_INDEX_LOGIC_OP */
/* GL_COLOR_LOGIC_OP */
/* GL_DITHER */
/* GL_STENCIL_TEST */
/* GL_DEPTH_TEST */
/* GL_CLIP_PLANE0 */
/* GL_CLIP_PLANE1 */
/* GL_CLIP_PLANE2 */
/* GL_CLIP_PLANE3 */
/* GL_CLIP_PLANE4 */
/* GL_CLIP_PLANE5 */
/* GL_LIGHT0 */
/* GL_LIGHT1 */
/* GL_LIGHT2 */
/* GL_LIGHT3 */
/* GL_LIGHT4 */
/* GL_LIGHT5 */
/* GL_LIGHT6 */
/* GL_LIGHT7 */
/* GL_TEXTURE_GEN_S */
/* GL_TEXTURE_GEN_T */
/* GL_TEXTURE_GEN_R */
/* GL_TEXTURE_GEN_Q */
/* GL_MAP1_VERTEX_3 */
/* GL_MAP1_VERTEX_4 */
/* GL_MAP1_COLOR_4 */
/* GL_MAP1_INDEX */
/* GL_MAP1_NORMAL */
/* GL_MAP1_TEXTURE_COORD_1 */
/* GL_MAP1_TEXTURE_COORD_2 */
/* GL_MAP1_TEXTURE_COORD_3 */
/* GL_MAP1_TEXTURE_COORD_4 */
/* GL_MAP2_VERTEX_3 */
/* GL_MAP2_VERTEX_4 */
/* GL_MAP2_COLOR_4 */
/* GL_MAP2_INDEX */
/* GL_MAP2_NORMAL */
/* GL_MAP2_TEXTURE_COORD_1 */
/* GL_MAP2_TEXTURE_COORD_2 */
/* GL_MAP2_TEXTURE_COORD_3 */
/* GL_MAP2_TEXTURE_COORD_4 */
/* GL_POINT_SMOOTH */
/* GL_LINE_SMOOTH */
/* GL_POLYGON_SMOOTH */
/* GL_SCISSOR_TEST */
/* GL_COLOR_MATERIAL */
/* GL_NORMALIZE */
/* GL_AUTO_NORMAL */
/* GL_VERTEX_ARRAY */
/* GL_NORMAL_ARRAY */
/* GL_COLOR_ARRAY */
/* GL_INDEX_ARRAY */
/* GL_TEXTURE_COORD_ARRAY */
/* GL_EDGE_FLAG_ARRAY */
/* GL_POLYGON_OFFSET_POINT */
/* GL_POLYGON_OFFSET_LINE */
/* GL_POLYGON_OFFSET_FILL */
/* ErrorCode */
#define GL_NO_ERROR 0
#define GL_INVALID_ENUM 0x0500
#define GL_INVALID_VALUE 0x0501
#define GL_INVALID_OPERATION 0x0502
#define GL_STACK_OVERFLOW 0x0503
#define GL_STACK_UNDERFLOW 0x0504
#define GL_OUT_OF_MEMORY 0x0505
/* FeedBackMode */
#define GL_2D 0x0600
#define GL_3D 0x0601
#define GL_3D_COLOR 0x0602
#define GL_3D_COLOR_TEXTURE 0x0603
#define GL_4D_COLOR_TEXTURE 0x0604
/* FeedBackToken */
#define GL_PASS_THROUGH_TOKEN 0x0700
#define GL_POINT_TOKEN 0x0701
#define GL_LINE_TOKEN 0x0702
#define GL_POLYGON_TOKEN 0x0703
#define GL_BITMAP_TOKEN 0x0704
#define GL_DRAW_PIXEL_TOKEN 0x0705
#define GL_COPY_PIXEL_TOKEN 0x0706
#define GL_LINE_RESET_TOKEN 0x0707
/* FogMode */
/* GL_LINEAR */
#define GL_EXP 0x0800
#define GL_EXP2 0x0801
/* FogParameter */
/* GL_FOG_COLOR */
/* GL_FOG_DENSITY */
/* GL_FOG_END */
/* GL_FOG_INDEX */
/* GL_FOG_MODE */
/* GL_FOG_START */
/* FrontFaceDirection */
#define GL_CW 0x0900
#define GL_CCW 0x0901
/* GetMapTarget */
#define GL_COEFF 0x0A00
#define GL_ORDER 0x0A01
#define GL_DOMAIN 0x0A02
/* GetPixelMap */
/* GL_PIXEL_MAP_I_TO_I */
/* GL_PIXEL_MAP_S_TO_S */
/* GL_PIXEL_MAP_I_TO_R */
/* GL_PIXEL_MAP_I_TO_G */
/* GL_PIXEL_MAP_I_TO_B */
/* GL_PIXEL_MAP_I_TO_A */
/* GL_PIXEL_MAP_R_TO_R */
/* GL_PIXEL_MAP_G_TO_G */
/* GL_PIXEL_MAP_B_TO_B */
/* GL_PIXEL_MAP_A_TO_A */
/* GetPointerTarget */
/* GL_VERTEX_ARRAY_POINTER */
/* GL_NORMAL_ARRAY_POINTER */
/* GL_COLOR_ARRAY_POINTER */
/* GL_INDEX_ARRAY_POINTER */
/* GL_TEXTURE_COORD_ARRAY_POINTER */
/* GL_EDGE_FLAG_ARRAY_POINTER */
/* GetTarget */
#define GL_CURRENT_COLOR 0x0B00
#define GL_CURRENT_INDEX 0x0B01
#define GL_CURRENT_NORMAL 0x0B02
#define GL_CURRENT_TEXTURE_COORDS 0x0B03
#define GL_CURRENT_RASTER_COLOR 0x0B04
#define GL_CURRENT_RASTER_INDEX 0x0B05
#define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06
#define GL_CURRENT_RASTER_POSITION 0x0B07
#define GL_CURRENT_RASTER_POSITION_VALID 0x0B08
#define GL_CURRENT_RASTER_DISTANCE 0x0B09
#define GL_POINT_SMOOTH 0x0B10
#define GL_POINT_SIZE 0x0B11
#define GL_POINT_SIZE_RANGE 0x0B12
#define GL_POINT_SIZE_GRANULARITY 0x0B13
#define GL_LINE_SMOOTH 0x0B20
#define GL_LINE_WIDTH 0x0B21
#define GL_LINE_WIDTH_RANGE 0x0B22
#define GL_LINE_WIDTH_GRANULARITY 0x0B23
#define GL_LINE_STIPPLE 0x0B24
#define GL_LINE_STIPPLE_PATTERN 0x0B25
#define GL_LINE_STIPPLE_REPEAT 0x0B26
#define GL_LIST_MODE 0x0B30
#define GL_MAX_LIST_NESTING 0x0B31
#define GL_LIST_BASE 0x0B32
#define GL_LIST_INDEX 0x0B33
#define GL_POLYGON_MODE 0x0B40
#define GL_POLYGON_SMOOTH 0x0B41
#define GL_POLYGON_STIPPLE 0x0B42
#define GL_EDGE_FLAG 0x0B43
#define GL_CULL_FACE 0x0B44
#define GL_CULL_FACE_MODE 0x0B45
#define GL_FRONT_FACE 0x0B46
#define GL_LIGHTING 0x0B50
#define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51
#define GL_LIGHT_MODEL_TWO_SIDE 0x0B52
#define GL_LIGHT_MODEL_AMBIENT 0x0B53
#define GL_SHADE_MODEL 0x0B54
#define GL_COLOR_MATERIAL_FACE 0x0B55
#define GL_COLOR_MATERIAL_PARAMETER 0x0B56
#define GL_COLOR_MATERIAL 0x0B57
#define GL_FOG 0x0B60
#define GL_FOG_INDEX 0x0B61
#define GL_FOG_DENSITY 0x0B62
#define GL_FOG_START 0x0B63
#define GL_FOG_END 0x0B64
#define GL_FOG_MODE 0x0B65
#define GL_FOG_COLOR 0x0B66
#define GL_DEPTH_RANGE 0x0B70
#define GL_DEPTH_TEST 0x0B71
#define GL_DEPTH_WRITEMASK 0x0B72
#define GL_DEPTH_CLEAR_VALUE 0x0B73
#define GL_DEPTH_FUNC 0x0B74
#define GL_ACCUM_CLEAR_VALUE 0x0B80
#define GL_STENCIL_TEST 0x0B90
#define GL_STENCIL_CLEAR_VALUE 0x0B91
#define GL_STENCIL_FUNC 0x0B92
#define GL_STENCIL_VALUE_MASK 0x0B93
#define GL_STENCIL_FAIL 0x0B94
#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
#define GL_STENCIL_REF 0x0B97
#define GL_STENCIL_WRITEMASK 0x0B98
#define GL_MATRIX_MODE 0x0BA0
#define GL_NORMALIZE 0x0BA1
#define GL_VIEWPORT 0x0BA2
#define GL_MODELVIEW_STACK_DEPTH 0x0BA3
#define GL_PROJECTION_STACK_DEPTH 0x0BA4
#define GL_TEXTURE_STACK_DEPTH 0x0BA5
#define GL_MODELVIEW_MATRIX 0x0BA6
#define GL_PROJECTION_MATRIX 0x0BA7
#define GL_TEXTURE_MATRIX 0x0BA8
#define GL_ATTRIB_STACK_DEPTH 0x0BB0
#define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1
#define GL_ALPHA_TEST 0x0BC0
#define GL_ALPHA_TEST_FUNC 0x0BC1
#define GL_ALPHA_TEST_REF 0x0BC2
#define GL_DITHER 0x0BD0
#define GL_BLEND_DST 0x0BE0
#define GL_BLEND_SRC 0x0BE1
#define GL_BLEND 0x0BE2
#define GL_LOGIC_OP_MODE 0x0BF0
#define GL_INDEX_LOGIC_OP 0x0BF1
#define GL_COLOR_LOGIC_OP 0x0BF2
#define GL_AUX_BUFFERS 0x0C00
#define GL_DRAW_BUFFER 0x0C01
#define GL_READ_BUFFER 0x0C02
#define GL_SCISSOR_BOX 0x0C10
#define GL_SCISSOR_TEST 0x0C11
#define GL_INDEX_CLEAR_VALUE 0x0C20
#define GL_INDEX_WRITEMASK 0x0C21
#define GL_COLOR_CLEAR_VALUE 0x0C22
#define GL_COLOR_WRITEMASK 0x0C23
#define GL_INDEX_MODE 0x0C30
#define GL_RGBA_MODE 0x0C31
#define GL_DOUBLEBUFFER 0x0C32
#define GL_STEREO 0x0C33
#define GL_RENDER_MODE 0x0C40
#define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50
#define GL_POINT_SMOOTH_HINT 0x0C51
#define GL_LINE_SMOOTH_HINT 0x0C52
#define GL_POLYGON_SMOOTH_HINT 0x0C53
#define GL_FOG_HINT 0x0C54
#define GL_TEXTURE_GEN_S 0x0C60
#define GL_TEXTURE_GEN_T 0x0C61
#define GL_TEXTURE_GEN_R 0x0C62
#define GL_TEXTURE_GEN_Q 0x0C63
#define GL_PIXEL_MAP_I_TO_I 0x0C70
#define GL_PIXEL_MAP_S_TO_S 0x0C71
#define GL_PIXEL_MAP_I_TO_R 0x0C72
#define GL_PIXEL_MAP_I_TO_G 0x0C73
#define GL_PIXEL_MAP_I_TO_B 0x0C74
#define GL_PIXEL_MAP_I_TO_A 0x0C75
#define GL_PIXEL_MAP_R_TO_R 0x0C76
#define GL_PIXEL_MAP_G_TO_G 0x0C77
#define GL_PIXEL_MAP_B_TO_B 0x0C78
#define GL_PIXEL_MAP_A_TO_A 0x0C79
#define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0
#define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1
#define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2
#define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3
#define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4
#define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5
#define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6
#define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7
#define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8
#define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9
#define GL_UNPACK_SWAP_BYTES 0x0CF0
#define GL_UNPACK_LSB_FIRST 0x0CF1
#define GL_UNPACK_ROW_LENGTH 0x0CF2
#define GL_UNPACK_SKIP_ROWS 0x0CF3
#define GL_UNPACK_SKIP_PIXELS 0x0CF4
#define GL_UNPACK_ALIGNMENT 0x0CF5
#define GL_PACK_SWAP_BYTES 0x0D00
#define GL_PACK_LSB_FIRST 0x0D01
#define GL_PACK_ROW_LENGTH 0x0D02
#define GL_PACK_SKIP_ROWS 0x0D03
#define GL_PACK_SKIP_PIXELS 0x0D04
#define GL_PACK_ALIGNMENT 0x0D05
#define GL_MAP_COLOR 0x0D10
#define GL_MAP_STENCIL 0x0D11
#define GL_INDEX_SHIFT 0x0D12
#define GL_INDEX_OFFSET 0x0D13
#define GL_RED_SCALE 0x0D14
#define GL_RED_BIAS 0x0D15
#define GL_ZOOM_X 0x0D16
#define GL_ZOOM_Y 0x0D17
#define GL_GREEN_SCALE 0x0D18
#define GL_GREEN_BIAS 0x0D19
#define GL_BLUE_SCALE 0x0D1A
#define GL_BLUE_BIAS 0x0D1B
#define GL_ALPHA_SCALE 0x0D1C
#define GL_ALPHA_BIAS 0x0D1D
#define GL_DEPTH_SCALE 0x0D1E
#define GL_DEPTH_BIAS 0x0D1F
#define GL_MAX_EVAL_ORDER 0x0D30
#define GL_MAX_LIGHTS 0x0D31
#define GL_MAX_CLIP_PLANES 0x0D32
#define GL_MAX_TEXTURE_SIZE 0x0D33
#define GL_MAX_PIXEL_MAP_TABLE 0x0D34
#define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35
#define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36
#define GL_MAX_NAME_STACK_DEPTH 0x0D37
#define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38
#define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39
#define GL_MAX_VIEWPORT_DIMS 0x0D3A
#define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B
#define GL_SUBPIXEL_BITS 0x0D50
#define GL_INDEX_BITS 0x0D51
#define GL_RED_BITS 0x0D52
#define GL_GREEN_BITS 0x0D53
#define GL_BLUE_BITS 0x0D54
#define GL_ALPHA_BITS 0x0D55
#define GL_DEPTH_BITS 0x0D56
#define GL_STENCIL_BITS 0x0D57
#define GL_ACCUM_RED_BITS 0x0D58
#define GL_ACCUM_GREEN_BITS 0x0D59
#define GL_ACCUM_BLUE_BITS 0x0D5A
#define GL_ACCUM_ALPHA_BITS 0x0D5B
#define GL_NAME_STACK_DEPTH 0x0D70
#define GL_AUTO_NORMAL 0x0D80
#define GL_MAP1_COLOR_4 0x0D90
#define GL_MAP1_INDEX 0x0D91
#define GL_MAP1_NORMAL 0x0D92
#define GL_MAP1_TEXTURE_COORD_1 0x0D93
#define GL_MAP1_TEXTURE_COORD_2 0x0D94
#define GL_MAP1_TEXTURE_COORD_3 0x0D95
#define GL_MAP1_TEXTURE_COORD_4 0x0D96
#define GL_MAP1_VERTEX_3 0x0D97
#define GL_MAP1_VERTEX_4 0x0D98
#define GL_MAP2_COLOR_4 0x0DB0
#define GL_MAP2_INDEX 0x0DB1
#define GL_MAP2_NORMAL 0x0DB2
#define GL_MAP2_TEXTURE_COORD_1 0x0DB3
#define GL_MAP2_TEXTURE_COORD_2 0x0DB4
#define GL_MAP2_TEXTURE_COORD_3 0x0DB5
#define GL_MAP2_TEXTURE_COORD_4 0x0DB6
#define GL_MAP2_VERTEX_3 0x0DB7
#define GL_MAP2_VERTEX_4 0x0DB8
#define GL_MAP1_GRID_DOMAIN 0x0DD0
#define GL_MAP1_GRID_SEGMENTS 0x0DD1
#define GL_MAP2_GRID_DOMAIN 0x0DD2
#define GL_MAP2_GRID_SEGMENTS 0x0DD3
#define GL_TEXTURE_1D 0x0DE0
#define GL_TEXTURE_2D 0x0DE1
#define GL_FEEDBACK_BUFFER_POINTER 0x0DF0
#define GL_FEEDBACK_BUFFER_SIZE 0x0DF1
#define GL_FEEDBACK_BUFFER_TYPE 0x0DF2
#define GL_SELECTION_BUFFER_POINTER 0x0DF3
#define GL_SELECTION_BUFFER_SIZE 0x0DF4
/* GL_TEXTURE_BINDING_1D */
/* GL_TEXTURE_BINDING_2D */
/* GL_VERTEX_ARRAY */
/* GL_NORMAL_ARRAY */
/* GL_COLOR_ARRAY */
/* GL_INDEX_ARRAY */
/* GL_TEXTURE_COORD_ARRAY */
/* GL_EDGE_FLAG_ARRAY */
/* GL_VERTEX_ARRAY_SIZE */
/* GL_VERTEX_ARRAY_TYPE */
/* GL_VERTEX_ARRAY_STRIDE */
/* GL_NORMAL_ARRAY_TYPE */
/* GL_NORMAL_ARRAY_STRIDE */
/* GL_COLOR_ARRAY_SIZE */
/* GL_COLOR_ARRAY_TYPE */
/* GL_COLOR_ARRAY_STRIDE */
/* GL_INDEX_ARRAY_TYPE */
/* GL_INDEX_ARRAY_STRIDE */
/* GL_TEXTURE_COORD_ARRAY_SIZE */
/* GL_TEXTURE_COORD_ARRAY_TYPE */
/* GL_TEXTURE_COORD_ARRAY_STRIDE */
/* GL_EDGE_FLAG_ARRAY_STRIDE */
/* GL_POLYGON_OFFSET_FACTOR */
/* GL_POLYGON_OFFSET_UNITS */
/* GetTextureParameter */
/* GL_TEXTURE_MAG_FILTER */
/* GL_TEXTURE_MIN_FILTER */
/* GL_TEXTURE_WRAP_S */
/* GL_TEXTURE_WRAP_T */
#define GL_TEXTURE_WIDTH 0x1000
#define GL_TEXTURE_HEIGHT 0x1001
#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
#define GL_TEXTURE_BORDER_COLOR 0x1004
#define GL_TEXTURE_BORDER 0x1005
/* GL_TEXTURE_RED_SIZE */
/* GL_TEXTURE_GREEN_SIZE */
/* GL_TEXTURE_BLUE_SIZE */
/* GL_TEXTURE_ALPHA_SIZE */
/* GL_TEXTURE_LUMINANCE_SIZE */
/* GL_TEXTURE_INTENSITY_SIZE */
/* GL_TEXTURE_PRIORITY */
/* GL_TEXTURE_RESIDENT */
/* HintMode */
#define GL_DONT_CARE 0x1100
#define GL_FASTEST 0x1101
#define GL_NICEST 0x1102
/* HintTarget */
/* GL_PERSPECTIVE_CORRECTION_HINT */
/* GL_POINT_SMOOTH_HINT */
/* GL_LINE_SMOOTH_HINT */
/* GL_POLYGON_SMOOTH_HINT */
/* GL_FOG_HINT */
/* GL_PHONG_HINT */
/* IndexPointerType */
/* GL_SHORT */
/* GL_INT */
/* GL_FLOAT */
/* GL_DOUBLE */
/* LightModelParameter */
/* GL_LIGHT_MODEL_AMBIENT */
/* GL_LIGHT_MODEL_LOCAL_VIEWER */
/* GL_LIGHT_MODEL_TWO_SIDE */
/* LightName */
#define GL_LIGHT0 0x4000
#define GL_LIGHT1 0x4001
#define GL_LIGHT2 0x4002
#define GL_LIGHT3 0x4003
#define GL_LIGHT4 0x4004
#define GL_LIGHT5 0x4005
#define GL_LIGHT6 0x4006
#define GL_LIGHT7 0x4007
/* LightParameter */
#define GL_AMBIENT 0x1200
#define GL_DIFFUSE 0x1201
#define GL_SPECULAR 0x1202
#define GL_POSITION 0x1203
#define GL_SPOT_DIRECTION 0x1204
#define GL_SPOT_EXPONENT 0x1205
#define GL_SPOT_CUTOFF 0x1206
#define GL_CONSTANT_ATTENUATION 0x1207
#define GL_LINEAR_ATTENUATION 0x1208
#define GL_QUADRATIC_ATTENUATION 0x1209
/* InterleavedArrays */
/* GL_V2F */
/* GL_V3F */
/* GL_C4UB_V2F */
/* GL_C4UB_V3F */
/* GL_C3F_V3F */
/* GL_N3F_V3F */
/* GL_C4F_N3F_V3F */
/* GL_T2F_V3F */
/* GL_T4F_V4F */
/* GL_T2F_C4UB_V3F */
/* GL_T2F_C3F_V3F */
/* GL_T2F_N3F_V3F */
/* GL_T2F_C4F_N3F_V3F */
/* GL_T4F_C4F_N3F_V4F */
/* ListMode */
#define GL_COMPILE 0x1300
#define GL_COMPILE_AND_EXECUTE 0x1301
/* ListNameType */
/* GL_BYTE */
/* GL_UNSIGNED_BYTE */
/* GL_SHORT */
/* GL_UNSIGNED_SHORT */
/* GL_INT */
/* GL_UNSIGNED_INT */
/* GL_FLOAT */
/* GL_2_BYTES */
/* GL_3_BYTES */
/* GL_4_BYTES */
/* LogicOp */
#define GL_CLEAR 0x1500
#define GL_AND 0x1501
#define GL_AND_REVERSE 0x1502
#define GL_COPY 0x1503
#define GL_AND_INVERTED 0x1504
#define GL_NOOP 0x1505
#define GL_XOR 0x1506
#define GL_OR 0x1507
#define GL_NOR 0x1508
#define GL_EQUIV 0x1509
#define GL_INVERT 0x150A
#define GL_OR_REVERSE 0x150B
#define GL_COPY_INVERTED 0x150C
#define GL_OR_INVERTED 0x150D
#define GL_NAND 0x150E
#define GL_SET 0x150F
/* MapTarget */
/* GL_MAP1_COLOR_4 */
/* GL_MAP1_INDEX */
/* GL_MAP1_NORMAL */
/* GL_MAP1_TEXTURE_COORD_1 */
/* GL_MAP1_TEXTURE_COORD_2 */
/* GL_MAP1_TEXTURE_COORD_3 */
/* GL_MAP1_TEXTURE_COORD_4 */
/* GL_MAP1_VERTEX_3 */
/* GL_MAP1_VERTEX_4 */
/* GL_MAP2_COLOR_4 */
/* GL_MAP2_INDEX */
/* GL_MAP2_NORMAL */
/* GL_MAP2_TEXTURE_COORD_1 */
/* GL_MAP2_TEXTURE_COORD_2 */
/* GL_MAP2_TEXTURE_COORD_3 */
/* GL_MAP2_TEXTURE_COORD_4 */
/* GL_MAP2_VERTEX_3 */
/* GL_MAP2_VERTEX_4 */
/* MaterialFace */
/* GL_FRONT */
/* GL_BACK */
/* GL_FRONT_AND_BACK */
/* MaterialParameter */
#define GL_EMISSION 0x1600
#define GL_SHININESS 0x1601
#define GL_AMBIENT_AND_DIFFUSE 0x1602
#define GL_COLOR_INDEXES 0x1603
/* GL_AMBIENT */
/* GL_DIFFUSE */
/* GL_SPECULAR */
/* MatrixMode */
#define GL_MODELVIEW 0x1700
#define GL_PROJECTION 0x1701
#define GL_TEXTURE 0x1702
/* MeshMode1 */
/* GL_POINT */
/* GL_LINE */
/* MeshMode2 */
/* GL_POINT */
/* GL_LINE */
/* GL_FILL */
/* NormalPointerType */
/* GL_BYTE */
/* GL_SHORT */
/* GL_INT */
/* GL_FLOAT */
/* GL_DOUBLE */
/* PixelCopyType */
#define GL_COLOR 0x1800
#define GL_DEPTH 0x1801
#define GL_STENCIL 0x1802
/* PixelFormat */
#define GL_COLOR_INDEX 0x1900
#define GL_STENCIL_INDEX 0x1901
#define GL_DEPTH_COMPONENT 0x1902
#define GL_RED 0x1903
#define GL_GREEN 0x1904
#define GL_BLUE 0x1905
#define GL_ALPHA 0x1906
#define GL_RGB 0x1907
#define GL_RGBA 0x1908
#define GL_LUMINANCE 0x1909
#define GL_LUMINANCE_ALPHA 0x190A
/* PixelMap */
/* GL_PIXEL_MAP_I_TO_I */
/* GL_PIXEL_MAP_S_TO_S */
/* GL_PIXEL_MAP_I_TO_R */
/* GL_PIXEL_MAP_I_TO_G */
/* GL_PIXEL_MAP_I_TO_B */
/* GL_PIXEL_MAP_I_TO_A */
/* GL_PIXEL_MAP_R_TO_R */
/* GL_PIXEL_MAP_G_TO_G */
/* GL_PIXEL_MAP_B_TO_B */
/* GL_PIXEL_MAP_A_TO_A */
/* PixelStore */
/* GL_UNPACK_SWAP_BYTES */
/* GL_UNPACK_LSB_FIRST */
/* GL_UNPACK_ROW_LENGTH */
/* GL_UNPACK_SKIP_ROWS */
/* GL_UNPACK_SKIP_PIXELS */
/* GL_UNPACK_ALIGNMENT */
/* GL_PACK_SWAP_BYTES */
/* GL_PACK_LSB_FIRST */
/* GL_PACK_ROW_LENGTH */
/* GL_PACK_SKIP_ROWS */
/* GL_PACK_SKIP_PIXELS */
/* GL_PACK_ALIGNMENT */
/* PixelTransfer */
/* GL_MAP_COLOR */
/* GL_MAP_STENCIL */
/* GL_INDEX_SHIFT */
/* GL_INDEX_OFFSET */
/* GL_RED_SCALE */
/* GL_RED_BIAS */
/* GL_GREEN_SCALE */
/* GL_GREEN_BIAS */
/* GL_BLUE_SCALE */
/* GL_BLUE_BIAS */
/* GL_ALPHA_SCALE */
/* GL_ALPHA_BIAS */
/* GL_DEPTH_SCALE */
/* GL_DEPTH_BIAS */
/* PixelType */
#define GL_BITMAP 0x1A00
/* GL_BYTE */
/* GL_UNSIGNED_BYTE */
/* GL_SHORT */
/* GL_UNSIGNED_SHORT */
/* GL_INT */
/* GL_UNSIGNED_INT */
/* GL_FLOAT */
/* PolygonMode */
#define GL_POINT 0x1B00
#define GL_LINE 0x1B01
#define GL_FILL 0x1B02
/* ReadBufferMode */
/* GL_FRONT_LEFT */
/* GL_FRONT_RIGHT */
/* GL_BACK_LEFT */
/* GL_BACK_RIGHT */
/* GL_FRONT */
/* GL_BACK */
/* GL_LEFT */
/* GL_RIGHT */
/* GL_AUX0 */
/* GL_AUX1 */
/* GL_AUX2 */
/* GL_AUX3 */
/* RenderingMode */
#define GL_RENDER 0x1C00
#define GL_FEEDBACK 0x1C01
#define GL_SELECT 0x1C02
/* ShadingModel */
#define GL_FLAT 0x1D00
#define GL_SMOOTH 0x1D01
/* StencilFunction */
/* GL_NEVER */
/* GL_LESS */
/* GL_EQUAL */
/* GL_LEQUAL */
/* GL_GREATER */
/* GL_NOTEQUAL */
/* GL_GEQUAL */
/* GL_ALWAYS */
/* StencilOp */
/* GL_ZERO */
#define GL_KEEP 0x1E00
#define GL_REPLACE 0x1E01
#define GL_INCR 0x1E02
#define GL_DECR 0x1E03
/* GL_INVERT */
/* StringName */
#define GL_VENDOR 0x1F00
#define GL_RENDERER 0x1F01
#define GL_VERSION 0x1F02
#define GL_EXTENSIONS 0x1F03
/* TextureCoordName */
#define GL_S 0x2000
#define GL_T 0x2001
#define GL_R 0x2002
#define GL_Q 0x2003
/* TexCoordPointerType */
/* GL_SHORT */
/* GL_INT */
/* GL_FLOAT */
/* GL_DOUBLE */
/* TextureEnvMode */
#define GL_MODULATE 0x2100
#define GL_DECAL 0x2101
/* GL_BLEND */
/* GL_REPLACE */
/* TextureEnvParameter */
#define GL_TEXTURE_ENV_MODE 0x2200
#define GL_TEXTURE_ENV_COLOR 0x2201
/* TextureEnvTarget */
#define GL_TEXTURE_ENV 0x2300
/* TextureGenMode */
#define GL_EYE_LINEAR 0x2400
#define GL_OBJECT_LINEAR 0x2401
#define GL_SPHERE_MAP 0x2402
/* TextureGenParameter */
#define GL_TEXTURE_GEN_MODE 0x2500
#define GL_OBJECT_PLANE 0x2501
#define GL_EYE_PLANE 0x2502
/* TextureMagFilter */
#define GL_NEAREST 0x2600
#define GL_LINEAR 0x2601
/* TextureMinFilter */
/* GL_NEAREST */
/* GL_LINEAR */
#define GL_NEAREST_MIPMAP_NEAREST 0x2700
#define GL_LINEAR_MIPMAP_NEAREST 0x2701
#define GL_NEAREST_MIPMAP_LINEAR 0x2702
#define GL_LINEAR_MIPMAP_LINEAR 0x2703
/* TextureParameterName */
#define GL_TEXTURE_MAG_FILTER 0x2800
#define GL_TEXTURE_MIN_FILTER 0x2801
#define GL_TEXTURE_WRAP_S 0x2802
#define GL_TEXTURE_WRAP_T 0x2803
/* GL_TEXTURE_BORDER_COLOR */
/* GL_TEXTURE_PRIORITY */
/* TextureTarget */
/* GL_TEXTURE_1D */
/* GL_TEXTURE_2D */
/* GL_PROXY_TEXTURE_1D */
/* GL_PROXY_TEXTURE_2D */
/* TextureWrapMode */
#define GL_CLAMP 0x2900
#define GL_REPEAT 0x2901
/* VertexPointerType */
/* GL_SHORT */
/* GL_INT */
/* GL_FLOAT */
/* GL_DOUBLE */
/* ClientAttribMask */
#define GL_CLIENT_PIXEL_STORE_BIT 0x00000001
#define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002
#define GL_CLIENT_ALL_ATTRIB_BITS 0xffffffff
/* polygon_offset */
#define GL_POLYGON_OFFSET_FACTOR 0x8038
#define GL_POLYGON_OFFSET_UNITS 0x2A00
#define GL_POLYGON_OFFSET_POINT 0x2A01
#define GL_POLYGON_OFFSET_LINE 0x2A02
#define GL_POLYGON_OFFSET_FILL 0x8037
/* texture */
#define GL_ALPHA4 0x803B
#define GL_ALPHA8 0x803C
#define GL_ALPHA12 0x803D
#define GL_ALPHA16 0x803E
#define GL_LUMINANCE4 0x803F
#define GL_LUMINANCE8 0x8040
#define GL_LUMINANCE12 0x8041
#define GL_LUMINANCE16 0x8042
#define GL_LUMINANCE4_ALPHA4 0x8043
#define GL_LUMINANCE6_ALPHA2 0x8044
#define GL_LUMINANCE8_ALPHA8 0x8045
#define GL_LUMINANCE12_ALPHA4 0x8046
#define GL_LUMINANCE12_ALPHA12 0x8047
#define GL_LUMINANCE16_ALPHA16 0x8048
#define GL_INTENSITY 0x8049
#define GL_INTENSITY4 0x804A
#define GL_INTENSITY8 0x804B
#define GL_INTENSITY12 0x804C
#define GL_INTENSITY16 0x804D
#define GL_R3_G3_B2 0x2A10
#define GL_RGB4 0x804F
#define GL_RGB5 0x8050
#define GL_RGB8 0x8051
#define GL_RGB10 0x8052
#define GL_RGB12 0x8053
#define GL_RGB16 0x8054
#define GL_RGBA2 0x8055
#define GL_RGBA4 0x8056
#define GL_RGB5_A1 0x8057
#define GL_RGBA8 0x8058
#define GL_RGB10_A2 0x8059
#define GL_RGBA12 0x805A
#define GL_RGBA16 0x805B
#define GL_TEXTURE_RED_SIZE 0x805C
#define GL_TEXTURE_GREEN_SIZE 0x805D
#define GL_TEXTURE_BLUE_SIZE 0x805E
#define GL_TEXTURE_ALPHA_SIZE 0x805F
#define GL_TEXTURE_LUMINANCE_SIZE 0x8060
#define GL_TEXTURE_INTENSITY_SIZE 0x8061
#define GL_PROXY_TEXTURE_1D 0x8063
#define GL_PROXY_TEXTURE_2D 0x8064
/* texture_object */
#define GL_TEXTURE_PRIORITY 0x8066
#define GL_TEXTURE_RESIDENT 0x8067
#define GL_TEXTURE_BINDING_1D 0x8068
#define GL_TEXTURE_BINDING_2D 0x8069
/* vertex_array */
#define GL_VERTEX_ARRAY 0x8074
#define GL_NORMAL_ARRAY 0x8075
#define GL_COLOR_ARRAY 0x8076
#define GL_INDEX_ARRAY 0x8077
#define GL_TEXTURE_COORD_ARRAY 0x8078
#define GL_EDGE_FLAG_ARRAY 0x8079
#define GL_VERTEX_ARRAY_SIZE 0x807A
#define GL_VERTEX_ARRAY_TYPE 0x807B
#define GL_VERTEX_ARRAY_STRIDE 0x807C
#define GL_NORMAL_ARRAY_TYPE 0x807E
#define GL_NORMAL_ARRAY_STRIDE 0x807F
#define GL_COLOR_ARRAY_SIZE 0x8081
#define GL_COLOR_ARRAY_TYPE 0x8082
#define GL_COLOR_ARRAY_STRIDE 0x8083
#define GL_INDEX_ARRAY_TYPE 0x8085
#define GL_INDEX_ARRAY_STRIDE 0x8086
#define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088
#define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089
#define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A
#define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C
#define GL_VERTEX_ARRAY_POINTER 0x808E
#define GL_NORMAL_ARRAY_POINTER 0x808F
#define GL_COLOR_ARRAY_POINTER 0x8090
#define GL_INDEX_ARRAY_POINTER 0x8091
#define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092
#define GL_EDGE_FLAG_ARRAY_POINTER 0x8093
#define GL_V2F 0x2A20
#define GL_V3F 0x2A21
#define GL_C4UB_V2F 0x2A22
#define GL_C4UB_V3F 0x2A23
#define GL_C3F_V3F 0x2A24
#define GL_N3F_V3F 0x2A25
#define GL_C4F_N3F_V3F 0x2A26
#define GL_T2F_V3F 0x2A27
#define GL_T4F_V4F 0x2A28
#define GL_T2F_C4UB_V3F 0x2A29
#define GL_T2F_C3F_V3F 0x2A2A
#define GL_T2F_N3F_V3F 0x2A2B
#define GL_T2F_C4F_N3F_V3F 0x2A2C
#define GL_T4F_C4F_N3F_V4F 0x2A2D
/* Extensions */
#define GL_EXT_vertex_array 1
#define GL_EXT_bgra 1
#define GL_EXT_paletted_texture 1
#define GL_WIN_swap_hint 1
#define GL_WIN_draw_range_elements 1
// #define GL_WIN_phong_shading 1
// #define GL_WIN_specular_fog 1
/* EXT_vertex_array */
#define GL_VERTEX_ARRAY_EXT 0x8074
#define GL_NORMAL_ARRAY_EXT 0x8075
#define GL_COLOR_ARRAY_EXT 0x8076
#define GL_INDEX_ARRAY_EXT 0x8077
#define GL_TEXTURE_COORD_ARRAY_EXT 0x8078
#define GL_EDGE_FLAG_ARRAY_EXT 0x8079
#define GL_VERTEX_ARRAY_SIZE_EXT 0x807A
#define GL_VERTEX_ARRAY_TYPE_EXT 0x807B
#define GL_VERTEX_ARRAY_STRIDE_EXT 0x807C
#define GL_VERTEX_ARRAY_COUNT_EXT 0x807D
#define GL_NORMAL_ARRAY_TYPE_EXT 0x807E
#define GL_NORMAL_ARRAY_STRIDE_EXT 0x807F
#define GL_NORMAL_ARRAY_COUNT_EXT 0x8080
#define GL_COLOR_ARRAY_SIZE_EXT 0x8081
#define GL_COLOR_ARRAY_TYPE_EXT 0x8082
#define GL_COLOR_ARRAY_STRIDE_EXT 0x8083
#define GL_COLOR_ARRAY_COUNT_EXT 0x8084
#define GL_INDEX_ARRAY_TYPE_EXT 0x8085
#define GL_INDEX_ARRAY_STRIDE_EXT 0x8086
#define GL_INDEX_ARRAY_COUNT_EXT 0x8087
#define GL_TEXTURE_COORD_ARRAY_SIZE_EXT 0x8088
#define GL_TEXTURE_COORD_ARRAY_TYPE_EXT 0x8089
#define GL_TEXTURE_COORD_ARRAY_STRIDE_EXT 0x808A
#define GL_TEXTURE_COORD_ARRAY_COUNT_EXT 0x808B
#define GL_EDGE_FLAG_ARRAY_STRIDE_EXT 0x808C
#define GL_EDGE_FLAG_ARRAY_COUNT_EXT 0x808D
#define GL_VERTEX_ARRAY_POINTER_EXT 0x808E
#define GL_NORMAL_ARRAY_POINTER_EXT 0x808F
#define GL_COLOR_ARRAY_POINTER_EXT 0x8090
#define GL_INDEX_ARRAY_POINTER_EXT 0x8091
#define GL_TEXTURE_COORD_ARRAY_POINTER_EXT 0x8092
#define GL_EDGE_FLAG_ARRAY_POINTER_EXT 0x8093
#define GL_DOUBLE_EXT GL_DOUBLE
/* EXT_bgra */
#define GL_BGR_EXT 0x80E0
#define GL_BGRA_EXT 0x80E1
/* EXT_paletted_texture */
/* These must match the GL_COLOR_TABLE_*_SGI enumerants */
#define GL_COLOR_TABLE_FORMAT_EXT 0x80D8
#define GL_COLOR_TABLE_WIDTH_EXT 0x80D9
#define GL_COLOR_TABLE_RED_SIZE_EXT 0x80DA
#define GL_COLOR_TABLE_GREEN_SIZE_EXT 0x80DB
#define GL_COLOR_TABLE_BLUE_SIZE_EXT 0x80DC
#define GL_COLOR_TABLE_ALPHA_SIZE_EXT 0x80DD
#define GL_COLOR_TABLE_LUMINANCE_SIZE_EXT 0x80DE
#define GL_COLOR_TABLE_INTENSITY_SIZE_EXT 0x80DF
#define GL_COLOR_INDEX1_EXT 0x80E2
#define GL_COLOR_INDEX2_EXT 0x80E3
#define GL_COLOR_INDEX4_EXT 0x80E4
#define GL_COLOR_INDEX8_EXT 0x80E5
#define GL_COLOR_INDEX12_EXT 0x80E6
#define GL_COLOR_INDEX16_EXT 0x80E7
/* WIN_draw_range_elements */
#define GL_MAX_ELEMENTS_VERTICES_WIN 0x80E8
#define GL_MAX_ELEMENTS_INDICES_WIN 0x80E9
/* WIN_phong_shading */
#define GL_PHONG_WIN 0x80EA
#define GL_PHONG_HINT_WIN 0x80EB
/* WIN_specular_fog */
#define GL_FOG_SPECULAR_TEXTURE_WIN 0x80EC
/* For compatibility with OpenGL v1.0 */
#define GL_LOGIC_OP GL_INDEX_LOGIC_OP
#define GL_TEXTURE_COMPONENTS GL_TEXTURE_INTERNAL_FORMAT
/*************************************************************/
WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value);
WINGDIAPI void APIENTRY glAlphaFunc (GLenum func, GLclampf ref);
WINGDIAPI GLboolean APIENTRY glAreTexturesResident (GLsizei n, const GLuint *textures, GLboolean *residences);
WINGDIAPI void APIENTRY glArrayElement (GLint i);
WINGDIAPI void APIENTRY glBegin (GLenum mode);
WINGDIAPI void APIENTRY glBindTexture (GLenum target, GLuint texture);
WINGDIAPI void APIENTRY glBitmap (GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap);
WINGDIAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
WINGDIAPI void APIENTRY glCallList (GLuint list);
WINGDIAPI void APIENTRY glCallLists (GLsizei n, GLenum type, const GLvoid *lists);
WINGDIAPI void APIENTRY glClear (GLbitfield mask);
WINGDIAPI void APIENTRY glClearAccum (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
WINGDIAPI void APIENTRY glClearColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha);
WINGDIAPI void APIENTRY glClearDepth (GLclampd depth);
WINGDIAPI void APIENTRY glClearIndex (GLfloat c);
WINGDIAPI void APIENTRY glClearStencil (GLint s);
WINGDIAPI void APIENTRY glClipPlane (GLenum plane, const GLdouble *equation);
WINGDIAPI void APIENTRY glColor3b (GLbyte red, GLbyte green, GLbyte blue);
WINGDIAPI void APIENTRY glColor3bv (const GLbyte *v);
WINGDIAPI void APIENTRY glColor3d (GLdouble red, GLdouble green, GLdouble blue);
WINGDIAPI void APIENTRY glColor3dv (const GLdouble *v);
WINGDIAPI void APIENTRY glColor3f (GLfloat red, GLfloat green, GLfloat blue);
WINGDIAPI void APIENTRY glColor3fv (const GLfloat *v);
WINGDIAPI void APIENTRY glColor3i (GLint red, GLint green, GLint blue);
WINGDIAPI void APIENTRY glColor3iv (const GLint *v);
WINGDIAPI void APIENTRY glColor3s (GLshort red, GLshort green, GLshort blue);
WINGDIAPI void APIENTRY glColor3sv (const GLshort *v);
WINGDIAPI void APIENTRY glColor3ub (GLubyte red, GLubyte green, GLubyte blue);
WINGDIAPI void APIENTRY glColor3ubv (const GLubyte *v);
WINGDIAPI void APIENTRY glColor3ui (GLuint red, GLuint green, GLuint blue);
WINGDIAPI void APIENTRY glColor3uiv (const GLuint *v);
WINGDIAPI void APIENTRY glColor3us (GLushort red, GLushort green, GLushort blue);
WINGDIAPI void APIENTRY glColor3usv (const GLushort *v);
WINGDIAPI void APIENTRY glColor4b (GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha);
WINGDIAPI void APIENTRY glColor4bv (const GLbyte *v);
WINGDIAPI void APIENTRY glColor4d (GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha);
WINGDIAPI void APIENTRY glColor4dv (const GLdouble *v);
WINGDIAPI void APIENTRY glColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
WINGDIAPI void APIENTRY glColor4fv (const GLfloat *v);
WINGDIAPI void APIENTRY glColor4i (GLint red, GLint green, GLint blue, GLint alpha);
WINGDIAPI void APIENTRY glColor4iv (const GLint *v);
WINGDIAPI void APIENTRY glColor4s (GLshort red, GLshort green, GLshort blue, GLshort alpha);
WINGDIAPI void APIENTRY glColor4sv (const GLshort *v);
WINGDIAPI void APIENTRY glColor4ub (GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha);
WINGDIAPI void APIENTRY glColor4ubv (const GLubyte *v);
WINGDIAPI void APIENTRY glColor4ui (GLuint red, GLuint green, GLuint blue, GLuint alpha);
WINGDIAPI void APIENTRY glColor4uiv (const GLuint *v);
WINGDIAPI void APIENTRY glColor4us (GLushort red, GLushort green, GLushort blue, GLushort alpha);
WINGDIAPI void APIENTRY glColor4usv (const GLushort *v);
WINGDIAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
WINGDIAPI void APIENTRY glColorMaterial (GLenum face, GLenum mode);
WINGDIAPI void APIENTRY glColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
WINGDIAPI void APIENTRY glCopyPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum type);
WINGDIAPI void APIENTRY glCopyTexImage1D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border);
WINGDIAPI void APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
WINGDIAPI void APIENTRY glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
WINGDIAPI void APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
WINGDIAPI void APIENTRY glCullFace (GLenum mode);
WINGDIAPI void APIENTRY glDeleteLists (GLuint list, GLsizei range);
WINGDIAPI void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
WINGDIAPI void APIENTRY glDepthFunc (GLenum func);
WINGDIAPI void APIENTRY glDepthMask (GLboolean flag);
WINGDIAPI void APIENTRY glDepthRange (GLclampd zNear, GLclampd zFar);
WINGDIAPI void APIENTRY glDisable (GLenum cap);
WINGDIAPI void APIENTRY glDisableClientState (GLenum array);
WINGDIAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
WINGDIAPI void APIENTRY glDrawBuffer (GLenum mode);
WINGDIAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
WINGDIAPI void APIENTRY glDrawPixels (GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
WINGDIAPI void APIENTRY glEdgeFlag (GLboolean flag);
WINGDIAPI void APIENTRY glEdgeFlagPointer (GLsizei stride, const GLvoid *pointer);
WINGDIAPI void APIENTRY glEdgeFlagv (const GLboolean *flag);
WINGDIAPI void APIENTRY glEnable (GLenum cap);
WINGDIAPI void APIENTRY glEnableClientState (GLenum array);
WINGDIAPI void APIENTRY glEnd (void);
WINGDIAPI void APIENTRY glEndList (void);
WINGDIAPI void APIENTRY glEvalCoord1d (GLdouble u);
WINGDIAPI void APIENTRY glEvalCoord1dv (const GLdouble *u);
WINGDIAPI void APIENTRY glEvalCoord1f (GLfloat u);
WINGDIAPI void APIENTRY glEvalCoord1fv (const GLfloat *u);
WINGDIAPI void APIENTRY glEvalCoord2d (GLdouble u, GLdouble v);
WINGDIAPI void APIENTRY glEvalCoord2dv (const GLdouble *u);
WINGDIAPI void APIENTRY glEvalCoord2f (GLfloat u, GLfloat v);
WINGDIAPI void APIENTRY glEvalCoord2fv (const GLfloat *u);
WINGDIAPI void APIENTRY glEvalMesh1 (GLenum mode, GLint i1, GLint i2);
WINGDIAPI void APIENTRY glEvalMesh2 (GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2);
WINGDIAPI void APIENTRY glEvalPoint1 (GLint i);
WINGDIAPI void APIENTRY glEvalPoint2 (GLint i, GLint j);
WINGDIAPI void APIENTRY glFeedbackBuffer (GLsizei size, GLenum type, GLfloat *buffer);
WINGDIAPI void APIENTRY glFinish (void);
WINGDIAPI void APIENTRY glFlush (void);
WINGDIAPI void APIENTRY glFogf (GLenum pname, GLfloat param);
WINGDIAPI void APIENTRY glFogfv (GLenum pname, const GLfloat *params);
WINGDIAPI void APIENTRY glFogi (GLenum pname, GLint param);
WINGDIAPI void APIENTRY glFogiv (GLenum pname, const GLint *params);
WINGDIAPI void APIENTRY glFrontFace (GLenum mode);
WINGDIAPI void APIENTRY glFrustum (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
WINGDIAPI GLuint APIENTRY glGenLists (GLsizei range);
WINGDIAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
WINGDIAPI void APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
WINGDIAPI void APIENTRY glGetClipPlane (GLenum plane, GLdouble *equation);
WINGDIAPI void APIENTRY glGetDoublev (GLenum pname, GLdouble *params);
WINGDIAPI GLenum APIENTRY glGetError (void);
WINGDIAPI void APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
WINGDIAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *params);
WINGDIAPI void APIENTRY glGetLightfv (GLenum light, GLenum pname, GLfloat *params);
WINGDIAPI void APIENTRY glGetLightiv (GLenum light, GLenum pname, GLint *params);
WINGDIAPI void APIENTRY glGetMapdv (GLenum target, GLenum query, GLdouble *v);
WINGDIAPI void APIENTRY glGetMapfv (GLenum target, GLenum query, GLfloat *v);
WINGDIAPI void APIENTRY glGetMapiv (GLenum target, GLenum query, GLint *v);
WINGDIAPI void APIENTRY glGetMaterialfv (GLenum face, GLenum pname, GLfloat *params);
WINGDIAPI void APIENTRY glGetMaterialiv (GLenum face, GLenum pname, GLint *params);
WINGDIAPI void APIENTRY glGetPixelMapfv (GLenum map, GLfloat *values);
WINGDIAPI void APIENTRY glGetPixelMapuiv (GLenum map, GLuint *values);
WINGDIAPI void APIENTRY glGetPixelMapusv (GLenum map, GLushort *values);
WINGDIAPI void APIENTRY glGetPointerv (GLenum pname, GLvoid* *params);
WINGDIAPI void APIENTRY glGetPolygonStipple (GLubyte *mask);
WINGDIAPI const GLubyte * APIENTRY glGetString (GLenum name);
WINGDIAPI void APIENTRY glGetTexEnvfv (GLenum target, GLenum pname, GLfloat *params);
WINGDIAPI void APIENTRY glGetTexEnviv (GLenum target, GLenum pname, GLint *params);
WINGDIAPI void APIENTRY glGetTexGendv (GLenum coord, GLenum pname, GLdouble *params);
WINGDIAPI void APIENTRY glGetTexGenfv (GLenum coord, GLenum pname, GLfloat *params);
WINGDIAPI void APIENTRY glGetTexGeniv (GLenum coord, GLenum pname, GLint *params);
WINGDIAPI void APIENTRY glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
WINGDIAPI void APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params);
WINGDIAPI void APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params);
WINGDIAPI void APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
WINGDIAPI void APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
WINGDIAPI void APIENTRY glHint (GLenum target, GLenum mode);
WINGDIAPI void APIENTRY glIndexMask (GLuint mask);
WINGDIAPI void APIENTRY glIndexPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
WINGDIAPI void APIENTRY glIndexd (GLdouble c);
WINGDIAPI void APIENTRY glIndexdv (const GLdouble *c);
WINGDIAPI void APIENTRY glIndexf (GLfloat c);
WINGDIAPI void APIENTRY glIndexfv (const GLfloat *c);
WINGDIAPI void APIENTRY glIndexi (GLint c);
WINGDIAPI void APIENTRY glIndexiv (const GLint *c);
WINGDIAPI void APIENTRY glIndexs (GLshort c);
WINGDIAPI void APIENTRY glIndexsv (const GLshort *c);
WINGDIAPI void APIENTRY glIndexub (GLubyte c);
WINGDIAPI void APIENTRY glIndexubv (const GLubyte *c);
WINGDIAPI void APIENTRY glInitNames (void);
WINGDIAPI void APIENTRY glInterleavedArrays (GLenum format, GLsizei stride, const GLvoid *pointer);
WINGDIAPI GLboolean APIENTRY glIsEnabled (GLenum cap);
WINGDIAPI GLboolean APIENTRY glIsList (GLuint list);
WINGDIAPI GLboolean APIENTRY glIsTexture (GLuint texture);
WINGDIAPI void APIENTRY glLightModelf (GLenum pname, GLfloat param);
WINGDIAPI void APIENTRY glLightModelfv (GLenum pname, const GLfloat *params);
WINGDIAPI void APIENTRY glLightModeli (GLenum pname, GLint param);
WINGDIAPI void APIENTRY glLightModeliv (GLenum pname, const GLint *params);
WINGDIAPI void APIENTRY glLightf (GLenum light, GLenum pname, GLfloat param);
WINGDIAPI void APIENTRY glLightfv (GLenum light, GLenum pname, const GLfloat *params);
WINGDIAPI void APIENTRY glLighti (GLenum light, GLenum pname, GLint param);
WINGDIAPI void APIENTRY glLightiv (GLenum light, GLenum pname, const GLint *params);
WINGDIAPI void APIENTRY glLineStipple (GLint factor, GLushort pattern);
WINGDIAPI void APIENTRY glLineWidth (GLfloat width);
WINGDIAPI void APIENTRY glListBase (GLuint base);
WINGDIAPI void APIENTRY glLoadIdentity (void);
WINGDIAPI void APIENTRY glLoadMatrixd (const GLdouble *m);
WINGDIAPI void APIENTRY glLoadMatrixf (const GLfloat *m);
WINGDIAPI void APIENTRY glLoadName (GLuint name);
WINGDIAPI void APIENTRY glLogicOp (GLenum opcode);
WINGDIAPI void APIENTRY glMap1d (GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points);
WINGDIAPI void APIENTRY glMap1f (GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points);
WINGDIAPI void APIENTRY glMap2d (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points);
WINGDIAPI void APIENTRY glMap2f (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points);
WINGDIAPI void APIENTRY glMapGrid1d (GLint un, GLdouble u1, GLdouble u2);
WINGDIAPI void APIENTRY glMapGrid1f (GLint un, GLfloat u1, GLfloat u2);
WINGDIAPI void APIENTRY glMapGrid2d (GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2);
WINGDIAPI void APIENTRY glMapGrid2f (GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2);
WINGDIAPI void APIENTRY glMaterialf (GLenum face, GLenum pname, GLfloat param);
WINGDIAPI void APIENTRY glMaterialfv (GLenum face, GLenum pname, const GLfloat *params);
WINGDIAPI void APIENTRY glMateriali (GLenum face, GLenum pname, GLint param);
WINGDIAPI void APIENTRY glMaterialiv (GLenum face, GLenum pname, const GLint *params);
WINGDIAPI void APIENTRY glMatrixMode (GLenum mode);
WINGDIAPI void APIENTRY glMultMatrixd (const GLdouble *m);
WINGDIAPI void APIENTRY glMultMatrixf (const GLfloat *m);
WINGDIAPI void APIENTRY glNewList (GLuint list, GLenum mode);
WINGDIAPI void APIENTRY glNormal3b (GLbyte nx, GLbyte ny, GLbyte nz);
WINGDIAPI void APIENTRY glNormal3bv (const GLbyte *v);
WINGDIAPI void APIENTRY glNormal3d (GLdouble nx, GLdouble ny, GLdouble nz);
WINGDIAPI void APIENTRY glNormal3dv (const GLdouble *v);
WINGDIAPI void APIENTRY glNormal3f (GLfloat nx, GLfloat ny, GLfloat nz);
WINGDIAPI void APIENTRY glNormal3fv (const GLfloat *v);
WINGDIAPI void APIENTRY glNormal3i (GLint nx, GLint ny, GLint nz);
WINGDIAPI void APIENTRY glNormal3iv (const GLint *v);
WINGDIAPI void APIENTRY glNormal3s (GLshort nx, GLshort ny, GLshort nz);
WINGDIAPI void APIENTRY glNormal3sv (const GLshort *v);
WINGDIAPI void APIENTRY glNormalPointer (GLenum type, GLsizei stride, const GLvoid *pointer);
WINGDIAPI void APIENTRY glOrtho (GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar);
WINGDIAPI void APIENTRY glPassThrough (GLfloat token);
WINGDIAPI void APIENTRY glPixelMapfv (GLenum map, GLsizei mapsize, const GLfloat *values);
WINGDIAPI void APIENTRY glPixelMapuiv (GLenum map, GLsizei mapsize, const GLuint *values);
WINGDIAPI void APIENTRY glPixelMapusv (GLenum map, GLsizei mapsize, const GLushort *values);
WINGDIAPI void APIENTRY glPixelStoref (GLenum pname, GLfloat param);
WINGDIAPI void APIENTRY glPixelStorei (GLenum pname, GLint param);
WINGDIAPI void APIENTRY glPixelTransferf (GLenum pname, GLfloat param);
WINGDIAPI void APIENTRY glPixelTransferi (GLenum pname, GLint param);
WINGDIAPI void APIENTRY glPixelZoom (GLfloat xfactor, GLfloat yfactor);
WINGDIAPI void APIENTRY glPointSize (GLfloat size);
WINGDIAPI void APIENTRY glPolygonMode (GLenum face, GLenum mode);
WINGDIAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
WINGDIAPI void APIENTRY glPolygonStipple (const GLubyte *mask);
WINGDIAPI void APIENTRY glPopAttrib (void);
WINGDIAPI void APIENTRY glPopClientAttrib (void);
WINGDIAPI void APIENTRY glPopMatrix (void);
WINGDIAPI void APIENTRY glPopName (void);
WINGDIAPI void APIENTRY glPrioritizeTextures (GLsizei n, const GLuint *textures, const GLclampf *priorities);
WINGDIAPI void APIENTRY glPushAttrib (GLbitfield mask);
WINGDIAPI void APIENTRY glPushClientAttrib (GLbitfield mask);
WINGDIAPI void APIENTRY glPushMatrix (void);
WINGDIAPI void APIENTRY glPushName (GLuint name);
WINGDIAPI void APIENTRY glRasterPos2d (GLdouble x, GLdouble y);
WINGDIAPI void APIENTRY glRasterPos2dv (const GLdouble *v);
WINGDIAPI void APIENTRY glRasterPos2f (GLfloat x, GLfloat y);
WINGDIAPI void APIENTRY glRasterPos2fv (const GLfloat *v);
WINGDIAPI void APIENTRY glRasterPos2i (GLint x, GLint y);
WINGDIAPI void APIENTRY glRasterPos2iv (const GLint *v);
WINGDIAPI void APIENTRY glRasterPos2s (GLshort x, GLshort y);
WINGDIAPI void APIENTRY glRasterPos2sv (const GLshort *v);
WINGDIAPI void APIENTRY glRasterPos3d (GLdouble x, GLdouble y, GLdouble z);
WINGDIAPI void APIENTRY glRasterPos3dv (const GLdouble *v);
WINGDIAPI void APIENTRY glRasterPos3f (GLfloat x, GLfloat y, GLfloat z);
WINGDIAPI void APIENTRY glRasterPos3fv (const GLfloat *v);
WINGDIAPI void APIENTRY glRasterPos3i (GLint x, GLint y, GLint z);
WINGDIAPI void APIENTRY glRasterPos3iv (const GLint *v);
WINGDIAPI void APIENTRY glRasterPos3s (GLshort x, GLshort y, GLshort z);
WINGDIAPI void APIENTRY glRasterPos3sv (const GLshort *v);
WINGDIAPI void APIENTRY glRasterPos4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
WINGDIAPI void APIENTRY glRasterPos4dv (const GLdouble *v);
WINGDIAPI void APIENTRY glRasterPos4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
WINGDIAPI void APIENTRY glRasterPos4fv (const GLfloat *v);
WINGDIAPI void APIENTRY glRasterPos4i (GLint x, GLint y, GLint z, GLint w);
WINGDIAPI void APIENTRY glRasterPos4iv (const GLint *v);
WINGDIAPI void APIENTRY glRasterPos4s (GLshort x, GLshort y, GLshort z, GLshort w);
WINGDIAPI void APIENTRY glRasterPos4sv (const GLshort *v);
WINGDIAPI void APIENTRY glReadBuffer (GLenum mode);
WINGDIAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
WINGDIAPI void APIENTRY glRectd (GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2);
WINGDIAPI void APIENTRY glRectdv (const GLdouble *v1, const GLdouble *v2);
WINGDIAPI void APIENTRY glRectf (GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2);
WINGDIAPI void APIENTRY glRectfv (const GLfloat *v1, const GLfloat *v2);
WINGDIAPI void APIENTRY glRecti (GLint x1, GLint y1, GLint x2, GLint y2);
WINGDIAPI void APIENTRY glRectiv (const GLint *v1, const GLint *v2);
WINGDIAPI void APIENTRY glRects (GLshort x1, GLshort y1, GLshort x2, GLshort y2);
WINGDIAPI void APIENTRY glRectsv (const GLshort *v1, const GLshort *v2);
WINGDIAPI GLint APIENTRY glRenderMode (GLenum mode);
WINGDIAPI void APIENTRY glRotated (GLdouble angle, GLdouble x, GLdouble y, GLdouble z);
WINGDIAPI void APIENTRY glRotatef (GLfloat angle, GLfloat x, GLfloat y, GLfloat z);
WINGDIAPI void APIENTRY glScaled (GLdouble x, GLdouble y, GLdouble z);
WINGDIAPI void APIENTRY glScalef (GLfloat x, GLfloat y, GLfloat z);
WINGDIAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
WINGDIAPI void APIENTRY glSelectBuffer (GLsizei size, GLuint *buffer);
WINGDIAPI void APIENTRY glShadeModel (GLenum mode);
WINGDIAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
WINGDIAPI void APIENTRY glStencilMask (GLuint mask);
WINGDIAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
WINGDIAPI void APIENTRY glTexCoord1d (GLdouble s);
WINGDIAPI void APIENTRY glTexCoord1dv (const GLdouble *v);
WINGDIAPI void APIENTRY glTexCoord1f (GLfloat s);
WINGDIAPI void APIENTRY glTexCoord1fv (const GLfloat *v);
WINGDIAPI void APIENTRY glTexCoord1i (GLint s);
WINGDIAPI void APIENTRY glTexCoord1iv (const GLint *v);
WINGDIAPI void APIENTRY glTexCoord1s (GLshort s);
WINGDIAPI void APIENTRY glTexCoord1sv (const GLshort *v);
WINGDIAPI void APIENTRY glTexCoord2d (GLdouble s, GLdouble t);
WINGDIAPI void APIENTRY glTexCoord2dv (const GLdouble *v);
WINGDIAPI void APIENTRY glTexCoord2f (GLfloat s, GLfloat t);
WINGDIAPI void APIENTRY glTexCoord2fv (const GLfloat *v);
WINGDIAPI void APIENTRY glTexCoord2i (GLint s, GLint t);
WINGDIAPI void APIENTRY glTexCoord2iv (const GLint *v);
WINGDIAPI void APIENTRY glTexCoord2s (GLshort s, GLshort t);
WINGDIAPI void APIENTRY glTexCoord2sv (const GLshort *v);
WINGDIAPI void APIENTRY glTexCoord3d (GLdouble s, GLdouble t, GLdouble r);
WINGDIAPI void APIENTRY glTexCoord3dv (const GLdouble *v);
WINGDIAPI void APIENTRY glTexCoord3f (GLfloat s, GLfloat t, GLfloat r);
WINGDIAPI void APIENTRY glTexCoord3fv (const GLfloat *v);
WINGDIAPI void APIENTRY glTexCoord3i (GLint s, GLint t, GLint r);
WINGDIAPI void APIENTRY glTexCoord3iv (const GLint *v);
WINGDIAPI void APIENTRY glTexCoord3s (GLshort s, GLshort t, GLshort r);
WINGDIAPI void APIENTRY glTexCoord3sv (const GLshort *v);
WINGDIAPI void APIENTRY glTexCoord4d (GLdouble s, GLdouble t, GLdouble r, GLdouble q);
WINGDIAPI void APIENTRY glTexCoord4dv (const GLdouble *v);
WINGDIAPI void APIENTRY glTexCoord4f (GLfloat s, GLfloat t, GLfloat r, GLfloat q);
WINGDIAPI void APIENTRY glTexCoord4fv (const GLfloat *v);
WINGDIAPI void APIENTRY glTexCoord4i (GLint s, GLint t, GLint r, GLint q);
WINGDIAPI void APIENTRY glTexCoord4iv (const GLint *v);
WINGDIAPI void APIENTRY glTexCoord4s (GLshort s, GLshort t, GLshort r, GLshort q);
WINGDIAPI void APIENTRY glTexCoord4sv (const GLshort *v);
WINGDIAPI void APIENTRY glTexCoordPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
WINGDIAPI void APIENTRY glTexEnvf (GLenum target, GLenum pname, GLfloat param);
WINGDIAPI void APIENTRY glTexEnvfv (GLenum target, GLenum pname, const GLfloat *params);
WINGDIAPI void APIENTRY glTexEnvi (GLenum target, GLenum pname, GLint param);
WINGDIAPI void APIENTRY glTexEnviv (GLenum target, GLenum pname, const GLint *params);
WINGDIAPI void APIENTRY glTexGend (GLenum coord, GLenum pname, GLdouble param);
WINGDIAPI void APIENTRY glTexGendv (GLenum coord, GLenum pname, const GLdouble *params);
WINGDIAPI void APIENTRY glTexGenf (GLenum coord, GLenum pname, GLfloat param);
WINGDIAPI void APIENTRY glTexGenfv (GLenum coord, GLenum pname, const GLfloat *params);
WINGDIAPI void APIENTRY glTexGeni (GLenum coord, GLenum pname, GLint param);
WINGDIAPI void APIENTRY glTexGeniv (GLenum coord, GLenum pname, const GLint *params);
WINGDIAPI void APIENTRY glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
WINGDIAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
WINGDIAPI void APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
WINGDIAPI void APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
WINGDIAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
WINGDIAPI void APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
WINGDIAPI void APIENTRY glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
WINGDIAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
WINGDIAPI void APIENTRY glTranslated (GLdouble x, GLdouble y, GLdouble z);
WINGDIAPI void APIENTRY glTranslatef (GLfloat x, GLfloat y, GLfloat z);
WINGDIAPI void APIENTRY glVertex2d (GLdouble x, GLdouble y);
WINGDIAPI void APIENTRY glVertex2dv (const GLdouble *v);
WINGDIAPI void APIENTRY glVertex2f (GLfloat x, GLfloat y);
WINGDIAPI void APIENTRY glVertex2fv (const GLfloat *v);
WINGDIAPI void APIENTRY glVertex2i (GLint x, GLint y);
WINGDIAPI void APIENTRY glVertex2iv (const GLint *v);
WINGDIAPI void APIENTRY glVertex2s (GLshort x, GLshort y);
WINGDIAPI void APIENTRY glVertex2sv (const GLshort *v);
WINGDIAPI void APIENTRY glVertex3d (GLdouble x, GLdouble y, GLdouble z);
WINGDIAPI void APIENTRY glVertex3dv (const GLdouble *v);
WINGDIAPI void APIENTRY glVertex3f (GLfloat x, GLfloat y, GLfloat z);
WINGDIAPI void APIENTRY glVertex3fv (const GLfloat *v);
WINGDIAPI void APIENTRY glVertex3i (GLint x, GLint y, GLint z);
WINGDIAPI void APIENTRY glVertex3iv (const GLint *v);
WINGDIAPI void APIENTRY glVertex3s (GLshort x, GLshort y, GLshort z);
WINGDIAPI void APIENTRY glVertex3sv (const GLshort *v);
WINGDIAPI void APIENTRY glVertex4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w);
WINGDIAPI void APIENTRY glVertex4dv (const GLdouble *v);
WINGDIAPI void APIENTRY glVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w);
WINGDIAPI void APIENTRY glVertex4fv (const GLfloat *v);
WINGDIAPI void APIENTRY glVertex4i (GLint x, GLint y, GLint z, GLint w);
WINGDIAPI void APIENTRY glVertex4iv (const GLint *v);
WINGDIAPI void APIENTRY glVertex4s (GLshort x, GLshort y, GLshort z, GLshort w);
WINGDIAPI void APIENTRY glVertex4sv (const GLshort *v);
WINGDIAPI void APIENTRY glVertexPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
WINGDIAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
/* EXT_vertex_array */
typedef void (APIENTRY * PFNGLARRAYELEMENTEXTPROC) (GLint i);
typedef void (APIENTRY * PFNGLDRAWARRAYSEXTPROC) (GLenum mode, GLint first, GLsizei count);
typedef void (APIENTRY * PFNGLVERTEXPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
typedef void (APIENTRY * PFNGLNORMALPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
typedef void (APIENTRY * PFNGLCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
typedef void (APIENTRY * PFNGLINDEXPOINTEREXTPROC) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
typedef void (APIENTRY * PFNGLTEXCOORDPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer);
typedef void (APIENTRY * PFNGLEDGEFLAGPOINTEREXTPROC) (GLsizei stride, GLsizei count, const GLboolean *pointer);
typedef void (APIENTRY * PFNGLGETPOINTERVEXTPROC) (GLenum pname, GLvoid* *params);
typedef void (APIENTRY * PFNGLARRAYELEMENTARRAYEXTPROC)(GLenum mode, GLsizei count, const GLvoid* pi);
/* WIN_draw_range_elements */
typedef void (APIENTRY * PFNGLDRAWRANGEELEMENTSWINPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
/* WIN_swap_hint */
typedef void (APIENTRY * PFNGLADDSWAPHINTRECTWINPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
/* EXT_paletted_texture */
typedef void (APIENTRY * PFNGLCOLORTABLEEXTPROC)
(GLenum target, GLenum internalFormat, GLsizei width, GLenum format,
GLenum type, const GLvoid *data);
typedef void (APIENTRY * PFNGLCOLORSUBTABLEEXTPROC)
(GLenum target, GLsizei start, GLsizei count, GLenum format,
GLenum type, const GLvoid *data);
typedef void (APIENTRY * PFNGLGETCOLORTABLEEXTPROC)
(GLenum target, GLenum format, GLenum type, GLvoid *data);
typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERIVEXTPROC)
(GLenum target, GLenum pname, GLint *params);
typedef void (APIENTRY * PFNGLGETCOLORTABLEPARAMETERFVEXTPROC)
(GLenum target, GLenum pname, GLfloat *params);
#ifdef __cplusplus
}
#endif
#endif /* __GL_H__ */
#endif /* __gl_h_ */
This source diff could not be displayed because it is too large. You can view the blob instead.
#ifndef __glut_h__
#define __glut_h__
/* Copyright (c) Mark J. Kilgard, 1994, 1995, 1996, 1998, 2000. */
/* This program is freely distributable without licensing fees and is
provided without guarantee or warrantee expressed or implied. This
program is -not- in the public domain. */
#ifdef _WIN32
/* GLUT 3.7 now tries to avoid including <windows.h>
to avoid name space pollution, but Win32's <GL/gl.h>
needs APIENTRY and WINGDIAPI defined properly. */
# if 0
/* This would put tons of macros and crap in our clean name space. */
# define WIN32_LEAN_AND_MEAN
# include <windows.h>
# else
/* XXX This is from Win32's <windef.h> */
# ifndef APIENTRY
# define GLUT_APIENTRY_DEFINED
/* Cygwin and MingW32 are two free GNU-based Open Source compilation
environments for Win32. Note that __CYGWIN32__ is deprecated
in favor of simply __CYGWIN__. */
# if defined(__MINGW32__) || defined(__CYGWIN32__) || defined(__CYGWIN__)
# ifdef i386
# define APIENTRY __attribute__ ((stdcall))
# else
# define APIENTRY
# endif
# else
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
# define APIENTRY __stdcall
# else
# define APIENTRY
# endif
# endif
# endif
/* XXX This is from Win32's <winnt.h> */
# ifndef CALLBACK
# if defined(__MINGW32__) || defined(__CYGWIN32__) || defined(__CYGWIN__)
# define CALLBACK __attribute__ ((stdcall))
# else
# if (defined(_M_MRX000) || defined(_M_IX86) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64)) && !defined(MIDL_PASS)
# define CALLBACK __stdcall
# else
# define CALLBACK
# endif
# endif
# endif
/* XXX This is from Win32's <wingdi.h> and <winnt.h> */
# ifndef WINGDIAPI
# define GLUT_WINGDIAPI_DEFINED
# if defined(__MINGW32__) || defined(__CYGWIN32__) || defined(__CYGWIN__)
# define WINGDIAPI
# else
# define WINGDIAPI __declspec(dllimport)
# endif
# endif
# if defined(__MINGW32__) || defined(__CYGWIN32__) || defined(__CYGWIN__)
/* Rely on Cygwin32/MingW32 <stddef.h> to set wchar_t. */
/* XXX Warning. The Cygwin32/MingW32 definition for wchar_t
is an "int" instead of the "short" used by Windows. */
# include <stddef.h>
# else
/* XXX This is from Win32's <ctype.h> */
# ifndef _WCHAR_T_DEFINED
typedef unsigned short wchar_t;
# define _WCHAR_T_DEFINED
# endif
# endif
# endif
/* To disable automatic library usage for GLUT, define GLUT_NO_LIB_PRAGMA
in your compile preprocessor options. */
# if !defined(GLUT_BUILDING_LIB) && !defined(GLUT_NO_LIB_PRAGMA)
# pragma comment (lib, "winmm.lib") /* link with Windows MultiMedia lib */
# pragma comment (lib, "user32.lib") /* link with Windows User lib */
# pragma comment (lib, "gdi32.lib") /* link with Windows GDI lib */
/* To enable automatic SGI OpenGL for Windows library usage for GLUT,
define GLUT_USE_SGI_OPENGL in your compile preprocessor options. */
# ifdef GLUT_USE_SGI_OPENGL
# pragma comment (lib, "opengl.lib") /* link with SGI OpenGL for Windows lib */
# pragma comment (lib, "glu.lib") /* link with SGI OpenGL Utility lib */
# if defined(GLUT_STATIC_LIB)
# pragma comment (lib, "glutstatic.lib") /* link with static Win32 GLUT lib */
# else
# pragma comment (lib, "glut.lib") /* link with Win32 GLUT lib */
# endif
# else
# pragma comment (lib, "opengl32.lib") /* link with Microsoft OpenGL lib */
# pragma comment (lib, "glustatic.lib") /* link with Microsoft OpenGL Utility lib */
# if defined(GLUT_STATIC_LIB)
# pragma comment (lib, "glutstatic.lib") /* link with static Win32 GLUT lib */
# else
# pragma comment (lib, "glut32.lib") /* link with Win32 GLUT lib */
# endif
# endif
# endif
/* To disable supression of annoying warnings about floats being promoted
to doubles, define GLUT_NO_WARNING_DISABLE in your compile preprocessor
options. */
# if defined(_MSC_VER) && !defined(GLUT_NO_WARNING_DISABLE)
# pragma warning (disable:4244) /* Disable bogus VC++ 4.2 conversion warnings. */
# pragma warning (disable:4305) /* VC++ 5.0 version of above warning. */
# endif
/* Win32 has an annoying issue where there are multiple C run-time
libraries (CRTs). If the executable is linked with a different CRT
from the GLUT DLL, the GLUT DLL will not share the same CRT static
data seen by the executable. In particular, atexit callbacks registered
in the executable will not be called if GLUT calls its (different)
exit routine). GLUT is typically built with the
"/MD" option (the CRT with multithreading DLL support), but the Visual
C++ linker default is "/ML" (the single threaded CRT).
One workaround to this issue is requiring users to always link with
the same CRT as GLUT is compiled with. That requires users supply a
non-standard option. GLUT 3.7 has its own built-in workaround where
the executable's "exit" function pointer is covertly passed to GLUT.
GLUT then calls the executable's exit function pointer to ensure that
any "atexit" calls registered by the application are called if GLUT
needs to exit.
Note that the __glut*WithExit routines should NEVER be called directly.
To avoid the atexit workaround, #define GLUT_DISABLE_ATEXIT_HACK. */
/* XXX This is from Win32's <process.h> */
# if !defined(_MSC_VER) && !defined(__cdecl)
/* Define __cdecl for non-Microsoft compilers. */
# define __cdecl
# define GLUT_DEFINED___CDECL
# endif
# ifndef _CRTIMP
# ifdef _NTSDK
/* Definition compatible with NT SDK */
# define _CRTIMP
# else
/* Current definition */
# ifdef _DLL
# define _CRTIMP __declspec(dllimport)
# else
# define _CRTIMP
# endif
# endif
# define GLUT_DEFINED__CRTIMP
# endif
/* GLUT API entry point declarations for Win32. */
# ifdef GLUT_BUILDING_LIB
# define GLUTAPI __declspec(dllexport)
# else
# ifdef _DLL
# define GLUTAPI __declspec(dllimport)
# else
# define GLUTAPI extern
# endif
# endif
/* GLUT callback calling convention for Win32. */
# define GLUTCALLBACK __cdecl
#endif /* _WIN32 */
#include <GL/gl.h>
#include <GL/glu.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
# ifndef GLUT_BUILDING_LIB
# if __BORLANDC__
# if defined(_BUILDRTLDLL)
void __cdecl __export exit(int __status);
# else
void __cdecl exit(int __status);
# endif
# else
# if _MSC_VER >= 1200
extern _CRTIMP __declspec(noreturn) void __cdecl exit(int);
# else
extern _CRTIMP void __cdecl exit(int);
# endif
# endif
# endif
#else
/* non-Win32 case. */
/* Define APIENTRY and CALLBACK to nothing if we aren't on Win32. */
# define APIENTRY
# define GLUT_APIENTRY_DEFINED
# define CALLBACK
/* Define GLUTAPI and GLUTCALLBACK as below if we aren't on Win32. */
# define GLUTAPI extern
# define GLUTCALLBACK
/* Prototype exit for the non-Win32 case (see above). */
# ifdef __GNUC__
extern void exit(int __status) __attribute__((__noreturn__));
# else
extern void exit(int);
# endif
#endif
/**
GLUT API revision history:
GLUT_API_VERSION is updated to reflect incompatible GLUT
API changes (interface changes, semantic changes, deletions,
or additions).
GLUT_API_VERSION=1 First public release of GLUT. 11/29/94
GLUT_API_VERSION=2 Added support for OpenGL/GLX multisampling,
extension. Supports new input devices like tablet, dial and button
box, and Spaceball. Easy to query OpenGL extensions.
GLUT_API_VERSION=3 glutMenuStatus added.
GLUT_API_VERSION=4 glutInitDisplayString, glutWarpPointer,
glutBitmapLength, glutStrokeLength, glutWindowStatusFunc, dynamic
video resize subAPI, glutPostWindowRedisplay, glutKeyboardUpFunc,
glutSpecialUpFunc, glutIgnoreKeyRepeat, glutSetKeyRepeat,
glutJoystickFunc, glutForceJoystickFunc, glutStrokeWidthf,
glutStrokeLengthf (NOT FINALIZED!).
**/
#ifndef GLUT_API_VERSION /* allow this to be overriden */
#define GLUT_API_VERSION 3
#endif
/**
GLUT implementation revision history:
GLUT_XLIB_IMPLEMENTATION is updated to reflect both GLUT
API revisions and implementation revisions (ie, bug fixes).
GLUT_XLIB_IMPLEMENTATION=1 mjk's first public release of
GLUT Xlib-based implementation. 11/29/94
GLUT_XLIB_IMPLEMENTATION=2 mjk's second public release of
GLUT Xlib-based implementation providing GLUT version 2
interfaces.
GLUT_XLIB_IMPLEMENTATION=3 mjk's GLUT 2.2 images. 4/17/95
GLUT_XLIB_IMPLEMENTATION=4 mjk's GLUT 2.3 images. 6/?/95
GLUT_XLIB_IMPLEMENTATION=5 mjk's GLUT 3.0 images. 10/?/95
GLUT_XLIB_IMPLEMENTATION=7 mjk's GLUT 3.1+ with glutWarpPoitner. 7/24/96
GLUT_XLIB_IMPLEMENTATION=8 mjk's GLUT 3.1+ with glutWarpPoitner
and video resize. 1/3/97
GLUT_XLIB_IMPLEMENTATION=9 mjk's GLUT 3.4 release with early GLUT 4 routines.
GLUT_XLIB_IMPLEMENTATION=11 Mesa 2.5's GLUT 3.6 release.
GLUT_XLIB_IMPLEMENTATION=12 mjk's GLUT 3.6 release with early GLUT 4 routines + signal handling.
GLUT_XLIB_IMPLEMENTATION=13 mjk's GLUT 3.7 beta with GameGLUT support.
GLUT_XLIB_IMPLEMENTATION=14 mjk's GLUT 3.7 beta with f90gl friend interface.
GLUT_XLIB_IMPLEMENTATION=15 mjk's GLUT 3.7 beta sync'ed with Mesa <GL/glut.h>
GLUT_XLIB_IMPLEMENTATION=16 mjk's early GLUT 3.8
GLUT_XLIB_IMPLEMENTATION=17 mjk's GLUT 3.8 with glutStrokeWidthf and glutStrokeLengthf
**/
#ifndef GLUT_XLIB_IMPLEMENTATION /* Allow this to be overriden. */
#define GLUT_XLIB_IMPLEMENTATION 17
#endif
/* Display mode bit masks. */
#define GLUT_RGB 0
#define GLUT_RGBA GLUT_RGB
#define GLUT_INDEX 1
#define GLUT_SINGLE 0
#define GLUT_DOUBLE 2
#define GLUT_ACCUM 4
#define GLUT_ALPHA 8
#define GLUT_DEPTH 16
#define GLUT_STENCIL 32
#if (GLUT_API_VERSION >= 2)
#define GLUT_MULTISAMPLE 128
#define GLUT_STEREO 256
#endif
#if (GLUT_API_VERSION >= 3)
#define GLUT_LUMINANCE 512
#endif
/* Mouse buttons. */
#define GLUT_LEFT_BUTTON 0
#define GLUT_MIDDLE_BUTTON 1
#define GLUT_RIGHT_BUTTON 2
/* Mouse button state. */
#define GLUT_DOWN 0
#define GLUT_UP 1
#if (GLUT_API_VERSION >= 2)
/* function keys */
#define GLUT_KEY_F1 1
#define GLUT_KEY_F2 2
#define GLUT_KEY_F3 3
#define GLUT_KEY_F4 4
#define GLUT_KEY_F5 5
#define GLUT_KEY_F6 6
#define GLUT_KEY_F7 7
#define GLUT_KEY_F8 8
#define GLUT_KEY_F9 9
#define GLUT_KEY_F10 10
#define GLUT_KEY_F11 11
#define GLUT_KEY_F12 12
/* directional keys */
#define GLUT_KEY_LEFT 100
#define GLUT_KEY_UP 101
#define GLUT_KEY_RIGHT 102
#define GLUT_KEY_DOWN 103
#define GLUT_KEY_PAGE_UP 104
#define GLUT_KEY_PAGE_DOWN 105
#define GLUT_KEY_HOME 106
#define GLUT_KEY_END 107
#define GLUT_KEY_INSERT 108
#endif
/* Entry/exit state. */
#define GLUT_LEFT 0
#define GLUT_ENTERED 1
/* Menu usage state. */
#define GLUT_MENU_NOT_IN_USE 0
#define GLUT_MENU_IN_USE 1
/* Visibility state. */
#define GLUT_NOT_VISIBLE 0
#define GLUT_VISIBLE 1
/* Window status state. */
#define GLUT_HIDDEN 0
#define GLUT_FULLY_RETAINED 1
#define GLUT_PARTIALLY_RETAINED 2
#define GLUT_FULLY_COVERED 3
/* Color index component selection values. */
#define GLUT_RED 0
#define GLUT_GREEN 1
#define GLUT_BLUE 2
#ifdef _WIN32
/* Stroke font constants (use these in GLUT program). */
#define GLUT_STROKE_ROMAN ((void*)0)
#define GLUT_STROKE_MONO_ROMAN ((void*)1)
/* Bitmap font constants (use these in GLUT program). */
#define GLUT_BITMAP_9_BY_15 ((void*)2)
#define GLUT_BITMAP_8_BY_13 ((void*)3)
#define GLUT_BITMAP_TIMES_ROMAN_10 ((void*)4)
#define GLUT_BITMAP_TIMES_ROMAN_24 ((void*)5)
#if (GLUT_API_VERSION >= 3)
#define GLUT_BITMAP_HELVETICA_10 ((void*)6)
#define GLUT_BITMAP_HELVETICA_12 ((void*)7)
#define GLUT_BITMAP_HELVETICA_18 ((void*)8)
#endif
#else
/* Stroke font opaque addresses (use constants instead in source code). */
GLUTAPI void *glutStrokeRoman;
GLUTAPI void *glutStrokeMonoRoman;
/* Stroke font constants (use these in GLUT program). */
#define GLUT_STROKE_ROMAN (&glutStrokeRoman)
#define GLUT_STROKE_MONO_ROMAN (&glutStrokeMonoRoman)
/* Bitmap font opaque addresses (use constants instead in source code). */
GLUTAPI void *glutBitmap9By15;
GLUTAPI void *glutBitmap8By13;
GLUTAPI void *glutBitmapTimesRoman10;
GLUTAPI void *glutBitmapTimesRoman24;
GLUTAPI void *glutBitmapHelvetica10;
GLUTAPI void *glutBitmapHelvetica12;
GLUTAPI void *glutBitmapHelvetica18;
/* Bitmap font constants (use these in GLUT program). */
#define GLUT_BITMAP_9_BY_15 (&glutBitmap9By15)
#define GLUT_BITMAP_8_BY_13 (&glutBitmap8By13)
#define GLUT_BITMAP_TIMES_ROMAN_10 (&glutBitmapTimesRoman10)
#define GLUT_BITMAP_TIMES_ROMAN_24 (&glutBitmapTimesRoman24)
#if (GLUT_API_VERSION >= 3)
#define GLUT_BITMAP_HELVETICA_10 (&glutBitmapHelvetica10)
#define GLUT_BITMAP_HELVETICA_12 (&glutBitmapHelvetica12)
#define GLUT_BITMAP_HELVETICA_18 (&glutBitmapHelvetica18)
#endif
#endif
/* glutGet parameters. */
#define GLUT_WINDOW_X ((GLenum) 100)
#define GLUT_WINDOW_Y ((GLenum) 101)
#define GLUT_WINDOW_WIDTH ((GLenum) 102)
#define GLUT_WINDOW_HEIGHT ((GLenum) 103)
#define GLUT_WINDOW_BUFFER_SIZE ((GLenum) 104)
#define GLUT_WINDOW_STENCIL_SIZE ((GLenum) 105)
#define GLUT_WINDOW_DEPTH_SIZE ((GLenum) 106)
#define GLUT_WINDOW_RED_SIZE ((GLenum) 107)
#define GLUT_WINDOW_GREEN_SIZE ((GLenum) 108)
#define GLUT_WINDOW_BLUE_SIZE ((GLenum) 109)
#define GLUT_WINDOW_ALPHA_SIZE ((GLenum) 110)
#define GLUT_WINDOW_ACCUM_RED_SIZE ((GLenum) 111)
#define GLUT_WINDOW_ACCUM_GREEN_SIZE ((GLenum) 112)
#define GLUT_WINDOW_ACCUM_BLUE_SIZE ((GLenum) 113)
#define GLUT_WINDOW_ACCUM_ALPHA_SIZE ((GLenum) 114)
#define GLUT_WINDOW_DOUBLEBUFFER ((GLenum) 115)
#define GLUT_WINDOW_RGBA ((GLenum) 116)
#define GLUT_WINDOW_PARENT ((GLenum) 117)
#define GLUT_WINDOW_NUM_CHILDREN ((GLenum) 118)
#define GLUT_WINDOW_COLORMAP_SIZE ((GLenum) 119)
#if (GLUT_API_VERSION >= 2)
#define GLUT_WINDOW_NUM_SAMPLES ((GLenum) 120)
#define GLUT_WINDOW_STEREO ((GLenum) 121)
#endif
#if (GLUT_API_VERSION >= 3)
#define GLUT_WINDOW_CURSOR ((GLenum) 122)
#endif
#define GLUT_SCREEN_WIDTH ((GLenum) 200)
#define GLUT_SCREEN_HEIGHT ((GLenum) 201)
#define GLUT_SCREEN_WIDTH_MM ((GLenum) 202)
#define GLUT_SCREEN_HEIGHT_MM ((GLenum) 203)
#define GLUT_MENU_NUM_ITEMS ((GLenum) 300)
#define GLUT_DISPLAY_MODE_POSSIBLE ((GLenum) 400)
#define GLUT_INIT_WINDOW_X ((GLenum) 500)
#define GLUT_INIT_WINDOW_Y ((GLenum) 501)
#define GLUT_INIT_WINDOW_WIDTH ((GLenum) 502)
#define GLUT_INIT_WINDOW_HEIGHT ((GLenum) 503)
#define GLUT_INIT_DISPLAY_MODE ((GLenum) 504)
#if (GLUT_API_VERSION >= 2)
#define GLUT_ELAPSED_TIME ((GLenum) 700)
#endif
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
#define GLUT_WINDOW_FORMAT_ID ((GLenum) 123)
#endif
#if (GLUT_API_VERSION >= 2)
/* glutDeviceGet parameters. */
#define GLUT_HAS_KEYBOARD ((GLenum) 600)
#define GLUT_HAS_MOUSE ((GLenum) 601)
#define GLUT_HAS_SPACEBALL ((GLenum) 602)
#define GLUT_HAS_DIAL_AND_BUTTON_BOX ((GLenum) 603)
#define GLUT_HAS_TABLET ((GLenum) 604)
#define GLUT_NUM_MOUSE_BUTTONS ((GLenum) 605)
#define GLUT_NUM_SPACEBALL_BUTTONS ((GLenum) 606)
#define GLUT_NUM_BUTTON_BOX_BUTTONS ((GLenum) 607)
#define GLUT_NUM_DIALS ((GLenum) 608)
#define GLUT_NUM_TABLET_BUTTONS ((GLenum) 609)
#endif
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
#define GLUT_DEVICE_IGNORE_KEY_REPEAT ((GLenum) 610)
#define GLUT_DEVICE_KEY_REPEAT ((GLenum) 611)
#define GLUT_HAS_JOYSTICK ((GLenum) 612)
#define GLUT_OWNS_JOYSTICK ((GLenum) 613)
#define GLUT_JOYSTICK_BUTTONS ((GLenum) 614)
#define GLUT_JOYSTICK_AXES ((GLenum) 615)
#define GLUT_JOYSTICK_POLL_RATE ((GLenum) 616)
#endif
#if (GLUT_API_VERSION >= 3)
/* glutLayerGet parameters. */
#define GLUT_OVERLAY_POSSIBLE ((GLenum) 800)
#define GLUT_LAYER_IN_USE ((GLenum) 801)
#define GLUT_HAS_OVERLAY ((GLenum) 802)
#define GLUT_TRANSPARENT_INDEX ((GLenum) 803)
#define GLUT_NORMAL_DAMAGED ((GLenum) 804)
#define GLUT_OVERLAY_DAMAGED ((GLenum) 805)
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
/* glutVideoResizeGet parameters. */
#define GLUT_VIDEO_RESIZE_POSSIBLE ((GLenum) 900)
#define GLUT_VIDEO_RESIZE_IN_USE ((GLenum) 901)
#define GLUT_VIDEO_RESIZE_X_DELTA ((GLenum) 902)
#define GLUT_VIDEO_RESIZE_Y_DELTA ((GLenum) 903)
#define GLUT_VIDEO_RESIZE_WIDTH_DELTA ((GLenum) 904)
#define GLUT_VIDEO_RESIZE_HEIGHT_DELTA ((GLenum) 905)
#define GLUT_VIDEO_RESIZE_X ((GLenum) 906)
#define GLUT_VIDEO_RESIZE_Y ((GLenum) 907)
#define GLUT_VIDEO_RESIZE_WIDTH ((GLenum) 908)
#define GLUT_VIDEO_RESIZE_HEIGHT ((GLenum) 909)
#endif
/* glutUseLayer parameters. */
#define GLUT_NORMAL ((GLenum) 0)
#define GLUT_OVERLAY ((GLenum) 1)
/* glutGetModifiers return mask. */
#define GLUT_ACTIVE_SHIFT 1
#define GLUT_ACTIVE_CTRL 2
#define GLUT_ACTIVE_ALT 4
/* glutSetCursor parameters. */
/* Basic arrows. */
#define GLUT_CURSOR_RIGHT_ARROW 0
#define GLUT_CURSOR_LEFT_ARROW 1
/* Symbolic cursor shapes. */
#define GLUT_CURSOR_INFO 2
#define GLUT_CURSOR_DESTROY 3
#define GLUT_CURSOR_HELP 4
#define GLUT_CURSOR_CYCLE 5
#define GLUT_CURSOR_SPRAY 6
#define GLUT_CURSOR_WAIT 7
#define GLUT_CURSOR_TEXT 8
#define GLUT_CURSOR_CROSSHAIR 9
/* Directional cursors. */
#define GLUT_CURSOR_UP_DOWN 10
#define GLUT_CURSOR_LEFT_RIGHT 11
/* Sizing cursors. */
#define GLUT_CURSOR_TOP_SIDE 12
#define GLUT_CURSOR_BOTTOM_SIDE 13
#define GLUT_CURSOR_LEFT_SIDE 14
#define GLUT_CURSOR_RIGHT_SIDE 15
#define GLUT_CURSOR_TOP_LEFT_CORNER 16
#define GLUT_CURSOR_TOP_RIGHT_CORNER 17
#define GLUT_CURSOR_BOTTOM_RIGHT_CORNER 18
#define GLUT_CURSOR_BOTTOM_LEFT_CORNER 19
/* Inherit from parent window. */
#define GLUT_CURSOR_INHERIT 100
/* Blank cursor. */
#define GLUT_CURSOR_NONE 101
/* Fullscreen crosshair (if available). */
#define GLUT_CURSOR_FULL_CROSSHAIR 102
#endif
/* GLUT initialization sub-API. */
GLUTAPI void APIENTRY glutInit(int *argcp, char **argv);
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
GLUTAPI void APIENTRY __glutInitWithExit(int *argcp, char **argv, void (__cdecl *exitfunc)(int));
#ifndef GLUT_BUILDING_LIB
static void APIENTRY glutInit_ATEXIT_HACK(int *argcp, char **argv) { __glutInitWithExit(argcp, argv, exit); }
#define glutInit glutInit_ATEXIT_HACK
#endif
#endif
GLUTAPI void APIENTRY glutInitDisplayMode(unsigned int mode);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
GLUTAPI void APIENTRY glutInitDisplayString(const char *string);
#endif
GLUTAPI void APIENTRY glutInitWindowPosition(int x, int y);
GLUTAPI void APIENTRY glutInitWindowSize(int width, int height);
GLUTAPI void APIENTRY glutMainLoop(void);
/* GLUT window sub-API. */
GLUTAPI int APIENTRY glutCreateWindow(const char *title);
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
GLUTAPI int APIENTRY __glutCreateWindowWithExit(const char *title, void (__cdecl *exitfunc)(int));
#ifndef GLUT_BUILDING_LIB
static int APIENTRY glutCreateWindow_ATEXIT_HACK(const char *title) { return __glutCreateWindowWithExit(title, exit); }
#define glutCreateWindow glutCreateWindow_ATEXIT_HACK
#endif
#endif
GLUTAPI int APIENTRY glutCreateSubWindow(int win, int x, int y, int width, int height);
GLUTAPI void APIENTRY glutDestroyWindow(int win);
GLUTAPI void APIENTRY glutPostRedisplay(void);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
GLUTAPI void APIENTRY glutPostWindowRedisplay(int win);
#endif
GLUTAPI void APIENTRY glutSwapBuffers(void);
GLUTAPI int APIENTRY glutGetWindow(void);
GLUTAPI void APIENTRY glutSetWindow(int win);
GLUTAPI void APIENTRY glutSetWindowTitle(const char *title);
GLUTAPI void APIENTRY glutSetIconTitle(const char *title);
GLUTAPI void APIENTRY glutPositionWindow(int x, int y);
GLUTAPI void APIENTRY glutReshapeWindow(int width, int height);
GLUTAPI void APIENTRY glutPopWindow(void);
GLUTAPI void APIENTRY glutPushWindow(void);
GLUTAPI void APIENTRY glutIconifyWindow(void);
GLUTAPI void APIENTRY glutShowWindow(void);
GLUTAPI void APIENTRY glutHideWindow(void);
#if (GLUT_API_VERSION >= 3)
GLUTAPI void APIENTRY glutFullScreen(void);
GLUTAPI void APIENTRY glutSetCursor(int cursor);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
GLUTAPI void APIENTRY glutWarpPointer(int x, int y);
#endif
/* GLUT overlay sub-API. */
GLUTAPI void APIENTRY glutEstablishOverlay(void);
GLUTAPI void APIENTRY glutRemoveOverlay(void);
GLUTAPI void APIENTRY glutUseLayer(GLenum layer);
GLUTAPI void APIENTRY glutPostOverlayRedisplay(void);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 11)
GLUTAPI void APIENTRY glutPostWindowOverlayRedisplay(int win);
#endif
GLUTAPI void APIENTRY glutShowOverlay(void);
GLUTAPI void APIENTRY glutHideOverlay(void);
#endif
/* GLUT menu sub-API. */
GLUTAPI int APIENTRY glutCreateMenu(void (GLUTCALLBACK *func)(int));
#if defined(_WIN32) && !defined(GLUT_DISABLE_ATEXIT_HACK)
GLUTAPI int APIENTRY __glutCreateMenuWithExit(void (GLUTCALLBACK *func)(int), void (__cdecl *exitfunc)(int));
#ifndef GLUT_BUILDING_LIB
static int APIENTRY glutCreateMenu_ATEXIT_HACK(void (GLUTCALLBACK *func)(int)) { return __glutCreateMenuWithExit(func, exit); }
#define glutCreateMenu glutCreateMenu_ATEXIT_HACK
#endif
#endif
GLUTAPI void APIENTRY glutDestroyMenu(int menu);
GLUTAPI int APIENTRY glutGetMenu(void);
GLUTAPI void APIENTRY glutSetMenu(int menu);
GLUTAPI void APIENTRY glutAddMenuEntry(const char *label, int value);
GLUTAPI void APIENTRY glutAddSubMenu(const char *label, int submenu);
GLUTAPI void APIENTRY glutChangeToMenuEntry(int item, const char *label, int value);
GLUTAPI void APIENTRY glutChangeToSubMenu(int item, const char *label, int submenu);
GLUTAPI void APIENTRY glutRemoveMenuItem(int item);
GLUTAPI void APIENTRY glutAttachMenu(int button);
GLUTAPI void APIENTRY glutDetachMenu(int button);
/* GLUT window callback sub-API. */
GLUTAPI void APIENTRY glutDisplayFunc(void (GLUTCALLBACK *func)(void));
GLUTAPI void APIENTRY glutReshapeFunc(void (GLUTCALLBACK *func)(int width, int height));
GLUTAPI void APIENTRY glutKeyboardFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));
GLUTAPI void APIENTRY glutMouseFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y));
GLUTAPI void APIENTRY glutMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
GLUTAPI void APIENTRY glutPassiveMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
GLUTAPI void APIENTRY glutEntryFunc(void (GLUTCALLBACK *func)(int state));
GLUTAPI void APIENTRY glutVisibilityFunc(void (GLUTCALLBACK *func)(int state));
GLUTAPI void APIENTRY glutIdleFunc(void (GLUTCALLBACK *func)(void));
GLUTAPI void APIENTRY glutTimerFunc(unsigned int millis, void (GLUTCALLBACK *func)(int value), int value);
GLUTAPI void APIENTRY glutMenuStateFunc(void (GLUTCALLBACK *func)(int state));
#if (GLUT_API_VERSION >= 2)
GLUTAPI void APIENTRY glutSpecialFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
GLUTAPI void APIENTRY glutSpaceballMotionFunc(void (GLUTCALLBACK *func)(int x, int y, int z));
GLUTAPI void APIENTRY glutSpaceballRotateFunc(void (GLUTCALLBACK *func)(int x, int y, int z));
GLUTAPI void APIENTRY glutSpaceballButtonFunc(void (GLUTCALLBACK *func)(int button, int state));
GLUTAPI void APIENTRY glutButtonBoxFunc(void (GLUTCALLBACK *func)(int button, int state));
GLUTAPI void APIENTRY glutDialsFunc(void (GLUTCALLBACK *func)(int dial, int value));
GLUTAPI void APIENTRY glutTabletMotionFunc(void (GLUTCALLBACK *func)(int x, int y));
GLUTAPI void APIENTRY glutTabletButtonFunc(void (GLUTCALLBACK *func)(int button, int state, int x, int y));
#if (GLUT_API_VERSION >= 3)
GLUTAPI void APIENTRY glutMenuStatusFunc(void (GLUTCALLBACK *func)(int status, int x, int y));
GLUTAPI void APIENTRY glutOverlayDisplayFunc(void (GLUTCALLBACK *func)(void));
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
GLUTAPI void APIENTRY glutWindowStatusFunc(void (GLUTCALLBACK *func)(int state));
#endif
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
GLUTAPI void APIENTRY glutKeyboardUpFunc(void (GLUTCALLBACK *func)(unsigned char key, int x, int y));
GLUTAPI void APIENTRY glutSpecialUpFunc(void (GLUTCALLBACK *func)(int key, int x, int y));
GLUTAPI void APIENTRY glutJoystickFunc(void (GLUTCALLBACK *func)(unsigned int buttonMask, int x, int y, int z), int pollInterval);
#endif
#endif
#endif
/* GLUT color index sub-API. */
GLUTAPI void APIENTRY glutSetColor(int, GLfloat red, GLfloat green, GLfloat blue);
GLUTAPI GLfloat APIENTRY glutGetColor(int ndx, int component);
GLUTAPI void APIENTRY glutCopyColormap(int win);
/* GLUT state retrieval sub-API. */
GLUTAPI int APIENTRY glutGet(GLenum type);
GLUTAPI int APIENTRY glutDeviceGet(GLenum type);
#if (GLUT_API_VERSION >= 2)
/* GLUT extension support sub-API */
GLUTAPI int APIENTRY glutExtensionSupported(const char *name);
#endif
#if (GLUT_API_VERSION >= 3)
GLUTAPI int APIENTRY glutGetModifiers(void);
GLUTAPI int APIENTRY glutLayerGet(GLenum type);
#endif
/* GLUT font sub-API */
GLUTAPI void APIENTRY glutBitmapCharacter(void *font, int character);
GLUTAPI int APIENTRY glutBitmapWidth(void *font, int character);
GLUTAPI void APIENTRY glutStrokeCharacter(void *font, int character);
GLUTAPI int APIENTRY glutStrokeWidth(void *font, int character);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
GLUTAPI int APIENTRY glutBitmapLength(void *font, const unsigned char *string);
GLUTAPI int APIENTRY glutStrokeLength(void *font, const unsigned char *string);
#endif
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 17)
GLUTAPI float APIENTRY glutStrokeWidthf(void *font, int character);
GLUTAPI float APIENTRY glutStrokeLengthf(void *font, const unsigned char *string);
#endif
/* GLUT pre-built models sub-API */
GLUTAPI void APIENTRY glutWireSphere(GLdouble radius, GLint slices, GLint stacks);
GLUTAPI void APIENTRY glutSolidSphere(GLdouble radius, GLint slices, GLint stacks);
GLUTAPI void APIENTRY glutWireCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
GLUTAPI void APIENTRY glutSolidCone(GLdouble base, GLdouble height, GLint slices, GLint stacks);
GLUTAPI void APIENTRY glutWireCube(GLdouble size);
GLUTAPI void APIENTRY glutSolidCube(GLdouble size);
GLUTAPI void APIENTRY glutWireTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
GLUTAPI void APIENTRY glutSolidTorus(GLdouble innerRadius, GLdouble outerRadius, GLint sides, GLint rings);
GLUTAPI void APIENTRY glutWireDodecahedron(void);
GLUTAPI void APIENTRY glutSolidDodecahedron(void);
GLUTAPI void APIENTRY glutWireTeapot(GLdouble size);
GLUTAPI void APIENTRY glutSolidTeapot(GLdouble size);
GLUTAPI void APIENTRY glutWireOctahedron(void);
GLUTAPI void APIENTRY glutSolidOctahedron(void);
GLUTAPI void APIENTRY glutWireTetrahedron(void);
GLUTAPI void APIENTRY glutSolidTetrahedron(void);
GLUTAPI void APIENTRY glutWireIcosahedron(void);
GLUTAPI void APIENTRY glutSolidIcosahedron(void);
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 9)
/* GLUT video resize sub-API. */
GLUTAPI int APIENTRY glutVideoResizeGet(GLenum param);
GLUTAPI void APIENTRY glutSetupVideoResizing(void);
GLUTAPI void APIENTRY glutStopVideoResizing(void);
GLUTAPI void APIENTRY glutVideoResize(int x, int y, int width, int height);
GLUTAPI void APIENTRY glutVideoPan(int x, int y, int width, int height);
/* GLUT debugging sub-API. */
GLUTAPI void APIENTRY glutReportErrors(void);
#endif
#if (GLUT_API_VERSION >= 4 || GLUT_XLIB_IMPLEMENTATION >= 13)
/* GLUT device control sub-API. */
/* glutSetKeyRepeat modes. */
#define GLUT_KEY_REPEAT_OFF 0
#define GLUT_KEY_REPEAT_ON 1
#define GLUT_KEY_REPEAT_DEFAULT 2
/* Joystick button masks. */
#define GLUT_JOYSTICK_BUTTON_A 1
#define GLUT_JOYSTICK_BUTTON_B 2
#define GLUT_JOYSTICK_BUTTON_C 4
#define GLUT_JOYSTICK_BUTTON_D 8
GLUTAPI void APIENTRY glutIgnoreKeyRepeat(int ignore);
GLUTAPI void APIENTRY glutSetKeyRepeat(int repeatMode);
GLUTAPI void APIENTRY glutForceJoystickFunc(void);
/* GLUT game mode sub-API. */
/* glutGameModeGet. */
#define GLUT_GAME_MODE_ACTIVE ((GLenum) 0)
#define GLUT_GAME_MODE_POSSIBLE ((GLenum) 1)
#define GLUT_GAME_MODE_WIDTH ((GLenum) 2)
#define GLUT_GAME_MODE_HEIGHT ((GLenum) 3)
#define GLUT_GAME_MODE_PIXEL_DEPTH ((GLenum) 4)
#define GLUT_GAME_MODE_REFRESH_RATE ((GLenum) 5)
#define GLUT_GAME_MODE_DISPLAY_CHANGED ((GLenum) 6)
GLUTAPI void APIENTRY glutGameModeString(const char *string);
GLUTAPI int APIENTRY glutEnterGameMode(void);
GLUTAPI void APIENTRY glutLeaveGameMode(void);
GLUTAPI int APIENTRY glutGameModeGet(GLenum mode);
#endif
#ifdef __cplusplus
}
#endif
#ifdef GLUT_APIENTRY_DEFINED
# undef GLUT_APIENTRY_DEFINED
# undef APIENTRY
#endif
#ifdef GLUT_WINGDIAPI_DEFINED
# undef GLUT_WINGDIAPI_DEFINED
# undef WINGDIAPI
#endif
#ifdef GLUT_DEFINED___CDECL
# undef GLUT_DEFINED___CDECL
# undef __cdecl
#endif
#ifdef GLUT_DEFINED__CRTIMP
# undef GLUT_DEFINED__CRTIMP
# undef _CRTIMP
#endif
#endif /* __glut_h__ */
#ifndef __rad_h_
#define __rad_h_
/*
** Copyright 1998-2014, NVIDIA Corporation.
** All Rights Reserved.
**
** THE INFORMATION CONTAINED HEREIN IS PROPRIETARY AND CONFIDENTIAL TO
** NVIDIA, CORPORATION. USE, REPRODUCTION OR DISCLOSURE TO ANY THIRD PARTY
** IS SUBJECT TO WRITTEN PRE-APPROVAL BY NVIDIA, CORPORATION.
*/
#ifndef RADAPIENTRY
# ifdef _WIN32
# if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) /* Mimic <windef.h> */
# define RADAPIENTRY __stdcall
# else
# define RADAPIENTRY
# endif
# else
# define RADAPIENTRY
# endif
#endif
#ifndef RADAPI
# if defined(__GNUC__)
# define RADAPI extern __attribute__ ((visibility ("default")))
# else
# define RADAPI extern
# endif
#endif
#ifndef RADAPIENTRYP
# define RADAPIENTRYP RADAPIENTRY *
#endif
/*************************************************************/
typedef unsigned char RADboolean;
typedef unsigned int RADbitfield;
typedef signed char RADbyte;
typedef short RADshort;
typedef int RADint;
typedef int RADsizei;
typedef unsigned char RADubyte;
typedef unsigned short RADushort;
typedef unsigned int RADuint;
typedef float RADfloat;
typedef double RADdouble;
typedef void RADvoid;
# if defined(_WIN64)
typedef __int64 RADintptr;
typedef __int64 RADsizeiptr;
# elif defined(__LP64__)
typedef long int RADintptr;
typedef long int RADsizeiptr;
# else
typedef int RADintptr;
typedef int RADsizeiptr;
# endif
typedef char RADchar;
typedef signed long long RADint64;
typedef unsigned long long RADuint64;
typedef struct __RADdevice *RADdevice;
typedef struct __RADqueue *RADqueue;
typedef struct __RADpipeline *RADpipeline;
typedef struct __RADcommandBuffer *RADcommandBuffer;
typedef struct __RADcolorState *RADcolorState;
typedef struct __RADdepthStencilState *RADdepthStencilState;
typedef struct __RADvertexState *RADvertexState;
typedef struct __RADrasterState *RADrasterState;
typedef struct __RADrtFormatState *RADrtFormatState;
typedef struct __RADprogram *RADprogram;
typedef struct __RADbuffer *RADbuffer;
typedef struct __RADtexture *RADtexture;
typedef struct __RADsampler *RADsampler;
typedef struct __RADpass *RADpass;
typedef struct __RADsync *RADsync;
typedef struct RADbindGroupElement {
RADuint64 handle;
RADuint offset;
RADuint length;
} RADbindGroupElement;
typedef struct RADoffset2D {
RADint x, y;
} RADoffset2D;
typedef struct RADrect2D {
RADint x, y, width, height;
} RADrect2D;
typedef RADuint64 RADvertexHandle;
typedef RADuint64 RADindexHandle;
typedef RADuint64 RADuniformHandle;
typedef RADuint64 RADpipelineHandle;
typedef RADuint64 RADcommandHandle;
typedef RADuint64 RADtextureHandle;
typedef RADuint64 RADrenderTargetHandle;
typedef RADuint64 RADbindGroupHandle;
typedef void (*RADPROC)(void);
typedef enum {
RAD_TAG_AUTO = 0,
RAD_TAG_MANUAL = 1,
} RADtagMode;
typedef enum {
RAD_QUEUE_TYPE_GRAPHICS_AND_COMPUTE = 0,
RAD_QUEUE_TYPE_GRAPHICS = 1,
RAD_QUEUE_TYPE_COMPUTE = 2,
RAD_QUEUE_TYPE_COPY = 3,
} RADqueueType;
typedef enum {
RAD_PIPELINE_TYPE_GRAPHICS = 0,
} RADpipelineType;
typedef enum {
RAD_PROGRAM_FORMAT_GLSL = 0,
} RADprogramFormat;
typedef enum {
RAD_TEXTURE_1D = 0x0000,
RAD_TEXTURE_2D = 0x0001,
RAD_TEXTURE_3D = 0x0002,
RAD_TEXTURE_1D_ARRAY = 0x0003,
RAD_TEXTURE_2D_ARRAY = 0x0004,
RAD_TEXTURE_2D_MULTISAMPLE = 0x0005,
RAD_TEXTURE_2D_MULTISAMPLE_ARRAY = 0x0006,
RAD_TEXTURE_RECTANGLE = 0x0007,
RAD_TEXTURE_CUBEMAP = 0x0008,
RAD_TEXTURE_CUBEMAP_ARRAY = 0x0009,
} RADtextureTarget;
typedef enum {
RAD_RGBA8 = 0x8058,
RAD_DEPTH24_STENCIL8 = 0x88F0,
} RADinternalFormat;
typedef enum {
RAD_BLEND_FUNC_ZERO = 0x0000,
RAD_BLEND_FUNC_ONE = 0x0001,
RAD_BLEND_FUNC_SRC_COLOR = 0x0002,
RAD_BLEND_FUNC_ONE_MINUS_SRC_COLOR = 0x0003,
RAD_BLEND_FUNC_DST_COLOR = 0x0004,
RAD_BLEND_FUNC_ONE_MINUS_DST_COLOR = 0x0005,
RAD_BLEND_FUNC_SRC_ALPHA = 0x0006,
RAD_BLEND_FUNC_ONE_MINUS_SRC_ALPHA = 0x0007,
RAD_BLEND_FUNC_DST_ALPHA = 0x0008,
RAD_BLEND_FUNC_ONE_MINUS_DST_ALPHA = 0x0009,
RAD_BLEND_FUNC_SRC_ALPHA_SATURATE = 0x000A,
RAD_BLEND_FUNC_CONSTANT_COLOR = 0x000B,
RAD_BLEND_FUNC_ONE_MINUS_CONSTANT_COLOR = 0x000C,
RAD_BLEND_FUNC_CONSTANT_ALPHA = 0x000D,
RAD_BLEND_FUNC_ONE_MINUS_CONSTANT_ALPHA = 0x000E,
RAD_BLEND_FUNC_SRC1_COLOR = 0x000F,
RAD_BLEND_FUNC_ONE_MINUS_SRC1_COLOR = 0x0010,
RAD_BLEND_FUNC_SRC1_ALPHA = 0x0011,
RAD_BLEND_FUNC_ONE_MINUS_SRC1_ALPHA = 0x0012,
} RADblendFunc;
typedef enum {
RAD_BLEND_EQUATION_ADD = 0x0000,
RAD_BLEND_EQUATION_MIN = 0x0001,
RAD_BLEND_EQUATION_MAX = 0x0002,
RAD_BLEND_EQUATION_SUB = 0x0003,
RAD_BLEND_EQUATION_REVERSE_SUB = 0x0004,
} RADblendEquation;
typedef enum {
RAD_LOGIC_OP_CLEAR = 0x0000,
RAD_LOGIC_OP_AND = 0x0001,
RAD_LOGIC_OP_AND_REVERSE = 0x0002,
RAD_LOGIC_OP_COPY = 0x0003,
RAD_LOGIC_OP_AND_INVERTED = 0x0004,
RAD_LOGIC_OP_NOOP = 0x0005,
RAD_LOGIC_OP_XOR = 0x0006,
RAD_LOGIC_OP_OR = 0x0007,
RAD_LOGIC_OP_NOR = 0x0008,
RAD_LOGIC_OP_EQUIV = 0x0009,
RAD_LOGIC_OP_INVERT = 0x000A,
RAD_LOGIC_OP_OR_REVERSE = 0x000B,
RAD_LOGIC_OP_COPY_INVERTED = 0x000C,
RAD_LOGIC_OP_OR_INVERTED = 0x000D,
RAD_LOGIC_OP_NAND = 0x000E,
RAD_LOGIC_OP_SET = 0x000F,
} RADlogicOp;
typedef enum {
RAD_COLOR_DYNAMIC_BLEND_COLOR = 0x0000,
} RADcolorDynamic;
typedef enum {
RAD_ATTRIB_TYPE_SNORM = 0x0000,
RAD_ATTRIB_TYPE_UNORM = 0x0001,
RAD_ATTRIB_TYPE_INT = 0x0002,
RAD_ATTRIB_TYPE_UNSIGNED_INT = 0x0003,
RAD_ATTRIB_TYPE_INT_TO_FLOAT = 0x0004,
RAD_ATTRIB_TYPE_UNSIGNED_INT_TO_FLOAT = 0x0005,
RAD_ATTRIB_TYPE_FLOAT = 0x0006,
RAD_ATTRIB_TYPE_SNORM_2_10_10_10_REV = 0x0007,
RAD_ATTRIB_TYPE_UNORM_2_10_10_10_REV = 0x0008,
RAD_ATTRIB_TYPE_INT_TO_FLOAT_2_10_10_10_REV = 0x0009,
RAD_ATTRIB_TYPE_UNSIGNED_INT_TO_FLOAT_2_10_10_10_REV = 0x000A,
RAD_ATTRIB_TYPE_10F_11F_11F_REV = 0x000B,
} RADattribType;
typedef enum {
RAD_TRIANGLES = 0x0004,
} RADprimitiveType;
typedef enum {
RAD_INDEX_UNSIGNED_BYTE = 0x0000,
RAD_INDEX_UNSIGNED_SHORT = 0x0001,
RAD_INDEX_UNSIGNED_INT = 0x0002,
} RADindexType;
typedef enum {
RAD_DEPTH_FUNC_NEVER = 0x0000,
RAD_DEPTH_FUNC_LESS = 0x0001,
RAD_DEPTH_FUNC_EQUAL = 0x0002,
RAD_DEPTH_FUNC_LEQUAL = 0x0003,
RAD_DEPTH_FUNC_GREATER = 0x0004,
RAD_DEPTH_FUNC_NOTEQUAL = 0x0005,
RAD_DEPTH_FUNC_GEQUAL = 0x0006,
RAD_DEPTH_FUNC_ALWAYS = 0x0007,
} RADdepthFunc;
typedef enum {
RAD_MAG_FILTER_NEAREST = 0x0000,
RAD_MAG_FILTER_LINEAR = 0x0001,
} RADmagFilter;
typedef enum {
RAD_MIN_FILTER_NEAREST = 0x0000,
RAD_MIN_FILTER_LINEAR = 0x0001,
RAD_MIN_FILTER_NEAREST_MIPMAP_NEAREST = 0x0002,
RAD_MIN_FILTER_LINEAR_MIPMAP_NEAREST = 0x0003,
RAD_MIN_FILTER_NEAREST_MIPMAP_LINEAR = 0x0004,
RAD_MIN_FILTER_LINEAR_MIPMAP_LINEAR = 0x0005,
} RADminFilter;
// TODO: Figure out the correct subset of wrap modes to support
typedef enum {
RAD_WRAP_MODE_CLAMP = 0x0000,
RAD_WRAP_MODE_REPEAT = 0x0001,
RAD_WRAP_MODE_MIRROR_CLAMP = 0x0002,
RAD_WRAP_MODE_MIRROR_CLAMP_TO_EDGE = 0x0003,
RAD_WRAP_MODE_MIRROR_CLAMP_TO_BORDER = 0x0004,
RAD_WRAP_MODE_CLAMP_TO_BORDER = 0x0005,
RAD_WRAP_MODE_MIRRORED_REPEAT = 0x0006,
RAD_WRAP_MODE_CLAMP_TO_EDGE = 0x0007,
} RADwrapMode;
typedef enum {
RAD_COMPARE_MODE_NONE = 0x0000,
RAD_COMPARE_MODE_COMPARE_R_TO_TEXTURE = 0x0001,
} RADcompareMode;
typedef enum {
RAD_COMPARE_FUNC_NEVER = 0x0000,
RAD_COMPARE_FUNC_LESS = 0x0001,
RAD_COMPARE_FUNC_EQUAL = 0x0002,
RAD_COMPARE_FUNC_LEQUAL = 0x0003,
RAD_COMPARE_FUNC_GREATER = 0x0004,
RAD_COMPARE_FUNC_NOTEQUAL = 0x0005,
RAD_COMPARE_FUNC_GEQUAL = 0x0006,
RAD_COMPARE_FUNC_ALWAYS = 0x0007,
} RADcompareFunc;
typedef enum {
RAD_FACE_NONE = 0x0000,
RAD_FACE_FRONT = 0x0001,
RAD_FACE_BACK = 0x0002,
RAD_FACE_FRONT_AND_BACK = 0x0003,
} RADfaceBitfield;
typedef enum {
RAD_STENCIL_FUNC_NEVER = 0x0000,
RAD_STENCIL_FUNC_LESS = 0x0001,
RAD_STENCIL_FUNC_EQUAL = 0x0002,
RAD_STENCIL_FUNC_LEQUAL = 0x0003,
RAD_STENCIL_FUNC_GREATER = 0x0004,
RAD_STENCIL_FUNC_NOTEQUAL = 0x0005,
RAD_STENCIL_FUNC_GEQUAL = 0x0006,
RAD_STENCIL_FUNC_ALWAYS = 0x0007,
} RADstencilFunc;
typedef enum {
RAD_STENCIL_OP_KEEP = 0x0000,
RAD_STENCIL_OP_ZERO = 0x0001,
RAD_STENCIL_OP_REPLACE = 0x0002,
RAD_STENCIL_OP_INCR = 0x0003,
RAD_STENCIL_OP_DECR = 0x0004,
RAD_STENCIL_OP_INVERT = 0x0005,
RAD_STENCIL_OP_INCR_WRAP = 0x0006,
RAD_STENCIL_OP_DECR_WRAP = 0x0007,
} RADstencilOp;
typedef enum {
// Both faces must either be dynamic or static
RAD_DEPTH_STENCIL_DYNAMIC_STENCIL_VALUE_MASK = 0x0000,
RAD_DEPTH_STENCIL_DYNAMIC_STENCIL_MASK = 0x0001,
RAD_DEPTH_STENCIL_DYNAMIC_STENCIL_REF = 0x0002,
} RADdepthStencilDynamic;
typedef enum {
RAD_FRONT_FACE_CW = 0x0000,
RAD_FRONT_FACE_CCW = 0x0001,
} RADfrontFace;
typedef enum {
RAD_POLYGON_MODE_POINT = 0x0000,
RAD_POLYGON_MODE_LINE = 0x0001,
RAD_POLYGON_MODE_FILL = 0x0002,
} RADpolygonMode;
typedef enum {
RAD_POLYGON_OFFSET_POINT = 0x0001,
RAD_POLYGON_OFFSET_LINE = 0x0002,
RAD_POLYGON_OFFSET_FILL = 0x0004,
} RADpolygonOffsetEnables;
typedef enum {
RAD_RASTER_DYNAMIC_POINT_SIZE = 0x0000,
RAD_RASTER_DYNAMIC_LINE_WIDTH = 0x0001,
RAD_RASTER_DYNAMIC_POLYGON_OFFSET_CLAMP = 0x0002,
RAD_RASTER_DYNAMIC_SAMPLEMASK = 0x0003,
} RADrasterDynamic;
typedef enum {
RAD_RT_ATTACHMENT_DEPTH = 0x0000,
RAD_RT_ATTACHMENT_STENCIL = 0x0001,
RAD_RT_ATTACHMENT_COLOR0 = 0x0002,
RAD_RT_ATTACHMENT_COLOR1 = 0x0003,
RAD_RT_ATTACHMENT_COLOR2 = 0x0004,
RAD_RT_ATTACHMENT_COLOR3 = 0x0005,
RAD_RT_ATTACHMENT_COLOR4 = 0x0006,
RAD_RT_ATTACHMENT_COLOR5 = 0x0007,
RAD_RT_ATTACHMENT_COLOR6 = 0x0008,
RAD_RT_ATTACHMENT_COLOR7 = 0x0009,
} RADrtAttachment;
typedef enum {
RAD_SYNC_ALL_GPU_COMMANDS_COMPLETE = 0x0000,
RAD_SYNC_GRAPHICS_WORLD_SPACE_COMPLETE = 0x0001,
} RADsyncCondition;
typedef enum {
RAD_WAIT_SYNC_ALREADY_SIGNALED = 0x0000,
RAD_WAIT_SYNC_CONDITION_SATISFIED = 0x0001,
RAD_WAIT_SYNC_TIMEOUT_EXPIRED = 0x0002,
RAD_WAIT_SYNC_FAILED = 0x0003,
} RADwaitSyncResult;
typedef enum {
RAD_TOKEN_NOP = 0x0000,
RAD_TOKEN_BIND_GRAPHICS_PIPELINE = 0x0001,
RAD_TOKEN_BIND_GROUP = 0x0002,
RAD_TOKEN_DRAW_ARRAYS = 0x0003,
RAD_TOKEN_DRAW_ELEMENTS = 0x0004,
RAD_TOKEN_STENCIL_VALUE_MASK = 0x0005,
RAD_TOKEN_STENCIL_MASK = 0x0006,
RAD_TOKEN_STENCIL_REF = 0x0007,
RAD_TOKEN_BLEND_COLOR = 0x0008,
RAD_TOKEN_POINT_SIZE = 0x0009,
RAD_TOKEN_LINE_WIDTH = 0x000A,
RAD_TOKEN_POLYGON_OFFSET_CLAMP = 0x000B,
RAD_TOKEN_SAMPLE_MASK = 0x000C,
} RADtokenName;
// XXX TODO: May need some ifdefs to make this pragma more portable
#pragma pack(push, 4)
typedef struct RADtokenBindGraphicsPipeline {
RADuint64 pipelineHandle;
} RADtokenBindGraphicsPipeline;
typedef struct RADtokenBindGroup {
RADuint stages;
RADuint group;
RADuint64 groupHandle;
RADuint offset;
RADuint count;
} RADtokenBindGroup;
typedef struct RADtokenDrawArrays {
RADuint mode;
RADuint first;
RADuint count;
} RADtokenDrawArrays;
typedef struct RADtokenDrawElements {
RADuint64 indexHandle;
RADuint offset;
RADuint mode;
RADuint type;
RADuint count;
} RADtokenDrawElements;
typedef struct RADtokenBlendColor {
RADfloat color[4];
} RADtokenBlendColor;
typedef struct RADtokenStencilValueMask {
RADuint faces;
RADuint mask;
} RADtokenStencilValueMask;
typedef struct RADtokenStencilMask {
RADuint faces;
RADuint mask;
} RADtokenStencilMask;
typedef struct RADtokenStencilRef {
RADuint faces;
RADint ref;
} RADtokenStencilRef;
typedef struct RADtokenPointSize {
RADfloat pointSize;
} RADtokenPointSize;
typedef struct RADtokenLineWidth {
RADfloat lineWidth;
} RADtokenLineWidth;
typedef struct RADtokenPolygonOffsetClamp {
RADfloat factor;
RADfloat units;
RADfloat clamp;
} RADtokenPolygonOffsetClamp;
typedef struct RADtokenSampleMask {
RADuint mask;
} RADtokenSampleMask;
#pragma pack(pop)
#define RAD_FALSE 0x0000
#define RAD_TRUE 0x0001
#define RAD_VERTEX_ACCESS_BIT 0x00000001
#define RAD_UNIFORM_ACCESS_BIT 0x00000002
#define RAD_SHADER_STORAGE_ACCESS_BIT 0x00000004
#define RAD_INDEX_ACCESS_BIT 0x00000008
#define RAD_BINDGROUP_ACCESS_BIT 0x00000010
#define RAD_COPY_READ_ACCESS_BIT 0x00000020
#define RAD_COPY_WRITE_ACCESS_BIT 0x00000040
#define RAD_TEXTURE_ACCESS_BIT 0x00000080
#define RAD_RENDER_TARGET_ACCESS_BIT 0x00000100
#define RAD_IMAGE_ACCESS_BIT 0x00000200
#define RAD_MAP_READ_BIT 0x0001
#define RAD_MAP_WRITE_BIT 0x0002
#define RAD_MAP_PERSISTENT_BIT 0x0040
#define RAD_MAP_COHERENT_BIT 0x0080
#define RAD_VERTEX_SHADER_BIT 0x00000001
#define RAD_FRAGMENT_SHADER_BIT 0x00000002
#define RAD_GEOMETRY_SHADER_BIT 0x00000004
#define RAD_TESS_CONTROL_SHADER_BIT 0x00000008
#define RAD_TESS_EVALUATION_SHADER_BIT 0x00000010
#define RAD_SYNC_FLAG_FLUSH_FOR_CPU 0x00000001
#ifndef RAD_VERSION_1_0
#define RAD_VERSION_1_0 1
#ifdef RAD_PROTOTYPES
RADAPI RADPROC RADAPIENTRY radGetProcAddress (const RADchar *name);
RADAPI RADdevice RADAPIENTRY radCreateDevice (void);
RADAPI void RADAPIENTRY radReferenceDevice (RADdevice device);
RADAPI void RADAPIENTRY radReleaseDevice (RADdevice device);
RADAPI RADuint RADAPIENTRY radGetTokenHeader (RADdevice device, RADtokenName name);
RADAPI RADqueue RADAPIENTRY radCreateQueue (RADdevice device, RADqueueType queuetype);
RADAPI void RADAPIENTRY radReferenceQueue (RADqueue queue);
RADAPI void RADAPIENTRY radReleaseQueue (RADqueue queue);
RADAPI void RADAPIENTRY radQueueTagBuffer (RADqueue queue, RADbuffer buffer);
RADAPI void RADAPIENTRY radQueueTagTexture (RADqueue queue, RADtexture texture);
RADAPI void RADAPIENTRY radQueueSubmitCommands (RADqueue queue, RADuint numCommands, const RADcommandHandle *handles);
RADAPI void RADAPIENTRY radFlushQueue (RADqueue queue);
RADAPI void RADAPIENTRY radFinishQueue (RADqueue queue);
RADAPI void RADAPIENTRY radQueueViewport (RADqueue queue, RADint x, RADint y, RADint w, RADint h);
RADAPI void RADAPIENTRY radQueueScissor (RADqueue queue, RADint x, RADint y, RADint w, RADint h);
RADAPI void RADAPIENTRY radQueueCopyBufferToImage (RADqueue queue, RADbuffer buffer, RADintptr bufferOffset, RADtexture texture, RADint level, RADuint xoffset, RADuint yoffset, RADuint zoffset, RADsizei width, RADsizei height, RADsizei depth);
RADAPI void RADAPIENTRY radQueueCopyImageToBuffer (RADqueue queue, RADbuffer buffer, RADintptr bufferOffset, RADtexture texture, RADint level, RADuint xoffset, RADuint yoffset, RADuint zoffset, RADsizei width, RADsizei height, RADsizei depth);
RADAPI void RADAPIENTRY radQueueCopyBuffer (RADqueue queue, RADbuffer srcBuffer, RADintptr srcOffset, RADbuffer dstBuffer, RADintptr dstOffset, RADsizei size);
RADAPI void RADAPIENTRY radQueueClearColor (RADqueue queue, RADuint index, const RADfloat *color);
RADAPI void RADAPIENTRY radQueueClearDepth (RADqueue queue, RADfloat depth);
RADAPI void RADAPIENTRY radQueueClearStencil (RADqueue queue, RADuint stencil);
RADAPI void RADAPIENTRY radQueuePresent (RADqueue queue, RADtexture texture);
RADAPI void RADAPIENTRY radQueueDrawArrays (RADqueue queue, RADprimitiveType mode, RADint first, RADsizei count);
RADAPI void RADAPIENTRY radQueueDrawElements (RADqueue queue, RADprimitiveType mode, RADindexType type, RADsizei count, RADindexHandle indexHandle, RADuint offset);
RADAPI void RADAPIENTRY radQueueBindPipeline (RADqueue queue, RADpipelineType pipelineType, RADpipelineHandle pipelineHandle);
RADAPI void RADAPIENTRY radQueueBindGroup (RADqueue queue, RADbitfield stages, RADuint group, RADuint count, RADbindGroupHandle groupHandle, RADuint offset);
RADAPI void RADAPIENTRY radQueueBeginPass (RADqueue queue, RADpass pass);
RADAPI void RADAPIENTRY radQueueEndPass (RADqueue queue, RADpass pass);
RADAPI void RADAPIENTRY radQueueSubmitDynamic (RADqueue queue, const void *dynamic, RADsizei length);
RADAPI void RADAPIENTRY radQueueStencilValueMask (RADqueue queue, RADfaceBitfield faces, RADuint mask);
RADAPI void RADAPIENTRY radQueueStencilMask (RADqueue queue, RADfaceBitfield faces, RADuint mask);
RADAPI void RADAPIENTRY radQueueStencilRef (RADqueue queue, RADfaceBitfield faces, RADint ref);
RADAPI void RADAPIENTRY radQueueBlendColor (RADqueue queue, const RADfloat *blendColor);
RADAPI void RADAPIENTRY radQueuePointSize (RADqueue queue, RADfloat pointSize);
RADAPI void RADAPIENTRY radQueueLineWidth (RADqueue queue, RADfloat lineWidth);
RADAPI void RADAPIENTRY radQueuePolygonOffsetClamp (RADqueue queue, RADfloat factor, RADfloat units, RADfloat clamp);
RADAPI void RADAPIENTRY radQueueSampleMask (RADqueue queue, RADuint mask);
RADAPI RADprogram RADAPIENTRY radCreateProgram (RADdevice device);
RADAPI void RADAPIENTRY radReferenceProgram (RADprogram program);
RADAPI void RADAPIENTRY radReleaseProgram (RADprogram program);
RADAPI void RADAPIENTRY radProgramSource (RADprogram program, RADprogramFormat format, RADsizei length, const void *source);
RADAPI RADbuffer RADAPIENTRY radCreateBuffer (RADdevice device);
RADAPI void RADAPIENTRY radReferenceBuffer (RADbuffer buffer);
RADAPI void RADAPIENTRY radReleaseBuffer (RADbuffer buffer, RADtagMode tagMode);
RADAPI void RADAPIENTRY radBufferAccess (RADbuffer buffer, RADbitfield access);
RADAPI void RADAPIENTRY radBufferMapAccess (RADbuffer buffer, RADbitfield mapAccess);
RADAPI void RADAPIENTRY radBufferStorage (RADbuffer buffer, RADsizei size);
RADAPI void* RADAPIENTRY radMapBuffer (RADbuffer buffer);
RADAPI RADvertexHandle RADAPIENTRY radGetVertexHandle (RADbuffer buffer);
RADAPI RADindexHandle RADAPIENTRY radGetIndexHandle (RADbuffer buffer);
RADAPI RADuniformHandle RADAPIENTRY radGetUniformHandle (RADbuffer buffer);
RADAPI RADbindGroupHandle RADAPIENTRY radGetBindGroupHandle (RADbuffer buffer);
RADAPI RADtexture RADAPIENTRY radCreateTexture (RADdevice device);
RADAPI void RADAPIENTRY radReferenceTexture (RADtexture texture);
RADAPI void RADAPIENTRY radReleaseTexture (RADtexture texture, RADtagMode tagMode);
RADAPI void RADAPIENTRY radTextureAccess (RADtexture texture, RADbitfield access);
RADAPI void RADAPIENTRY radTextureStorage (RADtexture texture, RADtextureTarget target, RADsizei levels, RADinternalFormat internalFormat, RADsizei width, RADsizei height, RADsizei depth, RADsizei samples);
RADAPI RADtextureHandle RADAPIENTRY radGetTextureSamplerHandle (RADtexture texture, RADsampler sampler, RADtextureTarget target, RADinternalFormat internalFormat, RADuint minLevel, RADuint numLevels, RADuint minLayer, RADuint numLayers);
RADAPI RADrenderTargetHandle RADAPIENTRY radGetTextureRenderTargetHandle (RADtexture texture, RADtextureTarget target, RADinternalFormat internalFormat, RADuint level, RADuint minLayer, RADuint numLayers);
RADAPI RADsampler RADAPIENTRY radCreateSampler (RADdevice device);
RADAPI void RADAPIENTRY radReferenceSampler (RADsampler sampler);
RADAPI void RADAPIENTRY radReleaseSampler (RADsampler sampler);
RADAPI void RADAPIENTRY radSamplerDefault (RADsampler sampler);
RADAPI void RADAPIENTRY radSamplerMinMagFilter (RADsampler sampler, RADminFilter min, RADmagFilter mag);
RADAPI void RADAPIENTRY radSamplerWrapMode (RADsampler sampler, RADwrapMode s, RADwrapMode t, RADwrapMode r);
RADAPI void RADAPIENTRY radSamplerLodClamp (RADsampler sampler, RADfloat min, RADfloat max);
RADAPI void RADAPIENTRY radSamplerLodBias (RADsampler sampler, RADfloat bias);
RADAPI void RADAPIENTRY radSamplerCompare (RADsampler sampler, RADcompareMode mode, RADcompareFunc func);
RADAPI void RADAPIENTRY radSamplerBorderColorFloat (RADsampler sampler, const RADfloat *borderColor);
RADAPI void RADAPIENTRY radSamplerBorderColorInt (RADsampler sampler, const RADuint *borderColor);
RADAPI RADcolorState RADAPIENTRY radCreateColorState (RADdevice device);
RADAPI void RADAPIENTRY radReferenceColorState (RADcolorState color);
RADAPI void RADAPIENTRY radReleaseColorState (RADcolorState color);
RADAPI void RADAPIENTRY radColorDefault (RADcolorState color);
RADAPI void RADAPIENTRY radColorBlendEnable (RADcolorState color, RADuint index, RADboolean enable);
RADAPI void RADAPIENTRY radColorBlendFunc (RADcolorState color, RADuint index, RADblendFunc srcFunc, RADblendFunc dstFunc, RADblendFunc srcFuncAlpha, RADblendFunc dstFuncAlpha);
RADAPI void RADAPIENTRY radColorBlendEquation (RADcolorState color, RADuint index, RADblendEquation modeRGB, RADblendEquation modeAlpha);
RADAPI void RADAPIENTRY radColorMask (RADcolorState color, RADuint index, RADboolean r, RADboolean g, RADboolean b, RADboolean a);
RADAPI void RADAPIENTRY radColorNumTargets (RADcolorState color, RADuint numTargets);
RADAPI void RADAPIENTRY radColorLogicOpEnable (RADcolorState color, RADboolean enable);
RADAPI void RADAPIENTRY radColorLogicOp (RADcolorState color, RADlogicOp logicOp);
RADAPI void RADAPIENTRY radColorAlphaToCoverageEnable (RADcolorState color, RADboolean enable);
RADAPI void RADAPIENTRY radColorBlendColor (RADcolorState color, const RADfloat *blendColor);
RADAPI void RADAPIENTRY radColorDynamic (RADcolorState color, RADcolorDynamic dynamic, RADboolean enable);
RADAPI RADrasterState RADAPIENTRY radCreateRasterState (RADdevice device);
RADAPI void RADAPIENTRY radReferenceRasterState (RADrasterState raster);
RADAPI void RADAPIENTRY radReleaseRasterState (RADrasterState raster);
RADAPI void RADAPIENTRY radRasterDefault (RADrasterState raster);
RADAPI void RADAPIENTRY radRasterPointSize (RADrasterState raster, RADfloat pointSize);
RADAPI void RADAPIENTRY radRasterLineWidth (RADrasterState raster, RADfloat lineWidth);
RADAPI void RADAPIENTRY radRasterCullFace (RADrasterState raster, RADfaceBitfield face);
RADAPI void RADAPIENTRY radRasterFrontFace (RADrasterState raster, RADfrontFace face);
RADAPI void RADAPIENTRY radRasterPolygonMode (RADrasterState raster, RADpolygonMode polygonMode);
RADAPI void RADAPIENTRY radRasterPolygonOffsetClamp (RADrasterState raster, RADfloat factor, RADfloat units, RADfloat clamp);
RADAPI void RADAPIENTRY radRasterPolygonOffsetEnables (RADrasterState raster, RADpolygonOffsetEnables enables);
RADAPI void RADAPIENTRY radRasterDiscardEnable (RADrasterState raster, RADboolean enable);
RADAPI void RADAPIENTRY radRasterMultisampleEnable (RADrasterState raster, RADboolean enable);
RADAPI void RADAPIENTRY radRasterSamples (RADrasterState raster, RADuint samples);
RADAPI void RADAPIENTRY radRasterSampleMask (RADrasterState raster, RADuint mask);
RADAPI void RADAPIENTRY radRasterDynamic (RADrasterState raster, RADrasterDynamic dynamic, RADboolean enable);
RADAPI RADdepthStencilState RADAPIENTRY radCreateDepthStencilState (RADdevice device);
RADAPI void RADAPIENTRY radReferenceDepthStencilState (RADdepthStencilState depthStencil);
RADAPI void RADAPIENTRY radReleaseDepthStencilState (RADdepthStencilState depthStencil);
RADAPI void RADAPIENTRY radDepthStencilDefault (RADdepthStencilState depthStencil);
RADAPI void RADAPIENTRY radDepthStencilDepthTestEnable (RADdepthStencilState depthStencil, RADboolean enable);
RADAPI void RADAPIENTRY radDepthStencilDepthWriteEnable (RADdepthStencilState depthStencil, RADboolean enable);
RADAPI void RADAPIENTRY radDepthStencilDepthFunc (RADdepthStencilState depthStencil, RADdepthFunc func);
RADAPI void RADAPIENTRY radDepthStencilStencilTestEnable (RADdepthStencilState depthStencil, RADboolean enable);
RADAPI void RADAPIENTRY radDepthStencilStencilFunc (RADdepthStencilState depthStencil, RADfaceBitfield faces, RADstencilFunc func, RADint ref, RADuint mask);
RADAPI void RADAPIENTRY radDepthStencilStencilOp (RADdepthStencilState depthStencil, RADfaceBitfield faces, RADstencilOp fail, RADstencilOp depthFail, RADstencilOp depthPass);
RADAPI void RADAPIENTRY radDepthStencilStencilMask (RADdepthStencilState depthStencil, RADfaceBitfield faces, RADuint mask);
RADAPI void RADAPIENTRY radDepthStencilDynamic (RADdepthStencilState depthStencil, RADdepthStencilDynamic dynamic, RADboolean enable);
RADAPI RADvertexState RADAPIENTRY radCreateVertexState (RADdevice device);
RADAPI void RADAPIENTRY radReferenceVertexState (RADvertexState vertex);
RADAPI void RADAPIENTRY radReleaseVertexState (RADvertexState vertex);
RADAPI void RADAPIENTRY radVertexDefault (RADvertexState vertex);
RADAPI void RADAPIENTRY radVertexAttribFormat (RADvertexState vertex, RADint attribIndex, RADint numComponents, RADint bytesPerComponent, RADattribType type, RADuint relativeOffset);
RADAPI void RADAPIENTRY radVertexAttribBinding (RADvertexState vertex, RADint attribIndex, RADint bindingIndex);
RADAPI void RADAPIENTRY radVertexBindingGroup (RADvertexState vertex, RADint bindingIndex, RADint group, RADint index);
RADAPI void RADAPIENTRY radVertexAttribEnable (RADvertexState vertex, RADint attribIndex, RADboolean enable);
RADAPI void RADAPIENTRY radVertexBindingStride (RADvertexState vertex, RADint bindingIndex, RADuint stride);
RADAPI RADrtFormatState RADAPIENTRY radCreateRtFormatState (RADdevice device);
RADAPI void RADAPIENTRY radReferenceRtFormatState (RADrtFormatState rtFormat);
RADAPI void RADAPIENTRY radReleaseRtFormatState (RADrtFormatState rtFormat);
RADAPI void RADAPIENTRY radRtFormatDefault (RADrtFormatState rtFormat);
RADAPI void RADAPIENTRY radRtFormatColorFormat (RADrtFormatState rtFormat, RADuint index, RADinternalFormat format);
RADAPI void RADAPIENTRY radRtFormatDepthFormat (RADrtFormatState rtFormat, RADinternalFormat format);
RADAPI void RADAPIENTRY radRtFormatStencilFormat (RADrtFormatState rtFormat, RADinternalFormat format);
RADAPI void RADAPIENTRY radRtFormatColorSamples (RADrtFormatState rtFormat, RADuint samples);
RADAPI void RADAPIENTRY radRtFormatDepthStencilSamples (RADrtFormatState rtFormat, RADuint samples);
RADAPI RADpipeline RADAPIENTRY radCreatePipeline (RADdevice device, RADpipelineType pipelineType);
RADAPI void RADAPIENTRY radReferencePipeline (RADpipeline pipeline);
RADAPI void RADAPIENTRY radReleasePipeline (RADpipeline pipeline);
RADAPI void RADAPIENTRY radPipelineProgramStages (RADpipeline pipeline, RADbitfield stages, RADprogram program);
RADAPI void RADAPIENTRY radPipelineVertexState (RADpipeline pipeline, RADvertexState vertex);
RADAPI void RADAPIENTRY radPipelineColorState (RADpipeline pipeline, RADcolorState color);
RADAPI void RADAPIENTRY radPipelineRasterState (RADpipeline pipeline, RADrasterState raster);
RADAPI void RADAPIENTRY radPipelineDepthStencilState (RADpipeline pipeline, RADdepthStencilState depthStencil);
RADAPI void RADAPIENTRY radPipelineRtFormatState (RADpipeline pipeline, RADrtFormatState rtFormat);
RADAPI void RADAPIENTRY radPipelinePrimitiveType (RADpipeline pipeline, RADprimitiveType mode);
RADAPI void RADAPIENTRY radCompilePipeline (RADpipeline pipeline);
RADAPI RADpipelineHandle RADAPIENTRY radGetPipelineHandle (RADpipeline pipeline);
RADAPI RADcommandBuffer RADAPIENTRY radCreateCommandBuffer (RADdevice device, RADqueueType queueType);
RADAPI void RADAPIENTRY radReferenceCommandBuffer (RADcommandBuffer cmdBuf);
RADAPI void RADAPIENTRY radReleaseCommandBuffer (RADcommandBuffer cmdBuf);
RADAPI void RADAPIENTRY radCmdBindPipeline (RADcommandBuffer cmdBuf, RADpipelineType pipelineType, RADpipelineHandle pipelineHandle);
RADAPI void RADAPIENTRY radCmdBindGroup (RADcommandBuffer cmdBuf, RADbitfield stages, RADuint group, RADuint count, RADbindGroupHandle groupHandle, RADuint offset);
RADAPI void RADAPIENTRY radCmdDrawArrays (RADcommandBuffer cmdBuf, RADprimitiveType mode, RADint first, RADsizei count);
RADAPI void RADAPIENTRY radCmdDrawElements (RADcommandBuffer cmdBuf, RADprimitiveType mode, RADindexType type, RADsizei count, RADindexHandle indexHandle, RADuint offset);
RADAPI RADboolean RADAPIENTRY radCompileCommandBuffer (RADcommandBuffer cmdBuf);
RADAPI RADcommandHandle RADAPIENTRY radGetCommandHandle (RADcommandBuffer cmdBuf);
RADAPI void RADAPIENTRY radCmdStencilValueMask (RADcommandBuffer cmdBuf, RADfaceBitfield faces, RADuint mask);
RADAPI void RADAPIENTRY radCmdStencilMask (RADcommandBuffer cmdBuf, RADfaceBitfield faces, RADuint mask);
RADAPI void RADAPIENTRY radCmdStencilRef (RADcommandBuffer cmdBuf, RADfaceBitfield faces, RADint ref);
RADAPI void RADAPIENTRY radCmdBlendColor (RADcommandBuffer cmdBuf, const RADfloat *blendColor);
RADAPI void RADAPIENTRY radCmdPointSize (RADcommandBuffer cmdBuf, RADfloat pointSize);
RADAPI void RADAPIENTRY radCmdLineWidth (RADcommandBuffer cmdBuf, RADfloat lineWidth);
RADAPI void RADAPIENTRY radCmdPolygonOffsetClamp (RADcommandBuffer cmdBuf, RADfloat factor, RADfloat units, RADfloat clamp);
RADAPI void RADAPIENTRY radCmdSampleMask (RADcommandBuffer cmdBuf, RADuint mask);
RADAPI RADpass RADAPIENTRY radCreatePass (RADdevice device);
RADAPI void RADAPIENTRY radReferencePass (RADpass pass);
RADAPI void RADAPIENTRY radReleasePass (RADpass pass);
RADAPI void RADAPIENTRY radPassDefault (RADpass pass);
RADAPI void RADAPIENTRY radCompilePass (RADpass pass);
RADAPI void RADAPIENTRY radPassRenderTargets (RADpass pass, RADuint numColors, const RADrenderTargetHandle *colors, RADrenderTargetHandle depth, RADrenderTargetHandle stencil);
RADAPI void RADAPIENTRY radPassPreserveEnable (RADpass pass, RADrtAttachment attachment, RADboolean enable);
RADAPI void RADAPIENTRY radPassDiscard (RADpass pass, RADuint numTextures, const RADtexture *textures, const RADoffset2D *offsets);
RADAPI void RADAPIENTRY radPassResolve (RADpass pass, RADrtAttachment attachment, RADtexture texture);
RADAPI void RADAPIENTRY radPassStore (RADpass pass, RADuint numTextures, const RADtexture *textures, const RADoffset2D *offsets);
RADAPI void RADAPIENTRY radPassClip (RADpass pass, const RADrect2D *rect);
RADAPI void RADAPIENTRY radPassDependencies (RADpass pass, RADuint numPasses, const RADpass *otherPasses, const RADbitfield *srcMask, const RADbitfield *dstMask, const RADbitfield *flushMask, const RADbitfield *invalidateMask);
RADAPI void RADAPIENTRY radPassTilingBoundary (RADpass pass, RADboolean boundary);
RADAPI void RADAPIENTRY radPassTileFilterWidth (RADpass pass, RADuint filterWidth, RADuint filterHeight);
RADAPI void RADAPIENTRY radPassTileFootprint (RADpass pass, RADuint bytesPerPixel, RADuint maxFilterWidth, RADuint maxFilterHeight);
RADAPI RADsync RADAPIENTRY radCreateSync (RADdevice device);
RADAPI void RADAPIENTRY radReferenceSync (RADsync sync);
RADAPI void RADAPIENTRY radReleaseSync (RADsync sync);
RADAPI void RADAPIENTRY radQueueFenceSync (RADqueue queue, RADsync sync, RADsyncCondition condition, RADbitfield flags);
RADAPI RADwaitSyncResult RADAPIENTRY radWaitSync (RADsync sync, RADuint64 timeout);
RADAPI RADboolean RADAPIENTRY radQueueWaitSync (RADqueue queue, RADsync sync);
#endif /* RAD_PROTOTYPES */
typedef RADPROC (RADAPIENTRYP PFNRADGETPROCADDRESSPROC) (const RADchar *name);
typedef RADdevice (RADAPIENTRYP PFNRADCREATEDEVICEPROC) (void);
typedef void (RADAPIENTRYP PFNRADREFERENCEDEVICEPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADRELEASEDEVICEPROC) (RADdevice device);
typedef RADuint (RADAPIENTRYP PFNRADGETTOKENHEADERPROC) (RADdevice device, RADtokenName name);
typedef RADqueue (RADAPIENTRYP PFNRADCREATEQUEUEPROC) (RADdevice device, RADqueueType queuetype);
typedef void (RADAPIENTRYP PFNRADREFERENCEQUEUEPROC) (RADqueue queue);
typedef void (RADAPIENTRYP PFNRADRELEASEQUEUEPROC) (RADqueue queue);
typedef void (RADAPIENTRYP PFNRADQUEUETAGBUFFERPROC) (RADqueue queue, RADbuffer buffer);
typedef void (RADAPIENTRYP PFNRADQUEUETAGTEXTUREPROC) (RADqueue queue, RADtexture texture);
typedef void (RADAPIENTRYP PFNRADQUEUESUBMITCOMMANDSPROC) (RADqueue queue, RADuint numCommands, const RADcommandHandle *handles);
typedef void (RADAPIENTRYP PFNRADFLUSHQUEUEPROC) (RADqueue queue);
typedef void (RADAPIENTRYP PFNRADFINISHQUEUEPROC) (RADqueue queue);
typedef void (RADAPIENTRYP PFNRADQUEUEVIEWPORTPROC) (RADqueue queue, RADint x, RADint y, RADint w, RADint h);
typedef void (RADAPIENTRYP PFNRADQUEUESCISSORPROC) (RADqueue queue, RADint x, RADint y, RADint w, RADint h);
typedef void (RADAPIENTRYP PFNRADQUEUECOPYBUFFERTOIMAGEPROC) (RADqueue queue, RADbuffer buffer, RADintptr bufferOffset, RADtexture texture, RADint level, RADuint xoffset, RADuint yoffset, RADuint zoffset, RADsizei width, RADsizei height, RADsizei depth);
typedef void (RADAPIENTRYP PFNRADQUEUECOPYIMAGETOBUFFERPROC) (RADqueue queue, RADbuffer buffer, RADintptr bufferOffset, RADtexture texture, RADint level, RADuint xoffset, RADuint yoffset, RADuint zoffset, RADsizei width, RADsizei height, RADsizei depth);
typedef void (RADAPIENTRYP PFNRADQUEUECOPYBUFFERPROC) (RADqueue queue, RADbuffer srcBuffer, RADintptr srcOffset, RADbuffer dstBuffer, RADintptr dstOffset, RADsizei size);
typedef void (RADAPIENTRYP PFNRADQUEUECLEARCOLORPROC) (RADqueue queue, RADuint index, const RADfloat *color);
typedef void (RADAPIENTRYP PFNRADQUEUECLEARDEPTHPROC) (RADqueue queue, RADfloat depth);
typedef void (RADAPIENTRYP PFNRADQUEUECLEARSTENCILPROC) (RADqueue queue, RADuint stencil);
typedef void (RADAPIENTRYP PFNRADQUEUEPRESENTPROC) (RADqueue queue, RADtexture texture);
typedef void (RADAPIENTRYP PFNRADQUEUEDRAWARRAYSPROC) (RADqueue queue, RADprimitiveType mode, RADint first, RADsizei count);
typedef void (RADAPIENTRYP PFNRADQUEUEDRAWELEMENTSPROC) (RADqueue queue, RADprimitiveType mode, RADindexType type, RADsizei count, RADindexHandle indexHandle, RADuint offset);
typedef void (RADAPIENTRYP PFNRADQUEUEBINDPIPELINEPROC) (RADqueue queue, RADpipelineType pipelineType, RADpipelineHandle pipelineHandle);
typedef void (RADAPIENTRYP PFNRADQUEUEBINDGROUPPROC) (RADqueue queue, RADbitfield stages, RADuint group, RADuint count, RADbindGroupHandle groupHandle, RADuint offset);
typedef void (RADAPIENTRYP PFNRADQUEUEBEGINPASSPROC) (RADqueue queue, RADpass pass);
typedef void (RADAPIENTRYP PFNRADQUEUEENDPASSPROC) (RADqueue queue, RADpass pass);
typedef void (RADAPIENTRYP PFNRADQUEUESUBMITDYNAMICPROC) (RADqueue queue, const void *dynamic, RADsizei length);
typedef void (RADAPIENTRYP PFNRADQUEUESTENCILVALUEMASKPROC) (RADqueue queue, RADfaceBitfield faces, RADuint mask);
typedef void (RADAPIENTRYP PFNRADQUEUESTENCILMASKPROC) (RADqueue queue, RADfaceBitfield faces, RADuint mask);
typedef void (RADAPIENTRYP PFNRADQUEUESTENCILREFPROC) (RADqueue queue, RADfaceBitfield faces, RADint ref);
typedef void (RADAPIENTRYP PFNRADQUEUEBLENDCOLORPROC) (RADqueue queue, const RADfloat *blendColor);
typedef void (RADAPIENTRYP PFNRADQUEUEPOINTSIZEPROC) (RADqueue queue, RADfloat pointSize);
typedef void (RADAPIENTRYP PFNRADQUEUELINEWIDTHPROC) (RADqueue queue, RADfloat lineWidth);
typedef void (RADAPIENTRYP PFNRADQUEUEPOLYGONOFFSETCLAMPPROC) (RADqueue queue, RADfloat factor, RADfloat units, RADfloat clamp);
typedef void (RADAPIENTRYP PFNRADQUEUESAMPLEMASKPROC) (RADqueue queue, RADuint mask);
typedef RADprogram (RADAPIENTRYP PFNRADCREATEPROGRAMPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADREFERENCEPROGRAMPROC) (RADprogram program);
typedef void (RADAPIENTRYP PFNRADRELEASEPROGRAMPROC) (RADprogram program);
typedef void (RADAPIENTRYP PFNRADPROGRAMSOURCEPROC) (RADprogram program, RADprogramFormat format, RADsizei length, const void *source);
typedef RADbuffer (RADAPIENTRYP PFNRADCREATEBUFFERPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADREFERENCEBUFFERPROC) (RADbuffer buffer);
typedef void (RADAPIENTRYP PFNRADRELEASEBUFFERPROC) (RADbuffer buffer, RADtagMode tagMode);
typedef void (RADAPIENTRYP PFNRADBUFFERACCESSPROC) (RADbuffer buffer, RADbitfield access);
typedef void (RADAPIENTRYP PFNRADBUFFERMAPACCESSPROC) (RADbuffer buffer, RADbitfield mapAccess);
typedef void (RADAPIENTRYP PFNRADBUFFERSTORAGEPROC) (RADbuffer buffer, RADsizei size);
typedef void* (RADAPIENTRYP PFNRADMAPBUFFERPROC) (RADbuffer buffer);
typedef RADvertexHandle (RADAPIENTRYP PFNRADGETVERTEXHANDLEPROC) (RADbuffer buffer);
typedef RADindexHandle (RADAPIENTRYP PFNRADGETINDEXHANDLEPROC) (RADbuffer buffer);
typedef RADuniformHandle (RADAPIENTRYP PFNRADGETUNIFORMHANDLEPROC) (RADbuffer buffer);
typedef RADbindGroupHandle (RADAPIENTRYP PFNRADGETBINDGROUPHANDLEPROC) (RADbuffer buffer);
typedef RADtexture (RADAPIENTRYP PFNRADCREATETEXTUREPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADREFERENCETEXTUREPROC) (RADtexture texture);
typedef void (RADAPIENTRYP PFNRADRELEASETEXTUREPROC) (RADtexture texture, RADtagMode tagMode);
typedef void (RADAPIENTRYP PFNRADTEXTUREACCESSPROC) (RADtexture texture, RADbitfield access);
typedef void (RADAPIENTRYP PFNRADTEXTURESTORAGEPROC) (RADtexture texture, RADtextureTarget target, RADsizei levels, RADinternalFormat internalFormat, RADsizei width, RADsizei height, RADsizei depth, RADsizei samples);
typedef RADtextureHandle (RADAPIENTRYP PFNRADGETTEXTURESAMPLERHANDLEPROC) (RADtexture texture, RADsampler sampler, RADtextureTarget target, RADinternalFormat internalFormat, RADuint minLevel, RADuint numLevels, RADuint minLayer, RADuint numLayers);
typedef RADrenderTargetHandle (RADAPIENTRYP PFNRADGETTEXTURERENDERTARGETHANDLEPROC) (RADtexture texture, RADtextureTarget target, RADinternalFormat internalFormat, RADuint level, RADuint minLayer, RADuint numLayers);
typedef RADsampler (RADAPIENTRYP PFNRADCREATESAMPLERPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADREFERENCESAMPLERPROC) (RADsampler sampler);
typedef void (RADAPIENTRYP PFNRADRELEASESAMPLERPROC) (RADsampler sampler);
typedef void (RADAPIENTRYP PFNRADSAMPLERDEFAULTPROC) (RADsampler sampler);
typedef void (RADAPIENTRYP PFNRADSAMPLERMINMAGFILTERPROC) (RADsampler sampler, RADminFilter min, RADmagFilter mag);
typedef void (RADAPIENTRYP PFNRADSAMPLERWRAPMODEPROC) (RADsampler sampler, RADwrapMode s, RADwrapMode t, RADwrapMode r);
typedef void (RADAPIENTRYP PFNRADSAMPLERLODCLAMPPROC) (RADsampler sampler, RADfloat min, RADfloat max);
typedef void (RADAPIENTRYP PFNRADSAMPLERLODBIASPROC) (RADsampler sampler, RADfloat bias);
typedef void (RADAPIENTRYP PFNRADSAMPLERCOMPAREPROC) (RADsampler sampler, RADcompareMode mode, RADcompareFunc func);
typedef void (RADAPIENTRYP PFNRADSAMPLERBORDERCOLORFLOATPROC) (RADsampler sampler, const RADfloat *borderColor);
typedef void (RADAPIENTRYP PFNRADSAMPLERBORDERCOLORINTPROC) (RADsampler sampler, const RADuint *borderColor);
typedef RADcolorState (RADAPIENTRYP PFNRADCREATECOLORSTATEPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADREFERENCECOLORSTATEPROC) (RADcolorState color);
typedef void (RADAPIENTRYP PFNRADRELEASECOLORSTATEPROC) (RADcolorState color);
typedef void (RADAPIENTRYP PFNRADCOLORDEFAULTPROC) (RADcolorState color);
typedef void (RADAPIENTRYP PFNRADCOLORBLENDENABLEPROC) (RADcolorState color, RADuint index, RADboolean enable);
typedef void (RADAPIENTRYP PFNRADCOLORBLENDFUNCPROC) (RADcolorState color, RADuint index, RADblendFunc srcFunc, RADblendFunc dstFunc, RADblendFunc srcFuncAlpha, RADblendFunc dstFuncAlpha);
typedef void (RADAPIENTRYP PFNRADCOLORBLENDEQUATIONPROC) (RADcolorState color, RADuint index, RADblendEquation modeRGB, RADblendEquation modeAlpha);
typedef void (RADAPIENTRYP PFNRADCOLORMASKPROC) (RADcolorState color, RADuint index, RADboolean r, RADboolean g, RADboolean b, RADboolean a);
typedef void (RADAPIENTRYP PFNRADCOLORNUMTARGETSPROC) (RADcolorState color, RADuint numTargets);
typedef void (RADAPIENTRYP PFNRADCOLORLOGICOPENABLEPROC) (RADcolorState color, RADboolean enable);
typedef void (RADAPIENTRYP PFNRADCOLORLOGICOPPROC) (RADcolorState color, RADlogicOp logicOp);
typedef void (RADAPIENTRYP PFNRADCOLORALPHATOCOVERAGEENABLEPROC) (RADcolorState color, RADboolean enable);
typedef void (RADAPIENTRYP PFNRADCOLORBLENDCOLORPROC) (RADcolorState color, const RADfloat *blendColor);
typedef void (RADAPIENTRYP PFNRADCOLORDYNAMICPROC) (RADcolorState color, RADcolorDynamic dynamic, RADboolean enable);
typedef RADrasterState (RADAPIENTRYP PFNRADCREATERASTERSTATEPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADREFERENCERASTERSTATEPROC) (RADrasterState raster);
typedef void (RADAPIENTRYP PFNRADRELEASERASTERSTATEPROC) (RADrasterState raster);
typedef void (RADAPIENTRYP PFNRADRASTERDEFAULTPROC) (RADrasterState raster);
typedef void (RADAPIENTRYP PFNRADRASTERPOINTSIZEPROC) (RADrasterState raster, RADfloat pointSize);
typedef void (RADAPIENTRYP PFNRADRASTERLINEWIDTHPROC) (RADrasterState raster, RADfloat lineWidth);
typedef void (RADAPIENTRYP PFNRADRASTERCULLFACEPROC) (RADrasterState raster, RADfaceBitfield face);
typedef void (RADAPIENTRYP PFNRADRASTERFRONTFACEPROC) (RADrasterState raster, RADfrontFace face);
typedef void (RADAPIENTRYP PFNRADRASTERPOLYGONMODEPROC) (RADrasterState raster, RADpolygonMode polygonMode);
typedef void (RADAPIENTRYP PFNRADRASTERPOLYGONOFFSETCLAMPPROC) (RADrasterState raster, RADfloat factor, RADfloat units, RADfloat clamp);
typedef void (RADAPIENTRYP PFNRADRASTERPOLYGONOFFSETENABLESPROC) (RADrasterState raster, RADpolygonOffsetEnables enables);
typedef void (RADAPIENTRYP PFNRADRASTERDISCARDENABLEPROC) (RADrasterState raster, RADboolean enable);
typedef void (RADAPIENTRYP PFNRADRASTERMULTISAMPLEENABLEPROC) (RADrasterState raster, RADboolean enable);
typedef void (RADAPIENTRYP PFNRADRASTERSAMPLESPROC) (RADrasterState raster, RADuint samples);
typedef void (RADAPIENTRYP PFNRADRASTERSAMPLEMASKPROC) (RADrasterState raster, RADuint mask);
typedef void (RADAPIENTRYP PFNRADRASTERDYNAMICPROC) (RADrasterState raster, RADrasterDynamic dynamic, RADboolean enable);
typedef RADdepthStencilState (RADAPIENTRYP PFNRADCREATEDEPTHSTENCILSTATEPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADREFERENCEDEPTHSTENCILSTATEPROC) (RADdepthStencilState depthStencil);
typedef void (RADAPIENTRYP PFNRADRELEASEDEPTHSTENCILSTATEPROC) (RADdepthStencilState depthStencil);
typedef void (RADAPIENTRYP PFNRADDEPTHSTENCILDEFAULTPROC) (RADdepthStencilState depthStencil);
typedef void (RADAPIENTRYP PFNRADDEPTHSTENCILDEPTHTESTENABLEPROC) (RADdepthStencilState depthStencil, RADboolean enable);
typedef void (RADAPIENTRYP PFNRADDEPTHSTENCILDEPTHWRITEENABLEPROC) (RADdepthStencilState depthStencil, RADboolean enable);
typedef void (RADAPIENTRYP PFNRADDEPTHSTENCILDEPTHFUNCPROC) (RADdepthStencilState depthStencil, RADdepthFunc func);
typedef void (RADAPIENTRYP PFNRADDEPTHSTENCILSTENCILTESTENABLEPROC) (RADdepthStencilState depthStencil, RADboolean enable);
typedef void (RADAPIENTRYP PFNRADDEPTHSTENCILSTENCILFUNCPROC) (RADdepthStencilState depthStencil, RADfaceBitfield faces, RADstencilFunc func, RADint ref, RADuint mask);
typedef void (RADAPIENTRYP PFNRADDEPTHSTENCILSTENCILOPPROC) (RADdepthStencilState depthStencil, RADfaceBitfield faces, RADstencilOp fail, RADstencilOp depthFail, RADstencilOp depthPass);
typedef void (RADAPIENTRYP PFNRADDEPTHSTENCILSTENCILMASKPROC) (RADdepthStencilState depthStencil, RADfaceBitfield faces, RADuint mask);
typedef void (RADAPIENTRYP PFNRADDEPTHSTENCILDYNAMICPROC) (RADdepthStencilState depthStencil, RADdepthStencilDynamic dynamic, RADboolean enable);
typedef RADvertexState (RADAPIENTRYP PFNRADCREATEVERTEXSTATEPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADREFERENCEVERTEXSTATEPROC) (RADvertexState vertex);
typedef void (RADAPIENTRYP PFNRADRELEASEVERTEXSTATEPROC) (RADvertexState vertex);
typedef void (RADAPIENTRYP PFNRADVERTEXDEFAULTPROC) (RADvertexState vertex);
typedef void (RADAPIENTRYP PFNRADVERTEXATTRIBFORMATPROC) (RADvertexState vertex, RADint attribIndex, RADint numComponents, RADint bytesPerComponent, RADattribType type, RADuint relativeOffset);
typedef void (RADAPIENTRYP PFNRADVERTEXATTRIBBINDINGPROC) (RADvertexState vertex, RADint attribIndex, RADint bindingIndex);
typedef void (RADAPIENTRYP PFNRADVERTEXBINDINGGROUPPROC) (RADvertexState vertex, RADint bindingIndex, RADint group, RADint index);
typedef void (RADAPIENTRYP PFNRADVERTEXATTRIBENABLEPROC) (RADvertexState vertex, RADint attribIndex, RADboolean enable);
typedef void (RADAPIENTRYP PFNRADVERTEXBINDINGSTRIDEPROC) (RADvertexState vertex, RADint bindingIndex, RADuint stride);
typedef RADrtFormatState (RADAPIENTRYP PFNRADCREATERTFORMATSTATEPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADREFERENCERTFORMATSTATEPROC) (RADrtFormatState rtFormat);
typedef void (RADAPIENTRYP PFNRADRELEASERTFORMATSTATEPROC) (RADrtFormatState rtFormat);
typedef void (RADAPIENTRYP PFNRADRTFORMATDEFAULTPROC) (RADrtFormatState rtFormat);
typedef void (RADAPIENTRYP PFNRADRTFORMATCOLORFORMATPROC) (RADrtFormatState rtFormat, RADuint index, RADinternalFormat format);
typedef void (RADAPIENTRYP PFNRADRTFORMATDEPTHFORMATPROC) (RADrtFormatState rtFormat, RADinternalFormat format);
typedef void (RADAPIENTRYP PFNRADRTFORMATSTENCILFORMATPROC) (RADrtFormatState rtFormat, RADinternalFormat format);
typedef void (RADAPIENTRYP PFNRADRTFORMATCOLORSAMPLESPROC) (RADrtFormatState rtFormat, RADuint samples);
typedef void (RADAPIENTRYP PFNRADRTFORMATDEPTHSTENCILSAMPLESPROC) (RADrtFormatState rtFormat, RADuint samples);
typedef RADpipeline (RADAPIENTRYP PFNRADCREATEPIPELINEPROC) (RADdevice device, RADpipelineType pipelineType);
typedef void (RADAPIENTRYP PFNRADREFERENCEPIPELINEPROC) (RADpipeline pipeline);
typedef void (RADAPIENTRYP PFNRADRELEASEPIPELINEPROC) (RADpipeline pipeline);
typedef void (RADAPIENTRYP PFNRADPIPELINEPROGRAMSTAGESPROC) (RADpipeline pipeline, RADbitfield stages, RADprogram program);
typedef void (RADAPIENTRYP PFNRADPIPELINEVERTEXSTATEPROC) (RADpipeline pipeline, RADvertexState vertex);
typedef void (RADAPIENTRYP PFNRADPIPELINECOLORSTATEPROC) (RADpipeline pipeline, RADcolorState color);
typedef void (RADAPIENTRYP PFNRADPIPELINERASTERSTATEPROC) (RADpipeline pipeline, RADrasterState raster);
typedef void (RADAPIENTRYP PFNRADPIPELINEDEPTHSTENCILSTATEPROC) (RADpipeline pipeline, RADdepthStencilState depthStencil);
typedef void (RADAPIENTRYP PFNRADPIPELINERTFORMATSTATEPROC) (RADpipeline pipeline, RADrtFormatState rtFormat);
typedef void (RADAPIENTRYP PFNRADPIPELINEPRIMITIVETYPEPROC) (RADpipeline pipeline, RADprimitiveType mode);
typedef void (RADAPIENTRYP PFNRADCOMPILEPIPELINEPROC) (RADpipeline pipeline);
typedef RADpipelineHandle (RADAPIENTRYP PFNRADGETPIPELINEHANDLEPROC) (RADpipeline pipeline);
typedef RADcommandBuffer (RADAPIENTRYP PFNRADCREATECOMMANDBUFFERPROC) (RADdevice device, RADqueueType queueType);
typedef void (RADAPIENTRYP PFNRADREFERENCECOMMANDBUFFERPROC) (RADcommandBuffer cmdBuf);
typedef void (RADAPIENTRYP PFNRADRELEASECOMMANDBUFFERPROC) (RADcommandBuffer cmdBuf);
typedef void (RADAPIENTRYP PFNRADCMDBINDPIPELINEPROC) (RADcommandBuffer cmdBuf, RADpipelineType pipelineType, RADpipelineHandle pipelineHandle);
typedef void (RADAPIENTRYP PFNRADCMDBINDGROUPPROC) (RADcommandBuffer cmdBuf, RADbitfield stages, RADuint group, RADuint count, RADbindGroupHandle groupHandle, RADuint offset);
typedef void (RADAPIENTRYP PFNRADCMDDRAWARRAYSPROC) (RADcommandBuffer cmdBuf, RADprimitiveType mode, RADint first, RADsizei count);
typedef void (RADAPIENTRYP PFNRADCMDDRAWELEMENTSPROC) (RADcommandBuffer cmdBuf, RADprimitiveType mode, RADindexType type, RADsizei count, RADindexHandle indexHandle, RADuint offset);
typedef RADboolean (RADAPIENTRYP PFNRADCOMPILECOMMANDBUFFERPROC) (RADcommandBuffer cmdBuf);
typedef RADcommandHandle (RADAPIENTRYP PFNRADGETCOMMANDHANDLEPROC) (RADcommandBuffer cmdBuf);
typedef void (RADAPIENTRYP PFNRADCMDSTENCILVALUEMASKPROC) (RADcommandBuffer cmdBuf, RADfaceBitfield faces, RADuint mask);
typedef void (RADAPIENTRYP PFNRADCMDSTENCILMASKPROC) (RADcommandBuffer cmdBuf, RADfaceBitfield faces, RADuint mask);
typedef void (RADAPIENTRYP PFNRADCMDSTENCILREFPROC) (RADcommandBuffer cmdBuf, RADfaceBitfield faces, RADint ref);
typedef void (RADAPIENTRYP PFNRADCMDBLENDCOLORPROC) (RADcommandBuffer cmdBuf, const RADfloat *blendColor);
typedef void (RADAPIENTRYP PFNRADCMDPOINTSIZEPROC) (RADcommandBuffer cmdBuf, RADfloat pointSize);
typedef void (RADAPIENTRYP PFNRADCMDLINEWIDTHPROC) (RADcommandBuffer cmdBuf, RADfloat lineWidth);
typedef void (RADAPIENTRYP PFNRADCMDPOLYGONOFFSETCLAMPPROC) (RADcommandBuffer cmdBuf, RADfloat factor, RADfloat units, RADfloat clamp);
typedef void (RADAPIENTRYP PFNRADCMDSAMPLEMASKPROC) (RADcommandBuffer cmdBuf, RADuint mask);
typedef RADpass (RADAPIENTRYP PFNRADCREATEPASSPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADREFERENCEPASSPROC) (RADpass pass);
typedef void (RADAPIENTRYP PFNRADRELEASEPASSPROC) (RADpass pass);
typedef void (RADAPIENTRYP PFNRADPASSDEFAULTPROC) (RADpass pass);
typedef void (RADAPIENTRYP PFNRADCOMPILEPASSPROC) (RADpass pass);
typedef void (RADAPIENTRYP PFNRADPASSRENDERTARGETSPROC) (RADpass pass, RADuint numColors, const RADrenderTargetHandle *colors, RADrenderTargetHandle depth, RADrenderTargetHandle stencil);
typedef void (RADAPIENTRYP PFNRADPASSPRESERVEENABLEPROC) (RADpass pass, RADrtAttachment attachment, RADboolean enable);
typedef void (RADAPIENTRYP PFNRADPASSDISCARDPROC) (RADpass pass, RADuint numTextures, const RADtexture *textures, const RADoffset2D *offsets);
typedef void (RADAPIENTRYP PFNRADPASSRESOLVEPROC) (RADpass pass, RADrtAttachment attachment, RADtexture texture);
typedef void (RADAPIENTRYP PFNRADPASSSTOREPROC) (RADpass pass, RADuint numTextures, const RADtexture *textures, const RADoffset2D *offsets);
typedef void (RADAPIENTRYP PFNRADPASSCLIPPROC) (RADpass pass, const RADrect2D *rect);
typedef void (RADAPIENTRYP PFNRADPASSDEPENDENCIESPROC) (RADpass pass, RADuint numPasses, const RADpass *otherPasses, const RADbitfield *srcMask, const RADbitfield *dstMask, const RADbitfield *flushMask, const RADbitfield *invalidateMask);
typedef void (RADAPIENTRYP PFNRADPASSTILINGBOUNDARYPROC) (RADpass pass, RADboolean boundary);
typedef void (RADAPIENTRYP PFNRADPASSTILEFILTERWIDTHPROC) (RADpass pass, RADuint filterWidth, RADuint filterHeight);
typedef void (RADAPIENTRYP PFNRADPASSTILEFOOTPRINTPROC) (RADpass pass, RADuint bytesPerPixel, RADuint maxFilterWidth, RADuint maxFilterHeight);
typedef RADsync (RADAPIENTRYP PFNRADCREATESYNCPROC) (RADdevice device);
typedef void (RADAPIENTRYP PFNRADREFERENCESYNCPROC) (RADsync sync);
typedef void (RADAPIENTRYP PFNRADRELEASESYNCPROC) (RADsync sync);
typedef void (RADAPIENTRYP PFNRADQUEUEFENCESYNCPROC) (RADqueue queue, RADsync sync, RADsyncCondition condition, RADbitfield flags);
typedef RADwaitSyncResult (RADAPIENTRYP PFNRADWAITSYNCPROC) (RADsync sync, RADuint64 timeout);
typedef RADboolean (RADAPIENTRYP PFNRADQUEUEWAITSYNCPROC) (RADqueue queue, RADsync sync);
#endif
#endif /* __rad_h_ */
// rad.cpp : Initialize GLUT, initalize the RAD emulation layer, and test RAD
#include "glut.h"
void reshape(int w, int h)
{
}
void display(void)
{
extern void TestRAD(void);
TestRAD();
glutSwapBuffers();
}
void glutKey( unsigned char key, int x, int y )
{
if( key == '\033' ) {
exit(0);
}
glutPostRedisplay();
}
int main(int argc, char* argv[])
{
glutInit(&argc, (char **)argv);
glutInitDisplayString("double depth rgba stencil");
glutInitWindowSize (500, 500);
glutCreateWindow ((char *)argv[0]);
glutSetWindowTitle("RAD Test App");
glutReshapeFunc(reshape);
glutDisplayFunc(display);
glutKeyboardFunc(glutKey);
void InitRAD();
InitRAD();
glutMainLoop();
return 0;
}
#include "stdlib.h"
#include "rad.h"
#include "radfnptrinit.h"
#include "string.h"
#ifdef _WIN32
#include <windows.h>
#endif
#ifdef __linux__
#include <GL/glx.h>
#endif
#include <stdio.h>
#include <time.h>
RADdevice device;
RADqueue queue;
bool useCopyQueue = true;
RADqueue copyQueue;
static const char *vsstring =
"#version 440 core\n"
"#define BINDGROUP(GROUP,INDEX) layout(binding = ((INDEX) | ((GROUP) << 4)))\n"
"layout(location = 1) in vec4 tc;\n"
"layout(location = 0) in vec4 position;\n"
"BINDGROUP(0, 2) uniform Block {\n"
" vec4 scale;\n"
"};\n"
"out vec4 ftc;\n"
"void main() {\n"
" gl_Position = position*scale;\n"
// This line exists to trick the compiler into putting a value in the compiler
// constant bank, so we can exercise binding that bank
" if (scale.z != 1.0 + 1.0/65536.0) {\n"
" gl_Position = vec4(0,0,0,0);\n"
" }\n"
" ftc = tc;\n"
"}\n";
static const char *fsstring =
"#version 440 core\n"
"#define BINDGROUP(GROUP,INDEX) layout(binding = ((INDEX) | ((GROUP) << 4)))\n"
"BINDGROUP(0, 3) uniform sampler2D tex;\n"
"BINDGROUP(0, 2) uniform Block {\n"
" vec4 scale;\n"
"};\n"
"layout(location = 0) out vec4 color;\n"
"in vec4 ftc;\n"
"void main() {\n"
" color = texture(tex, ftc.xy);\n"
" if (scale.z != 1.0 + 1.0/65536.0) {\n"
" color = vec4(0,0,0,0);\n"
" }\n"
"}\n";
// Two triangles that intersect
static RADfloat vertexData[] = {-0.5f, -0.5f, 0.5f,
0.5f, -0.5f, 0.5f,
-0.5f, 0.5f, 0.5f,
0.5f, -0.5f, 0.5f,
-0.5f, -0.5f, 0.3f,
0.5f, 0.5f, 0.9f};
// Simple 0/1 texcoords in rgba8 format (used to be color data)
static RADubyte texcoordData[] = {0, 0, 0xFF, 0xFF,
0xFF, 0, 0, 0xFF,
0, 0xFF, 0, 0xFF,
0, 0, 0xFF, 0xFF,
0xFF, 0, 0, 0xFF,
0, 0xFF, 0, 0xFF};
int windowWidth = 500, windowHeight = 500;
int offscreenWidth = 100, offscreenHeight = 100;
typedef enum {
QUEUE,
TOKEN,
COMMAND,
} DrawMode;
DrawMode drawMode = COMMAND;
bool benchmark = false;
void InitRAD()
{
// obfuscated string for radGetProcAddress
#ifdef _WIN32
PFNRADGETPROCADDRESSPROC getProc = (PFNRADGETPROCADDRESSPROC)wglGetProcAddress("fs932040fd");
#elif __linux__
PFNRADGETPROCADDRESSPROC getProc = (PFNRADGETPROCADDRESSPROC)glXGetProcAddressARB((const GLubyte *)"fs932040fd");
#endif
radLoadProcs(getProc);
// Create the "global" device and one queue
device = radCreateDevice();
queue = radCreateQueue(device, RAD_QUEUE_TYPE_GRAPHICS_AND_COMPUTE);
if (useCopyQueue) {
copyQueue = radCreateQueue(device, RAD_QUEUE_TYPE_GRAPHICS_AND_COMPUTE);
}
}
#define USE_MULTISAMPLE 1
RADbuffer AllocAndFillBuffer(RADdevice device, void *data, int sizeofdata, RADbitfield access, bool useCopy)
{
if (useCopy) {
RADbuffer tempbo = radCreateBuffer(device);
radBufferAccess(tempbo, RAD_COPY_READ_ACCESS_BIT);
radBufferMapAccess(tempbo, RAD_MAP_WRITE_BIT | RAD_MAP_PERSISTENT_BIT);
radBufferStorage(tempbo, sizeofdata);
void *ptr = radMapBuffer(tempbo);
memcpy(ptr, data, sizeofdata);
RADbuffer buffer = radCreateBuffer(device);
radBufferAccess(buffer, access | RAD_COPY_WRITE_ACCESS_BIT);
radBufferMapAccess(buffer, 0);
radBufferStorage(buffer, sizeofdata);
radQueueCopyBuffer(useCopyQueue ? copyQueue : queue, tempbo, 0, buffer, 0, sizeofdata);
radReleaseBuffer(tempbo, RAD_TAG_AUTO);
return buffer;
} else {
RADbuffer buffer = radCreateBuffer(device);
radBufferAccess(buffer, access);
radBufferMapAccess(buffer, RAD_MAP_WRITE_BIT | RAD_MAP_PERSISTENT_BIT);
radBufferStorage(buffer, sizeofdata);
void *ptr = radMapBuffer(buffer);
memcpy(ptr, data, sizeofdata);
return buffer;
}
}
void TestRAD()
{
// Create programs from the device, provide them shader code and compile/link them
RADprogram pgm = radCreateProgram(device);
// XXX This is a hack because we don't have an IL. I'm just jamming through the strings
// as if they were an IL blob
const char *source[2] = {vsstring, fsstring};
radProgramSource(pgm, RAD_PROGRAM_FORMAT_GLSL, /*size*/2, (void *)source);
// Create new state vectors
RADcolorState color = radCreateColorState(device);
RADdepthStencilState depth = radCreateDepthStencilState(device);
RADvertexState vertex = radCreateVertexState(device);
RADrasterState raster = radCreateRasterState(device);
RADrtFormatState rtFormat = radCreateRtFormatState(device);
radRtFormatColorFormat(rtFormat, 0, RAD_RGBA8);
radRtFormatDepthFormat(rtFormat, RAD_DEPTH24_STENCIL8);
radDepthStencilDepthTestEnable(depth, RAD_TRUE);
radDepthStencilDepthWriteEnable(depth, RAD_TRUE);
radDepthStencilDepthFunc(depth, RAD_DEPTH_FUNC_LESS);
// Commented out experiments to test different state settings.
//radRasterDiscardEnable(raster, RAD_TRUE);
//radRasterPolygonMode(raster, RAD_POLYGON_MODE_LINE);
//radRasterLineWidth(raster, 10.0f);
//radColorBlendEnable(color, /*MRT index*/0, RAD_TRUE);
//radColorBlendFunc(color, /*MRT index*/0, RAD_BLEND_FUNC_ONE, RAD_BLEND_FUNC_ONE, RAD_BLEND_FUNC_ONE, RAD_BLEND_FUNC_ONE);
//radColorMask(color, /*MRT index*/0, RAD_TRUE, RAD_TRUE, RAD_TRUE, RAD_TRUE);
//radColorLogicOpEnable(color, RAD_TRUE);
//radColorLogicOp(color, RAD_LOGIC_OP_XOR);
// Set the state vector to use two vertex attributes.
//
// Interleaved pos+color
// position = attrib 0 = 3*float at relativeoffset 0
// texcoord = attrib 1 = rgba8 at relativeoffset 0
radVertexAttribFormat(vertex, 0, 3, sizeof(RADfloat), RAD_ATTRIB_TYPE_FLOAT, 0);
radVertexAttribFormat(vertex, 1, 4, sizeof(RADubyte), RAD_ATTRIB_TYPE_UNORM, 0);
radVertexAttribBinding(vertex, 0, 0);
radVertexAttribBinding(vertex, 1, 1);
radVertexBindingGroup(vertex, 0, /*group*/0, /*index*/0);
radVertexBindingGroup(vertex, 1, /*group*/0, /*index*/1);
radVertexAttribEnable(vertex, 0, RAD_TRUE);
radVertexAttribEnable(vertex, 1, RAD_TRUE);
radVertexBindingStride(vertex, 0, 12);
radVertexBindingStride(vertex, 1, 4);
// Create a pipeline.
RADpipeline pipeline = radCreatePipeline(device, RAD_PIPELINE_TYPE_GRAPHICS);
// Attach program and state objects to the pipeline.
radPipelineProgramStages(pipeline, RAD_VERTEX_SHADER_BIT | RAD_FRAGMENT_SHADER_BIT, pgm);
radPipelineColorState(pipeline, color);
radPipelineDepthStencilState(pipeline, depth);
radPipelineVertexState(pipeline, vertex);
radPipelineRasterState(pipeline, raster);
radPipelineRtFormatState(pipeline, rtFormat);
radPipelinePrimitiveType(pipeline, RAD_TRIANGLES);
// Create a vertex buffer and fill it with data
RADbuffer vbo = radCreateBuffer(device);
radBufferAccess(vbo, RAD_VERTEX_ACCESS_BIT);
radBufferMapAccess(vbo, RAD_MAP_WRITE_BIT | RAD_MAP_PERSISTENT_BIT);
radBufferStorage(vbo, sizeof(vertexData)+sizeof(texcoordData));
// create persistent mapping
void *ptr = radMapBuffer(vbo);
// fill ptr with vertex data followed by color data
memcpy(ptr, vertexData, sizeof(vertexData));
memcpy((char *)ptr + sizeof(vertexData), texcoordData, sizeof(texcoordData));
// Get a handle to be used for setting the buffer as a vertex buffer
RADvertexHandle vboHandle = radGetVertexHandle(vbo);
// Create an index buffer and fill it with data
unsigned short indexData[6] = {0, 1, 2, 3, 4, 5};
RADbuffer ibo = AllocAndFillBuffer(device, indexData, sizeof(indexData), RAD_INDEX_ACCESS_BIT, true);
// Get a handle to be used for setting the buffer as an index buffer
RADvertexHandle iboHandle = radGetVertexHandle(ibo);
float scale = 1.5f;
if (benchmark) {
scale = 0.2f;
}
float uboData[4] = {scale, scale, 1.0f + 1.0f/65536.0, 1.0f};
RADbuffer ubo = AllocAndFillBuffer(device, uboData, sizeof(uboData), RAD_UNIFORM_ACCESS_BIT, false);
// Get a handle to be used for setting the buffer as a uniform buffer
RADuniformHandle uboHandle = radGetUniformHandle(ubo);
#if USE_MULTISAMPLE
RADtexture rtTex = radCreateTexture(device);
radTextureAccess(rtTex, RAD_RENDER_TARGET_ACCESS_BIT);
radTextureStorage(rtTex, RAD_TEXTURE_2D_MULTISAMPLE, 1, RAD_RGBA8, offscreenWidth, offscreenHeight, 1, 4);
RADtexture depthTex = radCreateTexture(device);
radTextureAccess(depthTex, RAD_RENDER_TARGET_ACCESS_BIT);
radTextureStorage(depthTex, RAD_TEXTURE_2D_MULTISAMPLE, 1, RAD_DEPTH24_STENCIL8, offscreenWidth, offscreenHeight, 1, 4);
RADtexture tex1x = radCreateTexture(device);
radTextureAccess(tex1x, RAD_RENDER_TARGET_ACCESS_BIT);
radTextureStorage(tex1x, RAD_TEXTURE_2D, 1, RAD_RGBA8, offscreenWidth, offscreenHeight, 1, 0);
// Create and bind a rendertarget handle
RADrenderTargetHandle rtHandle = radGetTextureRenderTargetHandle(rtTex, RAD_TEXTURE_2D, RAD_RGBA8, 0, 0, 1);
RADrenderTargetHandle depthHandle = radGetTextureRenderTargetHandle(depthTex, RAD_TEXTURE_2D, RAD_DEPTH24_STENCIL8, 0, 0, 1);
radRasterSamples(raster, 4);
radRtFormatColorSamples(rtFormat, 4);
radRtFormatDepthStencilSamples(rtFormat, 4);
RADpass pass = radCreatePass(device);
radPassRenderTargets(pass, 1, &rtHandle, depthHandle, 0);
radPassResolve(pass, RAD_RT_ATTACHMENT_COLOR0, tex1x);
#else
RADtexture rtTex = radCreateTexture(device);
radTextureAccess(rtTex, RAD_RENDER_TARGET_ACCESS_BIT);
radTextureStorage(rtTex, RAD_TEXTURE_2D, 1, RAD_RGBA8, offscreenWidth, offscreenHeight, 1, 0);
RADtexture depthTex = radCreateTexture(device);
radTextureAccess(depthTex, RAD_RENDER_TARGET_ACCESS_BIT);
radTextureStorage(depthTex, RAD_TEXTURE_2D, 1, RAD_DEPTH24_STENCIL8, offscreenWidth, offscreenHeight, 1, 0);
// Create and bind a rendertarget handle
RADrenderTargetHandle rtHandle = radGetTextureRenderTargetHandle(rtTex, RAD_TEXTURE_2D, RAD_RGBA8, 0, 0, 1);
RADrenderTargetHandle depthHandle = radGetTextureRenderTargetHandle(depthTex, RAD_TEXTURE_2D, RAD_DEPTH24_STENCIL8, 0, 0, 1);
RADpass pass = radCreatePass(device);
radPassRenderTargets(pass, 1, &rtHandle, depthHandle, 0);
#endif
radCompilePass(pass);
radCompilePipeline(pipeline);
RADpipelineHandle pipelineHandle = radGetPipelineHandle(pipeline);
RADsampler sampler = radCreateSampler(device);
// Commented out experiments to test different state settings.
//radSamplerMinMagFilter(sampler, RAD_MIN_FILTER_NEAREST, RAD_MAG_FILTER_NEAREST);
const int texWidth = 4, texHeight = 4;
RADtexture texture = radCreateTexture(device);
radTextureAccess(texture, RAD_TEXTURE_ACCESS_BIT);
radTextureStorage(texture, RAD_TEXTURE_2D, 1, RAD_RGBA8, texWidth, texHeight, 1, 0);
RADtextureHandle texHandle = radGetTextureSamplerHandle(texture, sampler, RAD_TEXTURE_2D, RAD_RGBA8,
/*minLevel*/0, /*numLevels*/1, /*minLayer*/0, /*numLayers*/1);
RADbuffer pbo = radCreateBuffer(device);
radBufferAccess(pbo, RAD_COPY_READ_ACCESS_BIT);
radBufferMapAccess(pbo, RAD_MAP_WRITE_BIT | RAD_MAP_PERSISTENT_BIT);
radBufferStorage(pbo, texWidth*texHeight*4);
unsigned char *texdata = (unsigned char *)radMapBuffer(pbo);
// fill with texture data
for (int j = 0; j < texWidth; ++j) {
for (int i = 0; i < texHeight; ++i) {
texdata[4*(j*texWidth+i)+0] = 0xFF*((i+j)&1);
texdata[4*(j*texWidth+i)+1] = 0x00*((i+j)&1);
texdata[4*(j*texWidth+i)+2] = ~(0xFF*((i+j)&1));
texdata[4*(j*texWidth+i)+3] = 0xFF;
}
}
// XXX missing pixelpack object
// Download the texture data
radQueueCopyBufferToImage(queue, pbo, 0, texture, 0, 0, 0, 0, texWidth, texHeight, 1);
radQueueBeginPass(queue, pass);
// Some scissored clears
{
radQueueScissor(queue, 0, 0, offscreenWidth, offscreenHeight);
float clearColor[4] = {0, 0, 0, 1};
radQueueClearColor(queue, 0, clearColor);
radQueueClearDepth(queue, 1.0f);
}
{
radQueueScissor(queue, 0, 0, offscreenWidth/2, offscreenHeight/2);
float clearColor[4] = {0, 1, 0, 1};
radQueueClearColor(queue, 0, clearColor);
}
{
radQueueScissor(queue, offscreenWidth/2, offscreenHeight/2, offscreenWidth/2, offscreenHeight/2);
float clearColor[4] = {0, 0, 1, 1};
radQueueClearColor(queue, 0, clearColor);
}
radQueueScissor(queue, 0, 0, offscreenWidth, offscreenHeight);
radQueueViewport(queue, 0, 0, offscreenWidth, offscreenHeight);
RADbindGroupElement b[4] = {{vboHandle, 0, ~0}, {vboHandle, sizeof(vertexData), ~0}, {uboHandle, 0, 4*sizeof(float)}, {texHandle, 0, ~0}};
RADbuffer bindGroup = AllocAndFillBuffer(device, b, sizeof(b), RAD_BINDGROUP_ACCESS_BIT, false);
RADbindGroupHandle bindGroupHandle = radGetBindGroupHandle(bindGroup);
if (useCopyQueue) {
// Sync from copy queue to graphics queue. Note that we currently don't sync in the
// opposite direction at the end of the frame, because radQueuePresent effectively
// does a Finish so it isn't needed.
RADsync sync = radCreateSync(device);
radQueueFenceSync(copyQueue, sync, RAD_SYNC_ALL_GPU_COMMANDS_COMPLETE, 0);
radQueueWaitSync(queue, sync);
radReleaseSync(sync);
}
clock_t startTime = clock();
unsigned int numIterations = benchmark ? 1000000 : 1;
switch (drawMode) {
case QUEUE:
for (unsigned int i = 0; i < numIterations; ++i) {
// Bind the pipeline, bind vertex arrays and textures, and draw
radQueueBindPipeline(queue, RAD_PIPELINE_TYPE_GRAPHICS, pipelineHandle);
radQueueBindGroup(queue, RAD_VERTEX_SHADER_BIT | RAD_FRAGMENT_SHADER_BIT, 0, 4, bindGroupHandle, 0);
//radQueueDrawArrays(queue, RAD_TRIANGLES, 0, 6);
radQueueDrawElements(queue, RAD_TRIANGLES, RAD_INDEX_UNSIGNED_SHORT, 6, iboHandle, 0);
}
break;
case TOKEN:
{
typedef struct Draw {
RADuint pipelineHeader;
RADtokenBindGraphicsPipeline pipeline;
RADuint bindGroupHeader;
RADtokenBindGroup bindGroup;
RADuint drawElementsHeader;
RADtokenDrawElements drawElements;
} Draw;
Draw d;
memset(&d, 0, sizeof(d));
d.pipelineHeader = radGetTokenHeader(device, RAD_TOKEN_BIND_GRAPHICS_PIPELINE);
d.pipeline.pipelineHandle = pipelineHandle;
d.bindGroupHeader = radGetTokenHeader(device, RAD_TOKEN_BIND_GROUP);
d.bindGroup.stages = RAD_VERTEX_SHADER_BIT | RAD_FRAGMENT_SHADER_BIT;
d.bindGroup.group = 0;
d.bindGroup.groupHandle = bindGroupHandle;
d.bindGroup.offset = 0;
d.bindGroup.count = 4;
d.drawElementsHeader = radGetTokenHeader(device, RAD_TOKEN_DRAW_ELEMENTS);
d.drawElements.indexHandle = iboHandle;
d.drawElements.mode = RAD_TRIANGLES;
d.drawElements.type = RAD_INDEX_UNSIGNED_SHORT;
d.drawElements.count = 6;
for (unsigned int i = 0; i < numIterations; ++i) {
radQueueSubmitDynamic(queue, &d, sizeof(d));
}
}
break;
case COMMAND:
{
RADcommandBuffer cmd = radCreateCommandBuffer(device, RAD_QUEUE_TYPE_GRAPHICS_AND_COMPUTE);
radCmdBindPipeline(cmd, RAD_PIPELINE_TYPE_GRAPHICS, pipelineHandle);
radCmdBindGroup(cmd, RAD_VERTEX_SHADER_BIT | RAD_FRAGMENT_SHADER_BIT, 0, 4, bindGroupHandle, 0);
radCmdDrawElements(cmd, RAD_TRIANGLES, RAD_INDEX_UNSIGNED_SHORT, 6, iboHandle, 0);
radCompileCommandBuffer(cmd);
RADcommandHandle cmdHandle = radGetCommandHandle(cmd);
for (unsigned int i = 0; i < numIterations; ++i) {
radQueueSubmitCommands(queue, 1, &cmdHandle);
}
radReleaseCommandBuffer(cmd);
}
break;
}
if (benchmark) {
clock_t currentTime = clock();
printf("%f\n", 1.0f*numIterations*CLOCKS_PER_SEC/(currentTime - startTime));
}
radQueueEndPass(queue, pass);
// Kickoff submitted command buffers for the queue
//radFlushQueue(queue);
#if USE_MULTISAMPLE
radQueuePresent(queue, tex1x);
#else
radQueuePresent(queue, rtTex);
#endif
radReleaseProgram(pgm);
radReleaseColorState(color);
radReleaseDepthStencilState(depth);
radReleaseVertexState(vertex);
radReleaseRasterState(raster);
radReleaseRtFormatState(rtFormat);
radReleaseBuffer(vbo, RAD_TAG_AUTO);
radReleaseBuffer(ibo, RAD_TAG_AUTO);
radReleaseBuffer(pbo, RAD_TAG_AUTO);
radReleaseBuffer(ubo, RAD_TAG_AUTO);
radReleaseBuffer(bindGroup, RAD_TAG_AUTO);
radReleaseTexture(texture, RAD_TAG_AUTO);
radReleaseTexture(rtTex, RAD_TAG_AUTO);
radReleaseTexture(depthTex, RAD_TAG_AUTO);
radReleaseSampler(sampler);
radReleasePipeline(pipeline);
radReleasePass(pass);
#if USE_MULTISAMPLE
radReleaseTexture(tex1x, RAD_TAG_AUTO);
#endif
}
/*
** Copyright 1998-2014, NVIDIA Corporation.
** All Rights Reserved.
**
** THE INFORMATION CONTAINED HEREIN IS PROPRIETARY AND CONFIDENTIAL TO
** NVIDIA, CORPORATION. USE, REPRODUCTION OR DISCLOSURE TO ANY THIRD PARTY
** IS SUBJECT TO WRITTEN PRE-APPROVAL BY NVIDIA, CORPORATION.
*/
/* THIS FILE IS AUTOMATICALLY GENERATED - DO NOT EDIT */
#include "rad.h"
PFNRADCREATEDEVICEPROC radCreateDevice;
PFNRADREFERENCEDEVICEPROC radReferenceDevice;
PFNRADRELEASEDEVICEPROC radReleaseDevice;
PFNRADGETTOKENHEADERPROC radGetTokenHeader;
PFNRADCREATEQUEUEPROC radCreateQueue;
PFNRADREFERENCEQUEUEPROC radReferenceQueue;
PFNRADRELEASEQUEUEPROC radReleaseQueue;
PFNRADQUEUETAGBUFFERPROC radQueueTagBuffer;
PFNRADQUEUETAGTEXTUREPROC radQueueTagTexture;
PFNRADQUEUESUBMITCOMMANDSPROC radQueueSubmitCommands;
PFNRADFLUSHQUEUEPROC radFlushQueue;
PFNRADFINISHQUEUEPROC radFinishQueue;
PFNRADQUEUEVIEWPORTPROC radQueueViewport;
PFNRADQUEUESCISSORPROC radQueueScissor;
PFNRADQUEUECOPYBUFFERTOIMAGEPROC radQueueCopyBufferToImage;
PFNRADQUEUECOPYIMAGETOBUFFERPROC radQueueCopyImageToBuffer;
PFNRADQUEUECOPYBUFFERPROC radQueueCopyBuffer;
PFNRADQUEUECLEARCOLORPROC radQueueClearColor;
PFNRADQUEUECLEARDEPTHPROC radQueueClearDepth;
PFNRADQUEUECLEARSTENCILPROC radQueueClearStencil;
PFNRADQUEUEPRESENTPROC radQueuePresent;
PFNRADQUEUEDRAWARRAYSPROC radQueueDrawArrays;
PFNRADQUEUEDRAWELEMENTSPROC radQueueDrawElements;
PFNRADQUEUEBINDPIPELINEPROC radQueueBindPipeline;
PFNRADQUEUEBINDGROUPPROC radQueueBindGroup;
PFNRADQUEUEBEGINPASSPROC radQueueBeginPass;
PFNRADQUEUEENDPASSPROC radQueueEndPass;
PFNRADQUEUESUBMITDYNAMICPROC radQueueSubmitDynamic;
PFNRADQUEUESTENCILVALUEMASKPROC radQueueStencilValueMask;
PFNRADQUEUESTENCILMASKPROC radQueueStencilMask;
PFNRADQUEUESTENCILREFPROC radQueueStencilRef;
PFNRADQUEUEBLENDCOLORPROC radQueueBlendColor;
PFNRADQUEUEPOINTSIZEPROC radQueuePointSize;
PFNRADQUEUELINEWIDTHPROC radQueueLineWidth;
PFNRADQUEUEPOLYGONOFFSETCLAMPPROC radQueuePolygonOffsetClamp;
PFNRADQUEUESAMPLEMASKPROC radQueueSampleMask;
PFNRADCREATEPROGRAMPROC radCreateProgram;
PFNRADREFERENCEPROGRAMPROC radReferenceProgram;
PFNRADRELEASEPROGRAMPROC radReleaseProgram;
PFNRADPROGRAMSOURCEPROC radProgramSource;
PFNRADCREATEBUFFERPROC radCreateBuffer;
PFNRADREFERENCEBUFFERPROC radReferenceBuffer;
PFNRADRELEASEBUFFERPROC radReleaseBuffer;
PFNRADBUFFERACCESSPROC radBufferAccess;
PFNRADBUFFERMAPACCESSPROC radBufferMapAccess;
PFNRADBUFFERSTORAGEPROC radBufferStorage;
PFNRADMAPBUFFERPROC radMapBuffer;
PFNRADGETVERTEXHANDLEPROC radGetVertexHandle;
PFNRADGETINDEXHANDLEPROC radGetIndexHandle;
PFNRADGETUNIFORMHANDLEPROC radGetUniformHandle;
PFNRADGETBINDGROUPHANDLEPROC radGetBindGroupHandle;
PFNRADCREATETEXTUREPROC radCreateTexture;
PFNRADREFERENCETEXTUREPROC radReferenceTexture;
PFNRADRELEASETEXTUREPROC radReleaseTexture;
PFNRADTEXTUREACCESSPROC radTextureAccess;
PFNRADTEXTURESTORAGEPROC radTextureStorage;
PFNRADGETTEXTURESAMPLERHANDLEPROC radGetTextureSamplerHandle;
PFNRADGETTEXTURERENDERTARGETHANDLEPROC radGetTextureRenderTargetHandle;
PFNRADCREATESAMPLERPROC radCreateSampler;
PFNRADREFERENCESAMPLERPROC radReferenceSampler;
PFNRADRELEASESAMPLERPROC radReleaseSampler;
PFNRADSAMPLERDEFAULTPROC radSamplerDefault;
PFNRADSAMPLERMINMAGFILTERPROC radSamplerMinMagFilter;
PFNRADSAMPLERWRAPMODEPROC radSamplerWrapMode;
PFNRADSAMPLERLODCLAMPPROC radSamplerLodClamp;
PFNRADSAMPLERLODBIASPROC radSamplerLodBias;
PFNRADSAMPLERCOMPAREPROC radSamplerCompare;
PFNRADSAMPLERBORDERCOLORFLOATPROC radSamplerBorderColorFloat;
PFNRADSAMPLERBORDERCOLORINTPROC radSamplerBorderColorInt;
PFNRADCREATECOLORSTATEPROC radCreateColorState;
PFNRADREFERENCECOLORSTATEPROC radReferenceColorState;
PFNRADRELEASECOLORSTATEPROC radReleaseColorState;
PFNRADCOLORDEFAULTPROC radColorDefault;
PFNRADCOLORBLENDENABLEPROC radColorBlendEnable;
PFNRADCOLORBLENDFUNCPROC radColorBlendFunc;
PFNRADCOLORBLENDEQUATIONPROC radColorBlendEquation;
PFNRADCOLORMASKPROC radColorMask;
PFNRADCOLORNUMTARGETSPROC radColorNumTargets;
PFNRADCOLORLOGICOPENABLEPROC radColorLogicOpEnable;
PFNRADCOLORLOGICOPPROC radColorLogicOp;
PFNRADCOLORALPHATOCOVERAGEENABLEPROC radColorAlphaToCoverageEnable;
PFNRADCOLORBLENDCOLORPROC radColorBlendColor;
PFNRADCOLORDYNAMICPROC radColorDynamic;
PFNRADCREATERASTERSTATEPROC radCreateRasterState;
PFNRADREFERENCERASTERSTATEPROC radReferenceRasterState;
PFNRADRELEASERASTERSTATEPROC radReleaseRasterState;
PFNRADRASTERDEFAULTPROC radRasterDefault;
PFNRADRASTERPOINTSIZEPROC radRasterPointSize;
PFNRADRASTERLINEWIDTHPROC radRasterLineWidth;
PFNRADRASTERCULLFACEPROC radRasterCullFace;
PFNRADRASTERFRONTFACEPROC radRasterFrontFace;
PFNRADRASTERPOLYGONMODEPROC radRasterPolygonMode;
PFNRADRASTERPOLYGONOFFSETCLAMPPROC radRasterPolygonOffsetClamp;
PFNRADRASTERPOLYGONOFFSETENABLESPROC radRasterPolygonOffsetEnables;
PFNRADRASTERDISCARDENABLEPROC radRasterDiscardEnable;
PFNRADRASTERMULTISAMPLEENABLEPROC radRasterMultisampleEnable;
PFNRADRASTERSAMPLESPROC radRasterSamples;
PFNRADRASTERSAMPLEMASKPROC radRasterSampleMask;
PFNRADRASTERDYNAMICPROC radRasterDynamic;
PFNRADCREATEDEPTHSTENCILSTATEPROC radCreateDepthStencilState;
PFNRADREFERENCEDEPTHSTENCILSTATEPROC radReferenceDepthStencilState;
PFNRADRELEASEDEPTHSTENCILSTATEPROC radReleaseDepthStencilState;
PFNRADDEPTHSTENCILDEFAULTPROC radDepthStencilDefault;
PFNRADDEPTHSTENCILDEPTHTESTENABLEPROC radDepthStencilDepthTestEnable;
PFNRADDEPTHSTENCILDEPTHWRITEENABLEPROC radDepthStencilDepthWriteEnable;
PFNRADDEPTHSTENCILDEPTHFUNCPROC radDepthStencilDepthFunc;
PFNRADDEPTHSTENCILSTENCILTESTENABLEPROC radDepthStencilStencilTestEnable;
PFNRADDEPTHSTENCILSTENCILFUNCPROC radDepthStencilStencilFunc;
PFNRADDEPTHSTENCILSTENCILOPPROC radDepthStencilStencilOp;
PFNRADDEPTHSTENCILSTENCILMASKPROC radDepthStencilStencilMask;
PFNRADDEPTHSTENCILDYNAMICPROC radDepthStencilDynamic;
PFNRADCREATEVERTEXSTATEPROC radCreateVertexState;
PFNRADREFERENCEVERTEXSTATEPROC radReferenceVertexState;
PFNRADRELEASEVERTEXSTATEPROC radReleaseVertexState;
PFNRADVERTEXDEFAULTPROC radVertexDefault;
PFNRADVERTEXATTRIBFORMATPROC radVertexAttribFormat;
PFNRADVERTEXATTRIBBINDINGPROC radVertexAttribBinding;
PFNRADVERTEXBINDINGGROUPPROC radVertexBindingGroup;
PFNRADVERTEXATTRIBENABLEPROC radVertexAttribEnable;
PFNRADVERTEXBINDINGSTRIDEPROC radVertexBindingStride;
PFNRADCREATERTFORMATSTATEPROC radCreateRtFormatState;
PFNRADREFERENCERTFORMATSTATEPROC radReferenceRtFormatState;
PFNRADRELEASERTFORMATSTATEPROC radReleaseRtFormatState;
PFNRADRTFORMATDEFAULTPROC radRtFormatDefault;
PFNRADRTFORMATCOLORFORMATPROC radRtFormatColorFormat;
PFNRADRTFORMATDEPTHFORMATPROC radRtFormatDepthFormat;
PFNRADRTFORMATSTENCILFORMATPROC radRtFormatStencilFormat;
PFNRADRTFORMATCOLORSAMPLESPROC radRtFormatColorSamples;
PFNRADRTFORMATDEPTHSTENCILSAMPLESPROC radRtFormatDepthStencilSamples;
PFNRADCREATEPIPELINEPROC radCreatePipeline;
PFNRADREFERENCEPIPELINEPROC radReferencePipeline;
PFNRADRELEASEPIPELINEPROC radReleasePipeline;
PFNRADPIPELINEPROGRAMSTAGESPROC radPipelineProgramStages;
PFNRADPIPELINEVERTEXSTATEPROC radPipelineVertexState;
PFNRADPIPELINECOLORSTATEPROC radPipelineColorState;
PFNRADPIPELINERASTERSTATEPROC radPipelineRasterState;
PFNRADPIPELINEDEPTHSTENCILSTATEPROC radPipelineDepthStencilState;
PFNRADPIPELINERTFORMATSTATEPROC radPipelineRtFormatState;
PFNRADPIPELINEPRIMITIVETYPEPROC radPipelinePrimitiveType;
PFNRADCOMPILEPIPELINEPROC radCompilePipeline;
PFNRADGETPIPELINEHANDLEPROC radGetPipelineHandle;
PFNRADCREATECOMMANDBUFFERPROC radCreateCommandBuffer;
PFNRADREFERENCECOMMANDBUFFERPROC radReferenceCommandBuffer;
PFNRADRELEASECOMMANDBUFFERPROC radReleaseCommandBuffer;
PFNRADCMDBINDPIPELINEPROC radCmdBindPipeline;
PFNRADCMDBINDGROUPPROC radCmdBindGroup;
PFNRADCMDDRAWARRAYSPROC radCmdDrawArrays;
PFNRADCMDDRAWELEMENTSPROC radCmdDrawElements;
PFNRADCOMPILECOMMANDBUFFERPROC radCompileCommandBuffer;
PFNRADGETCOMMANDHANDLEPROC radGetCommandHandle;
PFNRADCMDSTENCILVALUEMASKPROC radCmdStencilValueMask;
PFNRADCMDSTENCILMASKPROC radCmdStencilMask;
PFNRADCMDSTENCILREFPROC radCmdStencilRef;
PFNRADCMDBLENDCOLORPROC radCmdBlendColor;
PFNRADCMDPOINTSIZEPROC radCmdPointSize;
PFNRADCMDLINEWIDTHPROC radCmdLineWidth;
PFNRADCMDPOLYGONOFFSETCLAMPPROC radCmdPolygonOffsetClamp;
PFNRADCMDSAMPLEMASKPROC radCmdSampleMask;
PFNRADCREATEPASSPROC radCreatePass;
PFNRADREFERENCEPASSPROC radReferencePass;
PFNRADRELEASEPASSPROC radReleasePass;
PFNRADPASSDEFAULTPROC radPassDefault;
PFNRADCOMPILEPASSPROC radCompilePass;
PFNRADPASSRENDERTARGETSPROC radPassRenderTargets;
PFNRADPASSPRESERVEENABLEPROC radPassPreserveEnable;
PFNRADPASSDISCARDPROC radPassDiscard;
PFNRADPASSRESOLVEPROC radPassResolve;
PFNRADPASSSTOREPROC radPassStore;
PFNRADPASSCLIPPROC radPassClip;
PFNRADPASSDEPENDENCIESPROC radPassDependencies;
PFNRADPASSTILINGBOUNDARYPROC radPassTilingBoundary;
PFNRADPASSTILEFILTERWIDTHPROC radPassTileFilterWidth;
PFNRADPASSTILEFOOTPRINTPROC radPassTileFootprint;
PFNRADCREATESYNCPROC radCreateSync;
PFNRADREFERENCESYNCPROC radReferenceSync;
PFNRADRELEASESYNCPROC radReleaseSync;
PFNRADQUEUEFENCESYNCPROC radQueueFenceSync;
PFNRADWAITSYNCPROC radWaitSync;
PFNRADQUEUEWAITSYNCPROC radQueueWaitSync;
void radLoadProcs(PFNRADGETPROCADDRESSPROC getProc)
{
radCreateDevice = (PFNRADCREATEDEVICEPROC)getProc("radCreateDevice");
radReferenceDevice = (PFNRADREFERENCEDEVICEPROC)getProc("radReferenceDevice");
radReleaseDevice = (PFNRADRELEASEDEVICEPROC)getProc("radReleaseDevice");
radGetTokenHeader = (PFNRADGETTOKENHEADERPROC)getProc("radGetTokenHeader");
radCreateQueue = (PFNRADCREATEQUEUEPROC)getProc("radCreateQueue");
radReferenceQueue = (PFNRADREFERENCEQUEUEPROC)getProc("radReferenceQueue");
radReleaseQueue = (PFNRADRELEASEQUEUEPROC)getProc("radReleaseQueue");
radQueueTagBuffer = (PFNRADQUEUETAGBUFFERPROC)getProc("radQueueTagBuffer");
radQueueTagTexture = (PFNRADQUEUETAGTEXTUREPROC)getProc("radQueueTagTexture");
radQueueSubmitCommands = (PFNRADQUEUESUBMITCOMMANDSPROC)getProc("radQueueSubmitCommands");
radFlushQueue = (PFNRADFLUSHQUEUEPROC)getProc("radFlushQueue");
radFinishQueue = (PFNRADFINISHQUEUEPROC)getProc("radFinishQueue");
radQueueViewport = (PFNRADQUEUEVIEWPORTPROC)getProc("radQueueViewport");
radQueueScissor = (PFNRADQUEUESCISSORPROC)getProc("radQueueScissor");
radQueueCopyBufferToImage = (PFNRADQUEUECOPYBUFFERTOIMAGEPROC)getProc("radQueueCopyBufferToImage");
radQueueCopyImageToBuffer = (PFNRADQUEUECOPYIMAGETOBUFFERPROC)getProc("radQueueCopyImageToBuffer");
radQueueCopyBuffer = (PFNRADQUEUECOPYBUFFERPROC)getProc("radQueueCopyBuffer");
radQueueClearColor = (PFNRADQUEUECLEARCOLORPROC)getProc("radQueueClearColor");
radQueueClearDepth = (PFNRADQUEUECLEARDEPTHPROC)getProc("radQueueClearDepth");
radQueueClearStencil = (PFNRADQUEUECLEARSTENCILPROC)getProc("radQueueClearStencil");
radQueuePresent = (PFNRADQUEUEPRESENTPROC)getProc("radQueuePresent");
radQueueDrawArrays = (PFNRADQUEUEDRAWARRAYSPROC)getProc("radQueueDrawArrays");
radQueueDrawElements = (PFNRADQUEUEDRAWELEMENTSPROC)getProc("radQueueDrawElements");
radQueueBindPipeline = (PFNRADQUEUEBINDPIPELINEPROC)getProc("radQueueBindPipeline");
radQueueBindGroup = (PFNRADQUEUEBINDGROUPPROC)getProc("radQueueBindGroup");
radQueueBeginPass = (PFNRADQUEUEBEGINPASSPROC)getProc("radQueueBeginPass");
radQueueEndPass = (PFNRADQUEUEENDPASSPROC)getProc("radQueueEndPass");
radQueueSubmitDynamic = (PFNRADQUEUESUBMITDYNAMICPROC)getProc("radQueueSubmitDynamic");
radQueueStencilValueMask = (PFNRADQUEUESTENCILVALUEMASKPROC)getProc("radQueueStencilValueMask");
radQueueStencilMask = (PFNRADQUEUESTENCILMASKPROC)getProc("radQueueStencilMask");
radQueueStencilRef = (PFNRADQUEUESTENCILREFPROC)getProc("radQueueStencilRef");
radQueueBlendColor = (PFNRADQUEUEBLENDCOLORPROC)getProc("radQueueBlendColor");
radQueuePointSize = (PFNRADQUEUEPOINTSIZEPROC)getProc("radQueuePointSize");
radQueueLineWidth = (PFNRADQUEUELINEWIDTHPROC)getProc("radQueueLineWidth");
radQueuePolygonOffsetClamp = (PFNRADQUEUEPOLYGONOFFSETCLAMPPROC)getProc("radQueuePolygonOffsetClamp");
radQueueSampleMask = (PFNRADQUEUESAMPLEMASKPROC)getProc("radQueueSampleMask");
radCreateProgram = (PFNRADCREATEPROGRAMPROC)getProc("radCreateProgram");
radReferenceProgram = (PFNRADREFERENCEPROGRAMPROC)getProc("radReferenceProgram");
radReleaseProgram = (PFNRADRELEASEPROGRAMPROC)getProc("radReleaseProgram");
radProgramSource = (PFNRADPROGRAMSOURCEPROC)getProc("radProgramSource");
radCreateBuffer = (PFNRADCREATEBUFFERPROC)getProc("radCreateBuffer");
radReferenceBuffer = (PFNRADREFERENCEBUFFERPROC)getProc("radReferenceBuffer");
radReleaseBuffer = (PFNRADRELEASEBUFFERPROC)getProc("radReleaseBuffer");
radBufferAccess = (PFNRADBUFFERACCESSPROC)getProc("radBufferAccess");
radBufferMapAccess = (PFNRADBUFFERMAPACCESSPROC)getProc("radBufferMapAccess");
radBufferStorage = (PFNRADBUFFERSTORAGEPROC)getProc("radBufferStorage");
radMapBuffer = (PFNRADMAPBUFFERPROC)getProc("radMapBuffer");
radGetVertexHandle = (PFNRADGETVERTEXHANDLEPROC)getProc("radGetVertexHandle");
radGetIndexHandle = (PFNRADGETINDEXHANDLEPROC)getProc("radGetIndexHandle");
radGetUniformHandle = (PFNRADGETUNIFORMHANDLEPROC)getProc("radGetUniformHandle");
radGetBindGroupHandle = (PFNRADGETBINDGROUPHANDLEPROC)getProc("radGetBindGroupHandle");
radCreateTexture = (PFNRADCREATETEXTUREPROC)getProc("radCreateTexture");
radReferenceTexture = (PFNRADREFERENCETEXTUREPROC)getProc("radReferenceTexture");
radReleaseTexture = (PFNRADRELEASETEXTUREPROC)getProc("radReleaseTexture");
radTextureAccess = (PFNRADTEXTUREACCESSPROC)getProc("radTextureAccess");
radTextureStorage = (PFNRADTEXTURESTORAGEPROC)getProc("radTextureStorage");
radGetTextureSamplerHandle = (PFNRADGETTEXTURESAMPLERHANDLEPROC)getProc("radGetTextureSamplerHandle");
radGetTextureRenderTargetHandle = (PFNRADGETTEXTURERENDERTARGETHANDLEPROC)getProc("radGetTextureRenderTargetHandle");
radCreateSampler = (PFNRADCREATESAMPLERPROC)getProc("radCreateSampler");
radReferenceSampler = (PFNRADREFERENCESAMPLERPROC)getProc("radReferenceSampler");
radReleaseSampler = (PFNRADRELEASESAMPLERPROC)getProc("radReleaseSampler");
radSamplerDefault = (PFNRADSAMPLERDEFAULTPROC)getProc("radSamplerDefault");
radSamplerMinMagFilter = (PFNRADSAMPLERMINMAGFILTERPROC)getProc("radSamplerMinMagFilter");
radSamplerWrapMode = (PFNRADSAMPLERWRAPMODEPROC)getProc("radSamplerWrapMode");
radSamplerLodClamp = (PFNRADSAMPLERLODCLAMPPROC)getProc("radSamplerLodClamp");
radSamplerLodBias = (PFNRADSAMPLERLODBIASPROC)getProc("radSamplerLodBias");
radSamplerCompare = (PFNRADSAMPLERCOMPAREPROC)getProc("radSamplerCompare");
radSamplerBorderColorFloat = (PFNRADSAMPLERBORDERCOLORFLOATPROC)getProc("radSamplerBorderColorFloat");
radSamplerBorderColorInt = (PFNRADSAMPLERBORDERCOLORINTPROC)getProc("radSamplerBorderColorInt");
radCreateColorState = (PFNRADCREATECOLORSTATEPROC)getProc("radCreateColorState");
radReferenceColorState = (PFNRADREFERENCECOLORSTATEPROC)getProc("radReferenceColorState");
radReleaseColorState = (PFNRADRELEASECOLORSTATEPROC)getProc("radReleaseColorState");
radColorDefault = (PFNRADCOLORDEFAULTPROC)getProc("radColorDefault");
radColorBlendEnable = (PFNRADCOLORBLENDENABLEPROC)getProc("radColorBlendEnable");
radColorBlendFunc = (PFNRADCOLORBLENDFUNCPROC)getProc("radColorBlendFunc");
radColorBlendEquation = (PFNRADCOLORBLENDEQUATIONPROC)getProc("radColorBlendEquation");
radColorMask = (PFNRADCOLORMASKPROC)getProc("radColorMask");
radColorNumTargets = (PFNRADCOLORNUMTARGETSPROC)getProc("radColorNumTargets");
radColorLogicOpEnable = (PFNRADCOLORLOGICOPENABLEPROC)getProc("radColorLogicOpEnable");
radColorLogicOp = (PFNRADCOLORLOGICOPPROC)getProc("radColorLogicOp");
radColorAlphaToCoverageEnable = (PFNRADCOLORALPHATOCOVERAGEENABLEPROC)getProc("radColorAlphaToCoverageEnable");
radColorBlendColor = (PFNRADCOLORBLENDCOLORPROC)getProc("radColorBlendColor");
radColorDynamic = (PFNRADCOLORDYNAMICPROC)getProc("radColorDynamic");
radCreateRasterState = (PFNRADCREATERASTERSTATEPROC)getProc("radCreateRasterState");
radReferenceRasterState = (PFNRADREFERENCERASTERSTATEPROC)getProc("radReferenceRasterState");
radReleaseRasterState = (PFNRADRELEASERASTERSTATEPROC)getProc("radReleaseRasterState");
radRasterDefault = (PFNRADRASTERDEFAULTPROC)getProc("radRasterDefault");
radRasterPointSize = (PFNRADRASTERPOINTSIZEPROC)getProc("radRasterPointSize");
radRasterLineWidth = (PFNRADRASTERLINEWIDTHPROC)getProc("radRasterLineWidth");
radRasterCullFace = (PFNRADRASTERCULLFACEPROC)getProc("radRasterCullFace");
radRasterFrontFace = (PFNRADRASTERFRONTFACEPROC)getProc("radRasterFrontFace");
radRasterPolygonMode = (PFNRADRASTERPOLYGONMODEPROC)getProc("radRasterPolygonMode");
radRasterPolygonOffsetClamp = (PFNRADRASTERPOLYGONOFFSETCLAMPPROC)getProc("radRasterPolygonOffsetClamp");
radRasterPolygonOffsetEnables = (PFNRADRASTERPOLYGONOFFSETENABLESPROC)getProc("radRasterPolygonOffsetEnables");
radRasterDiscardEnable = (PFNRADRASTERDISCARDENABLEPROC)getProc("radRasterDiscardEnable");
radRasterMultisampleEnable = (PFNRADRASTERMULTISAMPLEENABLEPROC)getProc("radRasterMultisampleEnable");
radRasterSamples = (PFNRADRASTERSAMPLESPROC)getProc("radRasterSamples");
radRasterSampleMask = (PFNRADRASTERSAMPLEMASKPROC)getProc("radRasterSampleMask");
radRasterDynamic = (PFNRADRASTERDYNAMICPROC)getProc("radRasterDynamic");
radCreateDepthStencilState = (PFNRADCREATEDEPTHSTENCILSTATEPROC)getProc("radCreateDepthStencilState");
radReferenceDepthStencilState = (PFNRADREFERENCEDEPTHSTENCILSTATEPROC)getProc("radReferenceDepthStencilState");
radReleaseDepthStencilState = (PFNRADRELEASEDEPTHSTENCILSTATEPROC)getProc("radReleaseDepthStencilState");
radDepthStencilDefault = (PFNRADDEPTHSTENCILDEFAULTPROC)getProc("radDepthStencilDefault");
radDepthStencilDepthTestEnable = (PFNRADDEPTHSTENCILDEPTHTESTENABLEPROC)getProc("radDepthStencilDepthTestEnable");
radDepthStencilDepthWriteEnable = (PFNRADDEPTHSTENCILDEPTHWRITEENABLEPROC)getProc("radDepthStencilDepthWriteEnable");
radDepthStencilDepthFunc = (PFNRADDEPTHSTENCILDEPTHFUNCPROC)getProc("radDepthStencilDepthFunc");
radDepthStencilStencilTestEnable = (PFNRADDEPTHSTENCILSTENCILTESTENABLEPROC)getProc("radDepthStencilStencilTestEnable");
radDepthStencilStencilFunc = (PFNRADDEPTHSTENCILSTENCILFUNCPROC)getProc("radDepthStencilStencilFunc");
radDepthStencilStencilOp = (PFNRADDEPTHSTENCILSTENCILOPPROC)getProc("radDepthStencilStencilOp");
radDepthStencilStencilMask = (PFNRADDEPTHSTENCILSTENCILMASKPROC)getProc("radDepthStencilStencilMask");
radDepthStencilDynamic = (PFNRADDEPTHSTENCILDYNAMICPROC)getProc("radDepthStencilDynamic");
radCreateVertexState = (PFNRADCREATEVERTEXSTATEPROC)getProc("radCreateVertexState");
radReferenceVertexState = (PFNRADREFERENCEVERTEXSTATEPROC)getProc("radReferenceVertexState");
radReleaseVertexState = (PFNRADRELEASEVERTEXSTATEPROC)getProc("radReleaseVertexState");
radVertexDefault = (PFNRADVERTEXDEFAULTPROC)getProc("radVertexDefault");
radVertexAttribFormat = (PFNRADVERTEXATTRIBFORMATPROC)getProc("radVertexAttribFormat");
radVertexAttribBinding = (PFNRADVERTEXATTRIBBINDINGPROC)getProc("radVertexAttribBinding");
radVertexBindingGroup = (PFNRADVERTEXBINDINGGROUPPROC)getProc("radVertexBindingGroup");
radVertexAttribEnable = (PFNRADVERTEXATTRIBENABLEPROC)getProc("radVertexAttribEnable");
radVertexBindingStride = (PFNRADVERTEXBINDINGSTRIDEPROC)getProc("radVertexBindingStride");
radCreateRtFormatState = (PFNRADCREATERTFORMATSTATEPROC)getProc("radCreateRtFormatState");
radReferenceRtFormatState = (PFNRADREFERENCERTFORMATSTATEPROC)getProc("radReferenceRtFormatState");
radReleaseRtFormatState = (PFNRADRELEASERTFORMATSTATEPROC)getProc("radReleaseRtFormatState");
radRtFormatDefault = (PFNRADRTFORMATDEFAULTPROC)getProc("radRtFormatDefault");
radRtFormatColorFormat = (PFNRADRTFORMATCOLORFORMATPROC)getProc("radRtFormatColorFormat");
radRtFormatDepthFormat = (PFNRADRTFORMATDEPTHFORMATPROC)getProc("radRtFormatDepthFormat");
radRtFormatStencilFormat = (PFNRADRTFORMATSTENCILFORMATPROC)getProc("radRtFormatStencilFormat");
radRtFormatColorSamples = (PFNRADRTFORMATCOLORSAMPLESPROC)getProc("radRtFormatColorSamples");
radRtFormatDepthStencilSamples = (PFNRADRTFORMATDEPTHSTENCILSAMPLESPROC)getProc("radRtFormatDepthStencilSamples");
radCreatePipeline = (PFNRADCREATEPIPELINEPROC)getProc("radCreatePipeline");
radReferencePipeline = (PFNRADREFERENCEPIPELINEPROC)getProc("radReferencePipeline");
radReleasePipeline = (PFNRADRELEASEPIPELINEPROC)getProc("radReleasePipeline");
radPipelineProgramStages = (PFNRADPIPELINEPROGRAMSTAGESPROC)getProc("radPipelineProgramStages");
radPipelineVertexState = (PFNRADPIPELINEVERTEXSTATEPROC)getProc("radPipelineVertexState");
radPipelineColorState = (PFNRADPIPELINECOLORSTATEPROC)getProc("radPipelineColorState");
radPipelineRasterState = (PFNRADPIPELINERASTERSTATEPROC)getProc("radPipelineRasterState");
radPipelineDepthStencilState = (PFNRADPIPELINEDEPTHSTENCILSTATEPROC)getProc("radPipelineDepthStencilState");
radPipelineRtFormatState = (PFNRADPIPELINERTFORMATSTATEPROC)getProc("radPipelineRtFormatState");
radPipelinePrimitiveType = (PFNRADPIPELINEPRIMITIVETYPEPROC)getProc("radPipelinePrimitiveType");
radCompilePipeline = (PFNRADCOMPILEPIPELINEPROC)getProc("radCompilePipeline");
radGetPipelineHandle = (PFNRADGETPIPELINEHANDLEPROC)getProc("radGetPipelineHandle");
radCreateCommandBuffer = (PFNRADCREATECOMMANDBUFFERPROC)getProc("radCreateCommandBuffer");
radReferenceCommandBuffer = (PFNRADREFERENCECOMMANDBUFFERPROC)getProc("radReferenceCommandBuffer");
radReleaseCommandBuffer = (PFNRADRELEASECOMMANDBUFFERPROC)getProc("radReleaseCommandBuffer");
radCmdBindPipeline = (PFNRADCMDBINDPIPELINEPROC)getProc("radCmdBindPipeline");
radCmdBindGroup = (PFNRADCMDBINDGROUPPROC)getProc("radCmdBindGroup");
radCmdDrawArrays = (PFNRADCMDDRAWARRAYSPROC)getProc("radCmdDrawArrays");
radCmdDrawElements = (PFNRADCMDDRAWELEMENTSPROC)getProc("radCmdDrawElements");
radCompileCommandBuffer = (PFNRADCOMPILECOMMANDBUFFERPROC)getProc("radCompileCommandBuffer");
radGetCommandHandle = (PFNRADGETCOMMANDHANDLEPROC)getProc("radGetCommandHandle");
radCmdStencilValueMask = (PFNRADCMDSTENCILVALUEMASKPROC)getProc("radCmdStencilValueMask");
radCmdStencilMask = (PFNRADCMDSTENCILMASKPROC)getProc("radCmdStencilMask");
radCmdStencilRef = (PFNRADCMDSTENCILREFPROC)getProc("radCmdStencilRef");
radCmdBlendColor = (PFNRADCMDBLENDCOLORPROC)getProc("radCmdBlendColor");
radCmdPointSize = (PFNRADCMDPOINTSIZEPROC)getProc("radCmdPointSize");
radCmdLineWidth = (PFNRADCMDLINEWIDTHPROC)getProc("radCmdLineWidth");
radCmdPolygonOffsetClamp = (PFNRADCMDPOLYGONOFFSETCLAMPPROC)getProc("radCmdPolygonOffsetClamp");
radCmdSampleMask = (PFNRADCMDSAMPLEMASKPROC)getProc("radCmdSampleMask");
radCreatePass = (PFNRADCREATEPASSPROC)getProc("radCreatePass");
radReferencePass = (PFNRADREFERENCEPASSPROC)getProc("radReferencePass");
radReleasePass = (PFNRADRELEASEPASSPROC)getProc("radReleasePass");
radPassDefault = (PFNRADPASSDEFAULTPROC)getProc("radPassDefault");
radCompilePass = (PFNRADCOMPILEPASSPROC)getProc("radCompilePass");
radPassRenderTargets = (PFNRADPASSRENDERTARGETSPROC)getProc("radPassRenderTargets");
radPassPreserveEnable = (PFNRADPASSPRESERVEENABLEPROC)getProc("radPassPreserveEnable");
radPassDiscard = (PFNRADPASSDISCARDPROC)getProc("radPassDiscard");
radPassResolve = (PFNRADPASSRESOLVEPROC)getProc("radPassResolve");
radPassStore = (PFNRADPASSSTOREPROC)getProc("radPassStore");
radPassClip = (PFNRADPASSCLIPPROC)getProc("radPassClip");
radPassDependencies = (PFNRADPASSDEPENDENCIESPROC)getProc("radPassDependencies");
radPassTilingBoundary = (PFNRADPASSTILINGBOUNDARYPROC)getProc("radPassTilingBoundary");
radPassTileFilterWidth = (PFNRADPASSTILEFILTERWIDTHPROC)getProc("radPassTileFilterWidth");
radPassTileFootprint = (PFNRADPASSTILEFOOTPRINTPROC)getProc("radPassTileFootprint");
radCreateSync = (PFNRADCREATESYNCPROC)getProc("radCreateSync");
radReferenceSync = (PFNRADREFERENCESYNCPROC)getProc("radReferenceSync");
radReleaseSync = (PFNRADRELEASESYNCPROC)getProc("radReleaseSync");
radQueueFenceSync = (PFNRADQUEUEFENCESYNCPROC)getProc("radQueueFenceSync");
radWaitSync = (PFNRADWAITSYNCPROC)getProc("radWaitSync");
radQueueWaitSync = (PFNRADQUEUEWAITSYNCPROC)getProc("radQueueWaitSync");
} // radLoadProcs
/*
** Copyright 1998-2014, NVIDIA Corporation.
** All Rights Reserved.
**
** THE INFORMATION CONTAINED HEREIN IS PROPRIETARY AND CONFIDENTIAL TO
** NVIDIA, CORPORATION. USE, REPRODUCTION OR DISCLOSURE TO ANY THIRD PARTY
** IS SUBJECT TO WRITTEN PRE-APPROVAL BY NVIDIA, CORPORATION.
*/
/* THIS FILE IS AUTOMATICALLY GENERATED - DO NOT EDIT */
#ifndef __radfnptrinit_h_
#define __radfnptrinit_h_
#include "rad.h"
#ifdef __cplusplus
extern "C" {
#endif
extern PFNRADCREATEDEVICEPROC radCreateDevice;
extern PFNRADREFERENCEDEVICEPROC radReferenceDevice;
extern PFNRADRELEASEDEVICEPROC radReleaseDevice;
extern PFNRADGETTOKENHEADERPROC radGetTokenHeader;
extern PFNRADCREATEQUEUEPROC radCreateQueue;
extern PFNRADREFERENCEQUEUEPROC radReferenceQueue;
extern PFNRADRELEASEQUEUEPROC radReleaseQueue;
extern PFNRADQUEUETAGBUFFERPROC radQueueTagBuffer;
extern PFNRADQUEUETAGTEXTUREPROC radQueueTagTexture;
extern PFNRADQUEUESUBMITCOMMANDSPROC radQueueSubmitCommands;
extern PFNRADFLUSHQUEUEPROC radFlushQueue;
extern PFNRADFINISHQUEUEPROC radFinishQueue;
extern PFNRADQUEUEVIEWPORTPROC radQueueViewport;
extern PFNRADQUEUESCISSORPROC radQueueScissor;
extern PFNRADQUEUECOPYBUFFERTOIMAGEPROC radQueueCopyBufferToImage;
extern PFNRADQUEUECOPYIMAGETOBUFFERPROC radQueueCopyImageToBuffer;
extern PFNRADQUEUECOPYBUFFERPROC radQueueCopyBuffer;
extern PFNRADQUEUECLEARCOLORPROC radQueueClearColor;
extern PFNRADQUEUECLEARDEPTHPROC radQueueClearDepth;
extern PFNRADQUEUECLEARSTENCILPROC radQueueClearStencil;
extern PFNRADQUEUEPRESENTPROC radQueuePresent;
extern PFNRADQUEUEDRAWARRAYSPROC radQueueDrawArrays;
extern PFNRADQUEUEDRAWELEMENTSPROC radQueueDrawElements;
extern PFNRADQUEUEBINDPIPELINEPROC radQueueBindPipeline;
extern PFNRADQUEUEBINDGROUPPROC radQueueBindGroup;
extern PFNRADQUEUEBEGINPASSPROC radQueueBeginPass;
extern PFNRADQUEUEENDPASSPROC radQueueEndPass;
extern PFNRADQUEUESUBMITDYNAMICPROC radQueueSubmitDynamic;
extern PFNRADQUEUESTENCILVALUEMASKPROC radQueueStencilValueMask;
extern PFNRADQUEUESTENCILMASKPROC radQueueStencilMask;
extern PFNRADQUEUESTENCILREFPROC radQueueStencilRef;
extern PFNRADQUEUEBLENDCOLORPROC radQueueBlendColor;
extern PFNRADQUEUEPOINTSIZEPROC radQueuePointSize;
extern PFNRADQUEUELINEWIDTHPROC radQueueLineWidth;
extern PFNRADQUEUEPOLYGONOFFSETCLAMPPROC radQueuePolygonOffsetClamp;
extern PFNRADQUEUESAMPLEMASKPROC radQueueSampleMask;
extern PFNRADCREATEPROGRAMPROC radCreateProgram;
extern PFNRADREFERENCEPROGRAMPROC radReferenceProgram;
extern PFNRADRELEASEPROGRAMPROC radReleaseProgram;
extern PFNRADPROGRAMSOURCEPROC radProgramSource;
extern PFNRADCREATEBUFFERPROC radCreateBuffer;
extern PFNRADREFERENCEBUFFERPROC radReferenceBuffer;
extern PFNRADRELEASEBUFFERPROC radReleaseBuffer;
extern PFNRADBUFFERACCESSPROC radBufferAccess;
extern PFNRADBUFFERMAPACCESSPROC radBufferMapAccess;
extern PFNRADBUFFERSTORAGEPROC radBufferStorage;
extern PFNRADMAPBUFFERPROC radMapBuffer;
extern PFNRADGETVERTEXHANDLEPROC radGetVertexHandle;
extern PFNRADGETINDEXHANDLEPROC radGetIndexHandle;
extern PFNRADGETUNIFORMHANDLEPROC radGetUniformHandle;
extern PFNRADGETBINDGROUPHANDLEPROC radGetBindGroupHandle;
extern PFNRADCREATETEXTUREPROC radCreateTexture;
extern PFNRADREFERENCETEXTUREPROC radReferenceTexture;
extern PFNRADRELEASETEXTUREPROC radReleaseTexture;
extern PFNRADTEXTUREACCESSPROC radTextureAccess;
extern PFNRADTEXTURESTORAGEPROC radTextureStorage;
extern PFNRADGETTEXTURESAMPLERHANDLEPROC radGetTextureSamplerHandle;
extern PFNRADGETTEXTURERENDERTARGETHANDLEPROC radGetTextureRenderTargetHandle;
extern PFNRADCREATESAMPLERPROC radCreateSampler;
extern PFNRADREFERENCESAMPLERPROC radReferenceSampler;
extern PFNRADRELEASESAMPLERPROC radReleaseSampler;
extern PFNRADSAMPLERDEFAULTPROC radSamplerDefault;
extern PFNRADSAMPLERMINMAGFILTERPROC radSamplerMinMagFilter;
extern PFNRADSAMPLERWRAPMODEPROC radSamplerWrapMode;
extern PFNRADSAMPLERLODCLAMPPROC radSamplerLodClamp;
extern PFNRADSAMPLERLODBIASPROC radSamplerLodBias;
extern PFNRADSAMPLERCOMPAREPROC radSamplerCompare;
extern PFNRADSAMPLERBORDERCOLORFLOATPROC radSamplerBorderColorFloat;
extern PFNRADSAMPLERBORDERCOLORINTPROC radSamplerBorderColorInt;
extern PFNRADCREATECOLORSTATEPROC radCreateColorState;
extern PFNRADREFERENCECOLORSTATEPROC radReferenceColorState;
extern PFNRADRELEASECOLORSTATEPROC radReleaseColorState;
extern PFNRADCOLORDEFAULTPROC radColorDefault;
extern PFNRADCOLORBLENDENABLEPROC radColorBlendEnable;
extern PFNRADCOLORBLENDFUNCPROC radColorBlendFunc;
extern PFNRADCOLORBLENDEQUATIONPROC radColorBlendEquation;
extern PFNRADCOLORMASKPROC radColorMask;
extern PFNRADCOLORNUMTARGETSPROC radColorNumTargets;
extern PFNRADCOLORLOGICOPENABLEPROC radColorLogicOpEnable;
extern PFNRADCOLORLOGICOPPROC radColorLogicOp;
extern PFNRADCOLORALPHATOCOVERAGEENABLEPROC radColorAlphaToCoverageEnable;
extern PFNRADCOLORBLENDCOLORPROC radColorBlendColor;
extern PFNRADCOLORDYNAMICPROC radColorDynamic;
extern PFNRADCREATERASTERSTATEPROC radCreateRasterState;
extern PFNRADREFERENCERASTERSTATEPROC radReferenceRasterState;
extern PFNRADRELEASERASTERSTATEPROC radReleaseRasterState;
extern PFNRADRASTERDEFAULTPROC radRasterDefault;
extern PFNRADRASTERPOINTSIZEPROC radRasterPointSize;
extern PFNRADRASTERLINEWIDTHPROC radRasterLineWidth;
extern PFNRADRASTERCULLFACEPROC radRasterCullFace;
extern PFNRADRASTERFRONTFACEPROC radRasterFrontFace;
extern PFNRADRASTERPOLYGONMODEPROC radRasterPolygonMode;
extern PFNRADRASTERPOLYGONOFFSETCLAMPPROC radRasterPolygonOffsetClamp;
extern PFNRADRASTERPOLYGONOFFSETENABLESPROC radRasterPolygonOffsetEnables;
extern PFNRADRASTERDISCARDENABLEPROC radRasterDiscardEnable;
extern PFNRADRASTERMULTISAMPLEENABLEPROC radRasterMultisampleEnable;
extern PFNRADRASTERSAMPLESPROC radRasterSamples;
extern PFNRADRASTERSAMPLEMASKPROC radRasterSampleMask;
extern PFNRADRASTERDYNAMICPROC radRasterDynamic;
extern PFNRADCREATEDEPTHSTENCILSTATEPROC radCreateDepthStencilState;
extern PFNRADREFERENCEDEPTHSTENCILSTATEPROC radReferenceDepthStencilState;
extern PFNRADRELEASEDEPTHSTENCILSTATEPROC radReleaseDepthStencilState;
extern PFNRADDEPTHSTENCILDEFAULTPROC radDepthStencilDefault;
extern PFNRADDEPTHSTENCILDEPTHTESTENABLEPROC radDepthStencilDepthTestEnable;
extern PFNRADDEPTHSTENCILDEPTHWRITEENABLEPROC radDepthStencilDepthWriteEnable;
extern PFNRADDEPTHSTENCILDEPTHFUNCPROC radDepthStencilDepthFunc;
extern PFNRADDEPTHSTENCILSTENCILTESTENABLEPROC radDepthStencilStencilTestEnable;
extern PFNRADDEPTHSTENCILSTENCILFUNCPROC radDepthStencilStencilFunc;
extern PFNRADDEPTHSTENCILSTENCILOPPROC radDepthStencilStencilOp;
extern PFNRADDEPTHSTENCILSTENCILMASKPROC radDepthStencilStencilMask;
extern PFNRADDEPTHSTENCILDYNAMICPROC radDepthStencilDynamic;
extern PFNRADCREATEVERTEXSTATEPROC radCreateVertexState;
extern PFNRADREFERENCEVERTEXSTATEPROC radReferenceVertexState;
extern PFNRADRELEASEVERTEXSTATEPROC radReleaseVertexState;
extern PFNRADVERTEXDEFAULTPROC radVertexDefault;
extern PFNRADVERTEXATTRIBFORMATPROC radVertexAttribFormat;
extern PFNRADVERTEXATTRIBBINDINGPROC radVertexAttribBinding;
extern PFNRADVERTEXBINDINGGROUPPROC radVertexBindingGroup;
extern PFNRADVERTEXATTRIBENABLEPROC radVertexAttribEnable;
extern PFNRADVERTEXBINDINGSTRIDEPROC radVertexBindingStride;
extern PFNRADCREATERTFORMATSTATEPROC radCreateRtFormatState;
extern PFNRADREFERENCERTFORMATSTATEPROC radReferenceRtFormatState;
extern PFNRADRELEASERTFORMATSTATEPROC radReleaseRtFormatState;
extern PFNRADRTFORMATDEFAULTPROC radRtFormatDefault;
extern PFNRADRTFORMATCOLORFORMATPROC radRtFormatColorFormat;
extern PFNRADRTFORMATDEPTHFORMATPROC radRtFormatDepthFormat;
extern PFNRADRTFORMATSTENCILFORMATPROC radRtFormatStencilFormat;
extern PFNRADRTFORMATCOLORSAMPLESPROC radRtFormatColorSamples;
extern PFNRADRTFORMATDEPTHSTENCILSAMPLESPROC radRtFormatDepthStencilSamples;
extern PFNRADCREATEPIPELINEPROC radCreatePipeline;
extern PFNRADREFERENCEPIPELINEPROC radReferencePipeline;
extern PFNRADRELEASEPIPELINEPROC radReleasePipeline;
extern PFNRADPIPELINEPROGRAMSTAGESPROC radPipelineProgramStages;
extern PFNRADPIPELINEVERTEXSTATEPROC radPipelineVertexState;
extern PFNRADPIPELINECOLORSTATEPROC radPipelineColorState;
extern PFNRADPIPELINERASTERSTATEPROC radPipelineRasterState;
extern PFNRADPIPELINEDEPTHSTENCILSTATEPROC radPipelineDepthStencilState;
extern PFNRADPIPELINERTFORMATSTATEPROC radPipelineRtFormatState;
extern PFNRADPIPELINEPRIMITIVETYPEPROC radPipelinePrimitiveType;
extern PFNRADCOMPILEPIPELINEPROC radCompilePipeline;
extern PFNRADGETPIPELINEHANDLEPROC radGetPipelineHandle;
extern PFNRADCREATECOMMANDBUFFERPROC radCreateCommandBuffer;
extern PFNRADREFERENCECOMMANDBUFFERPROC radReferenceCommandBuffer;
extern PFNRADRELEASECOMMANDBUFFERPROC radReleaseCommandBuffer;
extern PFNRADCMDBINDPIPELINEPROC radCmdBindPipeline;
extern PFNRADCMDBINDGROUPPROC radCmdBindGroup;
extern PFNRADCMDDRAWARRAYSPROC radCmdDrawArrays;
extern PFNRADCMDDRAWELEMENTSPROC radCmdDrawElements;
extern PFNRADCOMPILECOMMANDBUFFERPROC radCompileCommandBuffer;
extern PFNRADGETCOMMANDHANDLEPROC radGetCommandHandle;
extern PFNRADCMDSTENCILVALUEMASKPROC radCmdStencilValueMask;
extern PFNRADCMDSTENCILMASKPROC radCmdStencilMask;
extern PFNRADCMDSTENCILREFPROC radCmdStencilRef;
extern PFNRADCMDBLENDCOLORPROC radCmdBlendColor;
extern PFNRADCMDPOINTSIZEPROC radCmdPointSize;
extern PFNRADCMDLINEWIDTHPROC radCmdLineWidth;
extern PFNRADCMDPOLYGONOFFSETCLAMPPROC radCmdPolygonOffsetClamp;
extern PFNRADCMDSAMPLEMASKPROC radCmdSampleMask;
extern PFNRADCREATEPASSPROC radCreatePass;
extern PFNRADREFERENCEPASSPROC radReferencePass;
extern PFNRADRELEASEPASSPROC radReleasePass;
extern PFNRADPASSDEFAULTPROC radPassDefault;
extern PFNRADCOMPILEPASSPROC radCompilePass;
extern PFNRADPASSRENDERTARGETSPROC radPassRenderTargets;
extern PFNRADPASSPRESERVEENABLEPROC radPassPreserveEnable;
extern PFNRADPASSDISCARDPROC radPassDiscard;
extern PFNRADPASSRESOLVEPROC radPassResolve;
extern PFNRADPASSSTOREPROC radPassStore;
extern PFNRADPASSCLIPPROC radPassClip;
extern PFNRADPASSDEPENDENCIESPROC radPassDependencies;
extern PFNRADPASSTILINGBOUNDARYPROC radPassTilingBoundary;
extern PFNRADPASSTILEFILTERWIDTHPROC radPassTileFilterWidth;
extern PFNRADPASSTILEFOOTPRINTPROC radPassTileFootprint;
extern PFNRADCREATESYNCPROC radCreateSync;
extern PFNRADREFERENCESYNCPROC radReferenceSync;
extern PFNRADRELEASESYNCPROC radReleaseSync;
extern PFNRADQUEUEFENCESYNCPROC radQueueFenceSync;
extern PFNRADWAITSYNCPROC radWaitSync;
extern PFNRADQUEUEWAITSYNCPROC radQueueWaitSync;
void radLoadProcs(PFNRADGETPROCADDRESSPROC getProc);
#ifdef __cplusplus
} // extern "C"
#endif
#endif // __radfnptrinit_h_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment