00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef __LIBGPU_TYPES_H__
00027 #define __LIBGPU_TYPES_H__
00028
00031 typedef struct { float d[1]; } float1;
00032
00035 typedef struct { float d[2]; } float2;
00038 typedef struct { float d[3]; } float3;
00041 typedef struct { float d[4]; } float4;
00042
00045 typedef struct { float d[1][1]; } float1x1;
00048 typedef struct { float d[2][1]; } float2x1;
00051 typedef struct { float d[3][1]; } float3x1;
00054 typedef struct { float d[4][1]; } float4x1;
00055
00058 typedef struct { float d[1][2]; } float1x2;
00061 typedef struct { float d[2][2]; } float2x2;
00064 typedef struct { float d[3][2]; } float3x2;
00067 typedef struct { float d[4][2]; } float4x2;
00068
00071 typedef struct { float d[1][3]; } float1x3;
00074 typedef struct { float d[2][3]; } float2x3;
00077 typedef struct { float d[3][3]; } float3x3;
00080 typedef struct { float d[4][3]; } float4x3;
00081
00084 typedef struct { float d[1][4]; } float1x4;
00087 typedef struct { float d[2][4]; } float2x4;
00090 typedef struct { float d[3][4]; } float3x4;
00093 typedef struct { float d[4][4]; } float4x4;
00094
00095
00096 #define LIBGPGPU_PBUFFER 32
00097
00098 #ifdef LIBGPGPU_UNKNOWN
00099 #error Unknown graphics adapter... Only nvidia and ati currently supported.
00100 #define LIBGPGPU_RGBA_INT08 0
00101 #define LIBGPGPU_RGBA_FLOAT16 0
00102 #define LIBGPGPU_RGBA_FLOAT32 0
00103 #define LIBGPGPU_TEXTURE_TARGET08 0
00104 #define LIBGPGPU_TEXTURE_TARGET16 0
00105 #define LIBGPGPU_TEXTURE_TARGET32 0
00106 #endif
00107
00108 #ifdef LIBGPGPU_ATI
00109 #include <Performer/opengl.h>
00110 #define LIBGPGPU_RGBA_INT08 GL_RGBA
00111 #define LIBGPGPU_RGBA_FLOAT16 GL_RGBA_FLOAT16_ATI
00112 #define LIBGPGPU_RGBA_FLOAT32 GL_RGBA_FLOAT32_ATI
00113 #define LIBGPGPU_TEXTURE_TARGET08 GL_TEXTURE_2D
00114 #define LIBGPGPU_TEXTURE_TARGET16 GL_TEXTURE_2D
00115 #define LIBGPGPU_TEXTURE_TARGET32 GL_TEXTURE_2D
00116 #endif
00117
00118 #ifdef LIBGPGPU_NVIDIA
00119 #define LIBGPGPU_RGBA_INT08 GL_RGBA
00120 #define LIBGPGPU_RGBA_FLOAT16 GL_FLOAT_RGBA16_NV
00121 #define LIBGPGPU_RGBA_FLOAT32 GL_FLOAT_RGBA32_NV
00122 #define LIBGPGPU_TEXTURE_TARGET08 GL_TEXTURE_RECTANGLE_NV
00123 #define LIBGPGPU_TEXTURE_TARGET16 GL_TEXTURE_RECTANGLE_NV
00124 #define LIBGPGPU_TEXTURE_TARGET32 GL_TEXTURE_RECTANGLE_NV
00125 #endif
00126
00127 #endif