d3d8: Move the capability detection code over to WineD3D.
Let the few existing parts which need the capabiliteis use the WineD3D capability structure (gl_info). This info structure contains next to 'flags' inidicating certain features also all GL/GLX functions pointers. Because D3D8 moves over to the wined3d gl_info structure all the gl prototypes in d3dcore_gl.h were unneeded and removed.
This commit is contained in:
parent
0014e50465
commit
b24e69dc38
|
@ -187,6 +187,9 @@ typedef struct IDirect3DVertexShaderImpl IDirect3DVertexShaderImpl;
|
|||
typedef struct IDirect3DPixelShaderImpl IDirect3DPixelShaderImpl;
|
||||
typedef struct IDirect3DVertexShaderDeclarationImpl IDirect3DVertexShaderDeclarationImpl;
|
||||
|
||||
/* Advance declaration of structures to satisfy compiler */
|
||||
typedef struct IWineD3DStateBlockImpl IWineD3DStateBlockImpl;
|
||||
|
||||
typedef struct D3DSHADERVECTOR {
|
||||
float x;
|
||||
float y;
|
||||
|
@ -295,14 +298,14 @@ struct PLIGHTINFOEL {
|
|||
} \
|
||||
}
|
||||
|
||||
#include "wine/wined3d_gl.h"
|
||||
#include "d3dcore_gl.h"
|
||||
|
||||
|
||||
#define GL_LIMITS(ExtName) (This->direct3d8->gl_info.max_##ExtName)
|
||||
#define GL_SUPPORT(ExtName) (TRUE == This->direct3d8->gl_info.supported[ExtName])
|
||||
#define GL_SUPPORT_DEV(ExtName, dev) (TRUE == (dev)->direct3d8->gl_info.supported[ExtName])
|
||||
#define GL_EXTCALL(FuncName) (This->direct3d8->gl_info.FuncName)
|
||||
#define GL_EXTCALL_DEV(FuncName, dev) ((dev)->direct3d8->gl_info.FuncName)
|
||||
#define GL_LIMITS(ExtName) (((IWineD3DImpl*)((IWineD3DDeviceImpl*)(This->WineD3DDevice))->wineD3D)->gl_info.max_##ExtName)
|
||||
#define GL_SUPPORT(ExtName) (((IWineD3DImpl*)((IWineD3DDeviceImpl*)(This->WineD3DDevice))->wineD3D)->gl_info.supported[ExtName] == TRUE)
|
||||
#define GL_EXTCALL(FuncName) (((IWineD3DImpl*)((IWineD3DDeviceImpl*)(This->WineD3DDevice))->wineD3D)->gl_info.FuncName)
|
||||
#define GL_VENDOR_NAME(This) (((IWineD3DImpl*)((IWineD3DDeviceImpl*)(This->WineD3DDevice))->wineD3D)->gl_info.gl_vendor)
|
||||
|
||||
#define D3DCOLOR_B_R(dw) (((dw) >> 16) & 0xFF)
|
||||
#define D3DCOLOR_B_G(dw) (((dw) >> 8) & 0xFF)
|
||||
|
@ -336,6 +339,25 @@ struct PLIGHTINFOEL {
|
|||
The interfactes themselves
|
||||
=========================================================================== */
|
||||
|
||||
/*****************************************************************************
|
||||
* IWineD3D implementation structure
|
||||
*/
|
||||
typedef struct IWineD3DImpl
|
||||
{
|
||||
/* IUnknown fields */
|
||||
const IWineD3DVtbl *lpVtbl;
|
||||
LONG ref; /* Note: Ref counting not required */
|
||||
|
||||
/* WineD3D Information */
|
||||
IUnknown *parent;
|
||||
UINT dxVersion;
|
||||
|
||||
/* GL Information */
|
||||
BOOL isGLInfoValid;
|
||||
WineD3D_GL_Info gl_info;
|
||||
} IWineD3DImpl;
|
||||
|
||||
|
||||
/* ---------- */
|
||||
/* IDirect3D8 */
|
||||
/* ---------- */
|
||||
|
@ -358,8 +380,6 @@ struct IDirect3D8Impl
|
|||
IWineD3D *WineD3D;
|
||||
|
||||
/* IDirect3D8 fields */
|
||||
GL_Info gl_info;
|
||||
BOOL isGLInfoValid;
|
||||
IDirect3D8Impl *direct3d8;
|
||||
};
|
||||
|
||||
|
@ -389,6 +409,121 @@ extern HRESULT WINAPI IDirect3D8Impl_CreateDevice(LPDIRECT3D8 iface, UINT Adap
|
|||
DWORD BehaviorFlags, D3DPRESENT_PARAMETERS* pPresentationParameters,
|
||||
IDirect3DDevice8** ppReturnedDeviceInterface);
|
||||
|
||||
#define MAX_SAMPLERS 16
|
||||
#define MAX_TEXTURES 8
|
||||
#define CONTEXT_CACHE 100
|
||||
|
||||
#define MAX_VSHADER_CONSTANTS 96
|
||||
#define MAX_PSHADER_CONSTANTS 32
|
||||
|
||||
typedef struct SwapChainList {
|
||||
IWineD3DSwapChain *swapchain;
|
||||
struct SwapChainList *next;
|
||||
} SwapChainList;
|
||||
|
||||
/** Hacked out start of a context manager!! **/
|
||||
typedef struct glContext {
|
||||
int Width;
|
||||
int Height;
|
||||
int usedcount;
|
||||
GLXContext context;
|
||||
|
||||
Drawable drawable;
|
||||
IWineD3DSurface *pSurface;
|
||||
} glContext;
|
||||
|
||||
typedef struct ResourceList {
|
||||
IWineD3DResource *resource;
|
||||
struct ResourceList *next;
|
||||
} ResourceList;
|
||||
|
||||
/*****************************************************************************
|
||||
* IWineD3DDevice implementation structure
|
||||
*/
|
||||
typedef struct IWineD3DDeviceImpl
|
||||
{
|
||||
/* IUnknown fields */
|
||||
const IWineD3DDeviceVtbl *lpVtbl;
|
||||
LONG ref; /* Note: Ref counting not required */
|
||||
|
||||
/* WineD3D Information */
|
||||
IUnknown *parent;
|
||||
IWineD3D *wineD3D;
|
||||
|
||||
/* X and GL Information */
|
||||
GLint maxConcurrentLights;
|
||||
|
||||
/* Optimization */
|
||||
BOOL modelview_valid;
|
||||
BOOL proj_valid;
|
||||
BOOL view_ident; /* true iff view matrix is identity */
|
||||
BOOL last_was_rhw; /* true iff last draw_primitive was in xyzrhw mode */
|
||||
GLenum tracking_parm; /* Which source is tracking current colour */
|
||||
LONG tracking_color; /* used iff GL_COLOR_MATERIAL was enabled */
|
||||
#define DISABLED_TRACKING 0 /* Disabled */
|
||||
#define IS_TRACKING 1 /* tracking_parm is tracking diffuse color */
|
||||
#define NEEDS_TRACKING 2 /* Tracking needs to be enabled when needed */
|
||||
#define NEEDS_DISABLE 3 /* Tracking needs to be disabled when needed*/
|
||||
UINT srcBlend;
|
||||
UINT dstBlend;
|
||||
UINT alphafunc;
|
||||
UINT stencilfunc;
|
||||
BOOL texture_shader_active; /* TODO: Confirm use is correct */
|
||||
|
||||
/* State block related */
|
||||
BOOL isRecordingState;
|
||||
IWineD3DStateBlockImpl *stateBlock;
|
||||
IWineD3DStateBlockImpl *updateStateBlock;
|
||||
|
||||
/* Internal use fields */
|
||||
D3DDEVICE_CREATION_PARAMETERS createParms;
|
||||
UINT adapterNo;
|
||||
D3DDEVTYPE devType;
|
||||
|
||||
SwapChainList *swapchains;
|
||||
|
||||
ResourceList *resources; /* a linked list to track resources created by the device */
|
||||
|
||||
/* Render Target Support */
|
||||
IWineD3DSurface *depthStencilBuffer;
|
||||
|
||||
IWineD3DSurface *renderTarget;
|
||||
IWineD3DSurface *stencilBufferTarget;
|
||||
|
||||
/* palettes texture management */
|
||||
PALETTEENTRY palettes[MAX_PALETTES][256];
|
||||
UINT currentPalette;
|
||||
|
||||
/* For rendering to a texture using glCopyTexImage */
|
||||
BOOL renderUpsideDown;
|
||||
|
||||
/* Cursor management */
|
||||
BOOL bCursorVisible;
|
||||
UINT xHotSpot;
|
||||
UINT yHotSpot;
|
||||
UINT xScreenSpace;
|
||||
UINT yScreenSpace;
|
||||
|
||||
/* Textures for when no other textures are mapped */
|
||||
UINT dummyTextureName[MAX_TEXTURES];
|
||||
|
||||
/* Debug stream management */
|
||||
BOOL debug;
|
||||
|
||||
/* Device state management */
|
||||
HRESULT state;
|
||||
|
||||
/* Screen buffer resources */
|
||||
glContext contextCache[CONTEXT_CACHE];
|
||||
|
||||
/* A flag to check if endscene has been called before changing the render tartet */
|
||||
BOOL sceneEnded;
|
||||
|
||||
/* process vertex shaders using software or hardware */
|
||||
BOOL softwareVertexProcessing;
|
||||
|
||||
} IWineD3DDeviceImpl;
|
||||
|
||||
/* ---------------- */
|
||||
/* IDirect3DDevice8 */
|
||||
/* ---------------- */
|
||||
|
@ -1202,6 +1337,95 @@ typedef struct SAVEDSTATES {
|
|||
BOOL clipplane[MAX_CLIPPLANES];
|
||||
} SAVEDSTATES;
|
||||
|
||||
typedef enum {
|
||||
WINESHADERCNST_NONE = 0,
|
||||
WINESHADERCNST_FLOAT = 1,
|
||||
WINESHADERCNST_INTEGER = 2,
|
||||
WINESHADERCNST_BOOL = 3
|
||||
} WINESHADERCNST;
|
||||
|
||||
struct IWineD3DStateBlockImpl
|
||||
{
|
||||
/* IUnknown fields */
|
||||
const IWineD3DStateBlockVtbl *lpVtbl;
|
||||
LONG ref; /* Note: Ref counting not required */
|
||||
|
||||
/* IWineD3DStateBlock information */
|
||||
IUnknown *parent;
|
||||
IWineD3DDeviceImpl *wineD3DDevice;
|
||||
WINED3DSTATEBLOCKTYPE blockType;
|
||||
|
||||
/* Array indicating whether things have been set or changed */
|
||||
SAVEDSTATES changed;
|
||||
SAVEDSTATES set;
|
||||
|
||||
/* Drawing - Vertex Shader or FVF related */
|
||||
DWORD fvf;
|
||||
/* Vertex Shader Declaration */
|
||||
IWineD3DVertexDeclaration *vertexDecl;
|
||||
|
||||
IWineD3DVertexShader *vertexShader;
|
||||
|
||||
/* Vertex Shader Constants */
|
||||
BOOL vertexShaderConstantB[MAX_VSHADER_CONSTANTS];
|
||||
INT vertexShaderConstantI[MAX_VSHADER_CONSTANTS * 4];
|
||||
float vertexShaderConstantF[MAX_VSHADER_CONSTANTS * 4];
|
||||
WINESHADERCNST vertexShaderConstantT[MAX_VSHADER_CONSTANTS]; /* TODO: Think about changing this to a char to possibly save a little memory */
|
||||
|
||||
/* Stream Source */
|
||||
BOOL streamIsUP;
|
||||
UINT streamStride[MAX_STREAMS];
|
||||
UINT streamOffset[MAX_STREAMS];
|
||||
IWineD3DVertexBuffer *streamSource[MAX_STREAMS];
|
||||
UINT streamFreq[MAX_STREAMS];
|
||||
UINT streamFlags[MAX_STREAMS]; /*0 | D3DSTREAMSOURCE_INSTANCEDATA | D3DSTREAMSOURCE_INDEXEDDATA */
|
||||
|
||||
/* Indices */
|
||||
IWineD3DIndexBuffer* pIndexData;
|
||||
UINT baseVertexIndex; /* Note: only used for d3d8 */
|
||||
|
||||
/* Transform */
|
||||
D3DMATRIX transforms[HIGHEST_TRANSFORMSTATE + 1];
|
||||
|
||||
/* Lights */
|
||||
PLIGHTINFOEL *lights; /* NOTE: active GL lights must be front of the chain */
|
||||
|
||||
/* Clipping */
|
||||
double clipplane[MAX_CLIPPLANES][4];
|
||||
WINED3DCLIPSTATUS clip_status;
|
||||
|
||||
/* ViewPort */
|
||||
WINED3DVIEWPORT viewport;
|
||||
|
||||
/* Material */
|
||||
WINED3DMATERIAL material;
|
||||
|
||||
/* Pixel Shader */
|
||||
IWineD3DPixelShader *pixelShader;
|
||||
|
||||
/* Pixel Shader Constants */
|
||||
BOOL pixelShaderConstantB[MAX_PSHADER_CONSTANTS];
|
||||
INT pixelShaderConstantI[MAX_PSHADER_CONSTANTS * 4];
|
||||
float pixelShaderConstantF[MAX_PSHADER_CONSTANTS * 4];
|
||||
WINESHADERCNST pixelShaderConstantT[MAX_PSHADER_CONSTANTS]; /* TODO: Think about changing this to a char to possibly save a little memory */
|
||||
|
||||
/* Indexed Vertex Blending */
|
||||
D3DVERTEXBLENDFLAGS vertex_blend;
|
||||
FLOAT tween_factor;
|
||||
|
||||
/* RenderState */
|
||||
DWORD renderState[WINEHIGHEST_RENDER_STATE + 1];
|
||||
|
||||
/* Texture */
|
||||
IWineD3DBaseTexture *textures[MAX_TEXTURES];
|
||||
int textureDimensions[MAX_SAMPLERS];
|
||||
|
||||
/* Texture State Stage */
|
||||
DWORD textureState[MAX_TEXTURES][WINED3D_HIGHEST_TEXTURE_STATE + 1];
|
||||
/* Sampler States */
|
||||
DWORD samplerState[MAX_SAMPLERS][WINED3D_HIGHEST_SAMPLER_STATE + 1];
|
||||
|
||||
};
|
||||
|
||||
/* ----------------------- */
|
||||
/* IDirect3DStateBlockImpl */
|
||||
|
|
|
@ -22,800 +22,6 @@
|
|||
#ifndef __WINE_D3DCORE_GL_H
|
||||
#define __WINE_D3DCORE_GL_H
|
||||
|
||||
#undef APIENTRY
|
||||
#define APIENTRY
|
||||
|
||||
/**********************************
|
||||
* OpenGL Extensions (EXT and ARB)
|
||||
* defines and functions pointer
|
||||
*/
|
||||
|
||||
/* GL_ARB_point_parameters */
|
||||
#ifndef GL_ARB_point_parameters
|
||||
#define GL_ARB_point_parameters 1
|
||||
#define GL_POINT_SIZE_MIN_ARB 0x8126
|
||||
#define GL_POINT_SIZE_MAX_ARB 0x8127
|
||||
#define GL_POINT_FADE_THRESHOLD_SIZE_ARB 0x8128
|
||||
#define GL_POINT_DISTANCE_ATTENUATION_ARB 0x8129
|
||||
#endif
|
||||
typedef void (APIENTRY * PGLFNGLPOINTPARAMETERFARBPROC) (GLenum pname, GLfloat param);
|
||||
typedef void (APIENTRY * PGLFNGLPOINTPARAMETERFVARBPROC) (GLenum pname, const GLfloat *params);
|
||||
/* GL_ARB_vertex_blend */
|
||||
#ifndef GL_ARB_vertex_blend
|
||||
#define GL_ARB_vertex_blend 1
|
||||
#define GL_MAX_VERTEX_UNITS_ARB 0x86A4
|
||||
#define GL_ACTIVE_VERTEX_UNITS_ARB 0x86A5
|
||||
#define GL_WEIGHT_SUM_UNITY_ARB 0x86A6
|
||||
#define GL_VERTEX_BLEND_ARB 0x86A7
|
||||
#define GL_CURRENT_WEIGHT_ARB 0x86A8
|
||||
#define GL_WEIGHT_ARRAY_TYPE_ARB 0x86A9
|
||||
#define GL_WEIGHT_ARRAY_STRIDE_ARB 0x86AA
|
||||
#define GL_WEIGHT_ARRAY_SIZE_ARB 0x86AB
|
||||
#define GL_WEIGHT_ARRAY_POINTER_ARB 0x86AC
|
||||
#define GL_WEIGHT_ARRAY_ARB 0x86AD
|
||||
#define GL_MODELVIEW0_ARB 0x1700
|
||||
#define GL_MODELVIEW1_ARB 0x850A
|
||||
#define GL_MODELVIEW2_ARB 0x8722
|
||||
#define GL_MODELVIEW3_ARB 0x8723
|
||||
#define GL_MODELVIEW4_ARB 0x8724
|
||||
#define GL_MODELVIEW5_ARB 0x8725
|
||||
#define GL_MODELVIEW6_ARB 0x8726
|
||||
#define GL_MODELVIEW7_ARB 0x8727
|
||||
#define GL_MODELVIEW8_ARB 0x8728
|
||||
#define GL_MODELVIEW9_ARB 0x8729
|
||||
#define GL_MODELVIEW10_ARB 0x872A
|
||||
#define GL_MODELVIEW11_ARB 0x872B
|
||||
#define GL_MODELVIEW12_ARB 0x872C
|
||||
#define GL_MODELVIEW13_ARB 0x872D
|
||||
#define GL_MODELVIEW14_ARB 0x872E
|
||||
#define GL_MODELVIEW15_ARB 0x872F
|
||||
#define GL_MODELVIEW16_ARB 0x8730
|
||||
#define GL_MODELVIEW17_ARB 0x8731
|
||||
#define GL_MODELVIEW18_ARB 0x8732
|
||||
#define GL_MODELVIEW19_ARB 0x8733
|
||||
#define GL_MODELVIEW20_ARB 0x8734
|
||||
#define GL_MODELVIEW21_ARB 0x8735
|
||||
#define GL_MODELVIEW22_ARB 0x8736
|
||||
#define GL_MODELVIEW23_ARB 0x8737
|
||||
#define GL_MODELVIEW24_ARB 0x8738
|
||||
#define GL_MODELVIEW25_ARB 0x8739
|
||||
#define GL_MODELVIEW26_ARB 0x873A
|
||||
#define GL_MODELVIEW27_ARB 0x873B
|
||||
#define GL_MODELVIEW28_ARB 0x873C
|
||||
#define GL_MODELVIEW29_ARB 0x873D
|
||||
#define GL_MODELVIEW30_ARB 0x873E
|
||||
#define GL_MODELVIEW31_ARB 0x873F
|
||||
#endif
|
||||
/* GL_EXT_secondary_color */
|
||||
#ifndef GL_EXT_secondary_color
|
||||
#define GL_EXT_secondary_color 1
|
||||
#define GL_COLOR_SUM_EXT 0x8458
|
||||
#define GL_CURRENT_SECONDARY_COLOR_EXT 0x8459
|
||||
#define GL_SECONDARY_COLOR_ARRAY_SIZE_EXT 0x845A
|
||||
#define GL_SECONDARY_COLOR_ARRAY_TYPE_EXT 0x845B
|
||||
#define GL_SECONDARY_COLOR_ARRAY_STRIDE_EXT 0x845C
|
||||
#define GL_SECONDARY_COLOR_ARRAY_POINTER_EXT 0x845D
|
||||
#define GL_SECONDARY_COLOR_ARRAY_EXT 0x845E
|
||||
#endif
|
||||
typedef void (APIENTRY * PGLFNGLSECONDARYCOLOR3FEXTPROC) (GLfloat red, GLfloat green, GLfloat blue);
|
||||
typedef void (APIENTRY * PGLFNGLSECONDARYCOLOR3FVEXTPROC) (const GLfloat *v);
|
||||
typedef void (APIENTRY * PGLFNGLSECONDARYCOLOR3UBEXTPROC) (GLubyte red, GLubyte green, GLubyte blue);
|
||||
typedef void (APIENTRY * PGLFNGLSECONDARYCOLORPOINTEREXTPROC) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
|
||||
/* GL_EXT_paletted_texture */
|
||||
#ifndef GL_EXT_paletted_texture
|
||||
#define GL_EXT_paletted_texture 1
|
||||
#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
|
||||
#define GL_TEXTURE_INDEX_SIZE_EXT 0x80ED
|
||||
#endif
|
||||
typedef void (APIENTRY * PGLFNGLCOLORTABLEEXTPROC) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table);
|
||||
/* GL_EXT_point_parameters */
|
||||
#ifndef GL_EXT_point_parameters
|
||||
#define GL_EXT_point_parameters 1
|
||||
#define GL_POINT_SIZE_MIN_EXT 0x8126
|
||||
#define GL_POINT_SIZE_MAX_EXT 0x8127
|
||||
#define GL_POINT_FADE_THRESHOLD_SIZE_EXT 0x8128
|
||||
#define GL_DISTANCE_ATTENUATION_EXT 0x8129
|
||||
#endif
|
||||
typedef void (APIENTRY * PGLFNGLPOINTPARAMETERFEXTPROC) (GLenum pname, GLfloat param);
|
||||
typedef void (APIENTRY * PGLFNGLPOINTPARAMETERFVEXTPROC) (GLenum pname, const GLfloat *params);
|
||||
/* GL_EXT_texture_env_combine */
|
||||
#ifndef GL_EXT_texture_env_combine
|
||||
#define GL_EXT_texture_env_combine 1
|
||||
#define GL_COMBINE_EXT 0x8570
|
||||
#define GL_COMBINE_RGB_EXT 0x8571
|
||||
#define GL_COMBINE_ALPHA_EXT 0x8572
|
||||
#define GL_RGB_SCALE_EXT 0x8573
|
||||
#define GL_ADD_SIGNED_EXT 0x8574
|
||||
#define GL_INTERPOLATE_EXT 0x8575
|
||||
#define GL_SUBTRACT_EXT 0x84E7
|
||||
#define GL_CONSTANT_EXT 0x8576
|
||||
#define GL_PRIMARY_COLOR_EXT 0x8577
|
||||
#define GL_PREVIOUS_EXT 0x8578
|
||||
#define GL_SOURCE0_RGB_EXT 0x8580
|
||||
#define GL_SOURCE1_RGB_EXT 0x8581
|
||||
#define GL_SOURCE2_RGB_EXT 0x8582
|
||||
#define GL_SOURCE3_RGB_EXT 0x8583
|
||||
#define GL_SOURCE4_RGB_EXT 0x8584
|
||||
#define GL_SOURCE5_RGB_EXT 0x8585
|
||||
#define GL_SOURCE6_RGB_EXT 0x8586
|
||||
#define GL_SOURCE7_RGB_EXT 0x8587
|
||||
#define GL_SOURCE0_ALPHA_EXT 0x8588
|
||||
#define GL_SOURCE1_ALPHA_EXT 0x8589
|
||||
#define GL_SOURCE2_ALPHA_EXT 0x858A
|
||||
#define GL_SOURCE3_ALPHA_EXT 0x858B
|
||||
#define GL_SOURCE4_ALPHA_EXT 0x858C
|
||||
#define GL_SOURCE5_ALPHA_EXT 0x858D
|
||||
#define GL_SOURCE6_ALPHA_EXT 0x858E
|
||||
#define GL_SOURCE7_ALPHA_EXT 0x858F
|
||||
#define GL_OPERAND0_RGB_EXT 0x8590
|
||||
#define GL_OPERAND1_RGB_EXT 0x8591
|
||||
#define GL_OPERAND2_RGB_EXT 0x8592
|
||||
#define GL_OPERAND3_RGB_EXT 0x8593
|
||||
#define GL_OPERAND4_RGB_EXT 0x8594
|
||||
#define GL_OPERAND5_RGB_EXT 0x8595
|
||||
#define GL_OPERAND6_RGB_EXT 0x8596
|
||||
#define GL_OPERAND7_RGB_EXT 0x8597
|
||||
#define GL_OPERAND0_ALPHA_EXT 0x8598
|
||||
#define GL_OPERAND1_ALPHA_EXT 0x8599
|
||||
#define GL_OPERAND2_ALPHA_EXT 0x859A
|
||||
#define GL_OPERAND3_ALPHA_EXT 0x859B
|
||||
#define GL_OPERAND4_ALPHA_EXT 0x859C
|
||||
#define GL_OPERAND5_ALPHA_EXT 0x859D
|
||||
#define GL_OPERAND6_ALPHA_EXT 0x859E
|
||||
#define GL_OPERAND7_ALPHA_EXT 0x859F
|
||||
#endif
|
||||
/* GL_EXT_texture_env_dot3 */
|
||||
#ifndef GL_EXT_texture_env_dot3
|
||||
#define GL_EXT_texture_env_dot3 1
|
||||
#define GL_DOT3_RGB_EXT 0x8740
|
||||
#define GL_DOT3_RGBA_EXT 0x8741
|
||||
#endif
|
||||
/* GL_EXT_texture_lod_bias */
|
||||
#ifndef GL_EXT_texture_lod_bias
|
||||
#define GL_EXT_texture_lod_bias 1
|
||||
#define GL_MAX_TEXTURE_LOD_BIAS_EXT 0x84FD
|
||||
#define GL_TEXTURE_FILTER_CONTROL_EXT 0x8500
|
||||
#define GL_TEXTURE_LOD_BIAS_EXT 0x8501
|
||||
#endif
|
||||
/* GL_ARB_texture_border_clamp */
|
||||
#ifndef GL_ARB_texture_border_clamp
|
||||
#define GL_ARB_texture_border_clamp 1
|
||||
#define GL_CLAMP_TO_BORDER_ARB 0x812D
|
||||
#endif
|
||||
/* GL_ARB_texture_mirrored_repeat (full support GL1.4) */
|
||||
#ifndef GL_ARB_texture_mirrored_repeat
|
||||
#define GL_ARB_texture_mirrored_repeat 1
|
||||
#define GL_MIRRORED_REPEAT_ARB 0x8370
|
||||
#endif
|
||||
/* GL_ATI_texture_mirror_once */
|
||||
#ifndef GL_ATI_texture_mirror_once
|
||||
#define GL_ATI_texture_mirror_once 1
|
||||
#define GL_MIRROR_CLAMP_ATI 0x8742
|
||||
#define GL_MIRROR_CLAMP_TO_EDGE_ATI 0x8743
|
||||
#endif
|
||||
/* GL_ARB_texture_env_dot3 */
|
||||
#ifndef GL_ARB_texture_env_dot3
|
||||
#define GL_ARB_texture_env_dot3 1
|
||||
#define GL_DOT3_RGB_ARB 0x86AE
|
||||
#define GL_DOT3_RGBA_ARB 0x86AF
|
||||
#endif
|
||||
/* GL_EXT_texture_env_dot3 */
|
||||
#ifndef GL_EXT_texture_env_dot3
|
||||
#define GL_EXT_texture_env_dot3 1
|
||||
#define GL_DOT3_RGB_EXT 0x8740
|
||||
#define GL_DOT3_RGBA_EXT 0x8741
|
||||
#endif
|
||||
/* GL_ARB_vertex_program */
|
||||
#ifndef GL_ARB_vertex_program
|
||||
#define GL_ARB_vertex_program 1
|
||||
#define GL_VERTEX_PROGRAM_ARB 0x8620
|
||||
#define GL_VERTEX_PROGRAM_POINT_SIZE_ARB 0x8642
|
||||
#define GL_VERTEX_PROGRAM_TWO_SIDE_ARB 0x8643
|
||||
#define GL_COLOR_SUM_ARB 0x8458
|
||||
#define GL_PROGRAM_FORMAT_ASCII_ARB 0x8875
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_ENABLED_ARB 0x8622
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_SIZE_ARB 0x8623
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_STRIDE_ARB 0x8624
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_TYPE_ARB 0x8625
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED_ARB 0x886A
|
||||
#define GL_CURRENT_VERTEX_ATTRIB_ARB 0x8626
|
||||
#define GL_VERTEX_ATTRIB_ARRAY_POINTER_ARB 0x8645
|
||||
#define GL_PROGRAM_LENGTH_ARB 0x8627
|
||||
#define GL_PROGRAM_FORMAT_ARB 0x8876
|
||||
#define GL_PROGRAM_BINDING_ARB 0x8677
|
||||
#define GL_PROGRAM_INSTRUCTIONS_ARB 0x88A0
|
||||
#define GL_MAX_PROGRAM_INSTRUCTIONS_ARB 0x88A1
|
||||
#define GL_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A2
|
||||
#define GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB 0x88A3
|
||||
#define GL_PROGRAM_TEMPORARIES_ARB 0x88A4
|
||||
#define GL_MAX_PROGRAM_TEMPORARIES_ARB 0x88A5
|
||||
#define GL_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A6
|
||||
#define GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB 0x88A7
|
||||
#define GL_PROGRAM_PARAMETERS_ARB 0x88A8
|
||||
#define GL_MAX_PROGRAM_PARAMETERS_ARB 0x88A9
|
||||
#define GL_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AA
|
||||
#define GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB 0x88AB
|
||||
#define GL_PROGRAM_ATTRIBS_ARB 0x88AC
|
||||
#define GL_MAX_PROGRAM_ATTRIBS_ARB 0x88AD
|
||||
#define GL_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AE
|
||||
#define GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB 0x88AF
|
||||
#define GL_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B0
|
||||
#define GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB 0x88B1
|
||||
#define GL_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B2
|
||||
#define GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB 0x88B3
|
||||
#define GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB 0x88B4
|
||||
#define GL_MAX_PROGRAM_ENV_PARAMETERS_ARB 0x88B5
|
||||
#define GL_PROGRAM_UNDER_NATIVE_LIMITS_ARB 0x88B6
|
||||
#define GL_PROGRAM_STRING_ARB 0x8628
|
||||
#define GL_PROGRAM_ERROR_POSITION_ARB 0x864B
|
||||
#define GL_CURRENT_MATRIX_ARB 0x8641
|
||||
#define GL_TRANSPOSE_CURRENT_MATRIX_ARB 0x88B7
|
||||
#define GL_CURRENT_MATRIX_STACK_DEPTH_ARB 0x8640
|
||||
#define GL_MAX_VERTEX_ATTRIBS_ARB 0x8869
|
||||
#define GL_MAX_PROGRAM_MATRICES_ARB 0x862F
|
||||
#define GL_MAX_PROGRAM_MATRIX_STACK_DEPTH_ARB 0x862E
|
||||
#define GL_PROGRAM_ERROR_STRING_ARB 0x8874
|
||||
#define GL_MATRIX0_ARB 0x88C0
|
||||
#define GL_MATRIX1_ARB 0x88C1
|
||||
#define GL_MATRIX2_ARB 0x88C2
|
||||
#define GL_MATRIX3_ARB 0x88C3
|
||||
#define GL_MATRIX4_ARB 0x88C4
|
||||
#define GL_MATRIX5_ARB 0x88C5
|
||||
#define GL_MATRIX6_ARB 0x88C6
|
||||
#define GL_MATRIX7_ARB 0x88C7
|
||||
#define GL_MATRIX8_ARB 0x88C8
|
||||
#define GL_MATRIX9_ARB 0x88C9
|
||||
#define GL_MATRIX10_ARB 0x88CA
|
||||
#define GL_MATRIX11_ARB 0x88CB
|
||||
#define GL_MATRIX12_ARB 0x88CC
|
||||
#define GL_MATRIX13_ARB 0x88CD
|
||||
#define GL_MATRIX14_ARB 0x88CE
|
||||
#define GL_MATRIX15_ARB 0x88CF
|
||||
#define GL_MATRIX16_ARB 0x88D0
|
||||
#define GL_MATRIX17_ARB 0x88D1
|
||||
#define GL_MATRIX18_ARB 0x88D2
|
||||
#define GL_MATRIX19_ARB 0x88D3
|
||||
#define GL_MATRIX20_ARB 0x88D4
|
||||
#define GL_MATRIX21_ARB 0x88D5
|
||||
#define GL_MATRIX22_ARB 0x88D6
|
||||
#define GL_MATRIX23_ARB 0x88D7
|
||||
#define GL_MATRIX24_ARB 0x88D8
|
||||
#define GL_MATRIX25_ARB 0x88D9
|
||||
#define GL_MATRIX26_ARB 0x88DA
|
||||
#define GL_MATRIX27_ARB 0x88DB
|
||||
#define GL_MATRIX28_ARB 0x88DC
|
||||
#define GL_MATRIX29_ARB 0x88DD
|
||||
#define GL_MATRIX30_ARB 0x88DE
|
||||
#define GL_MATRIX31_ARB 0x88DF
|
||||
#endif
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB1DARBPROC) (GLuint index, GLdouble x);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB1DVARBPROC) (GLuint index, const GLdouble *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB1FARBPROC) (GLuint index, GLfloat x);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB1FVARBPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB1SARBPROC) (GLuint index, GLshort x);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB1SVARBPROC) (GLuint index, const GLshort *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB2DARBPROC) (GLuint index, GLdouble x, GLdouble y);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB2DVARBPROC) (GLuint index, const GLdouble *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB2FARBPROC) (GLuint index, GLfloat x, GLfloat y);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB2FVARBPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB2SARBPROC) (GLuint index, GLshort x, GLshort y);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB2SVARBPROC) (GLuint index, const GLshort *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB3DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB3DVARBPROC) (GLuint index, const GLdouble *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB3FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB3FVARBPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB3SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB3SVARBPROC) (GLuint index, const GLshort *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4NBVARBPROC) (GLuint index, const GLbyte *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4NIVARBPROC) (GLuint index, const GLint *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4NSVARBPROC) (GLuint index, const GLshort *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4NUBARBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4NUBVARBPROC) (GLuint index, const GLubyte *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4NUIVARBPROC) (GLuint index, const GLuint *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4NUSVARBPROC) (GLuint index, const GLushort *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4BVARBPROC) (GLuint index, const GLbyte *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4DARBPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4DVARBPROC) (GLuint index, const GLdouble *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4FARBPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4FVARBPROC) (GLuint index, const GLfloat *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4IVARBPROC) (GLuint index, const GLint *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4SARBPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4SVARBPROC) (GLuint index, const GLshort *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4UBVARBPROC) (GLuint index, const GLubyte *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4UIVARBPROC) (GLuint index, const GLuint *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIB4USVARBPROC) (GLuint index, const GLushort *v);
|
||||
typedef void (APIENTRY * PGLFNVERTEXATTRIBPOINTERARBPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
|
||||
typedef void (APIENTRY * PGLFNENABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
|
||||
typedef void (APIENTRY * PGLFNDISABLEVERTEXATTRIBARRAYARBPROC) (GLuint index);
|
||||
typedef void (APIENTRY * PGLFNPROGRAMSTRINGARBPROC) (GLenum target, GLenum format, GLsizei len, const GLvoid *string);
|
||||
typedef void (APIENTRY * PGLFNBINDPROGRAMARBPROC) (GLenum target, GLuint program);
|
||||
typedef void (APIENTRY * PGLFNDELETEPROGRAMSARBPROC) (GLsizei n, const GLuint *programs);
|
||||
typedef void (APIENTRY * PGLFNGENPROGRAMSARBPROC) (GLsizei n, GLuint *programs);
|
||||
typedef void (APIENTRY * PGLFNPROGRAMENVPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
||||
typedef void (APIENTRY * PGLFNPROGRAMENVPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
|
||||
typedef void (APIENTRY * PGLFNPROGRAMENVPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
typedef void (APIENTRY * PGLFNPROGRAMENVPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
|
||||
typedef void (APIENTRY * PGLFNPROGRAMLOCALPARAMETER4DARBPROC) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
|
||||
typedef void (APIENTRY * PGLFNPROGRAMLOCALPARAMETER4DVARBPROC) (GLenum target, GLuint index, const GLdouble *params);
|
||||
typedef void (APIENTRY * PGLFNPROGRAMLOCALPARAMETER4FARBPROC) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
|
||||
typedef void (APIENTRY * PGLFNPROGRAMLOCALPARAMETER4FVARBPROC) (GLenum target, GLuint index, const GLfloat *params);
|
||||
typedef void (APIENTRY * PGLFNGETPROGRAMENVPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
|
||||
typedef void (APIENTRY * PGLFNGETPROGRAMENVPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
|
||||
typedef void (APIENTRY * PGLFNGETPROGRAMLOCALPARAMETERDVARBPROC) (GLenum target, GLuint index, GLdouble *params);
|
||||
typedef void (APIENTRY * PGLFNGETPROGRAMLOCALPARAMETERFVARBPROC) (GLenum target, GLuint index, GLfloat *params);
|
||||
typedef void (APIENTRY * PGLFNGETPROGRAMIVARBPROC) (GLenum target, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRY * PGLFNGETPROGRAMSTRINGARBPROC) (GLenum target, GLenum pname, GLvoid *string);
|
||||
typedef void (APIENTRY * PGLFNGETVERTEXATTRIBDVARBPROC) (GLuint index, GLenum pname, GLdouble *params);
|
||||
typedef void (APIENTRY * PGLFNGETVERTEXATTRIBFVARBPROC) (GLuint index, GLenum pname, GLfloat *params);
|
||||
typedef void (APIENTRY * PGLFNGETVERTEXATTRIBIVARBPROC) (GLuint index, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRY * PGLFNGETVERTEXATTRIBPOINTERVARBPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
|
||||
typedef GLboolean (APIENTRY * PGLFNISPROGRAMARBPROC) (GLuint program);
|
||||
#ifndef GL_ARB_fragment_program
|
||||
#define GL_ARB_fragment_program 1
|
||||
#define GL_FRAGMENT_PROGRAM_ARB 0x8804
|
||||
#define GL_PROGRAM_ALU_INSTRUCTIONS_ARB 0x8805
|
||||
#define GL_PROGRAM_TEX_INSTRUCTIONS_ARB 0x8806
|
||||
#define GL_PROGRAM_TEX_INDIRECTIONS_ARB 0x8807
|
||||
#define GL_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x8808
|
||||
#define GL_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x8809
|
||||
#define GL_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x880A
|
||||
#define GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB 0x880B
|
||||
#define GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB 0x880C
|
||||
#define GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB 0x880D
|
||||
#define GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB 0x880E
|
||||
#define GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB 0x880F
|
||||
#define GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB 0x8810
|
||||
#define GL_MAX_TEXTURE_COORDS_ARB 0x8871
|
||||
#define GL_MAX_TEXTURE_IMAGE_UNITS_ARB 0x8872
|
||||
/* All ARB_fragment_program entry points are shared with ARB_vertex_program. */
|
||||
#endif
|
||||
/* GL_EXT_texture_compression_s3tc */
|
||||
#ifndef GL_EXT_texture_compression_s3tc
|
||||
#define GL_EXT_texture_compression_s3tc 1
|
||||
#define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT1_EXT 0x83F1
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT3_EXT 0x83F2
|
||||
#define GL_COMPRESSED_RGBA_S3TC_DXT5_EXT 0x83F3
|
||||
#endif
|
||||
typedef void (APIENTRY * PGLFNCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRY * PGLFNCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRY * PGLFNCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRY * PGLFNCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRY * PGLFNCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRY * PGLFNCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
|
||||
typedef void (APIENTRY * PGLFNGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, void *img);
|
||||
/* GL_EXT_stencil_wrap */
|
||||
#ifndef GL_EXT_stencil_wrap
|
||||
#define GL_EXT_stencil_wrap 1
|
||||
#define GL_INCR_WRAP_EXT 0x8507
|
||||
#define GL_DECR_WRAP_EXT 0x8508
|
||||
#endif
|
||||
/* GL_NV_fog_distance */
|
||||
#ifndef GL_NV_fog_distance
|
||||
#define GL_NV_fog_distance 1
|
||||
#define GL_FOG_DISTANCE_MODE_NV 0x855A
|
||||
#define GL_EYE_RADIAL_NV 0x855B
|
||||
#define GL_EYE_PLANE_ABSOLUTE_NV 0x855C
|
||||
/* reuse GL_EYE_PLANE */
|
||||
#endif
|
||||
/* GL_NV_texgen_reflection */
|
||||
#ifndef GL_NV_texgen_reflection
|
||||
#define GL_NV_texgen_reflection 1
|
||||
#define GL_NORMAL_MAP_NV 0x8511
|
||||
#define GL_REFLECTION_MAP_NV 0x8512
|
||||
#endif
|
||||
/* GL_NV_register_combiners */
|
||||
#ifndef GL_NV_register_combiners
|
||||
#define GL_NV_register_combiners 1
|
||||
#define GL_REGISTER_COMBINERS_NV 0x8522
|
||||
#define GL_VARIABLE_A_NV 0x8523
|
||||
#define GL_VARIABLE_B_NV 0x8524
|
||||
#define GL_VARIABLE_C_NV 0x8525
|
||||
#define GL_VARIABLE_D_NV 0x8526
|
||||
#define GL_VARIABLE_E_NV 0x8527
|
||||
#define GL_VARIABLE_F_NV 0x8528
|
||||
#define GL_VARIABLE_G_NV 0x8529
|
||||
#define GL_CONSTANT_COLOR0_NV 0x852A
|
||||
#define GL_CONSTANT_COLOR1_NV 0x852B
|
||||
#define GL_PRIMARY_COLOR_NV 0x852C
|
||||
#define GL_SECONDARY_COLOR_NV 0x852D
|
||||
#define GL_SPARE0_NV 0x852E
|
||||
#define GL_SPARE1_NV 0x852F
|
||||
#define GL_DISCARD_NV 0x8530
|
||||
#define GL_E_TIMES_F_NV 0x8531
|
||||
#define GL_SPARE0_PLUS_SECONDARY_COLOR_NV 0x8532
|
||||
#define GL_UNSIGNED_IDENTITY_NV 0x8536
|
||||
#define GL_UNSIGNED_INVERT_NV 0x8537
|
||||
#define GL_EXPAND_NORMAL_NV 0x8538
|
||||
#define GL_EXPAND_NEGATE_NV 0x8539
|
||||
#define GL_HALF_BIAS_NORMAL_NV 0x853A
|
||||
#define GL_HALF_BIAS_NEGATE_NV 0x853B
|
||||
#define GL_SIGNED_IDENTITY_NV 0x853C
|
||||
#define GL_SIGNED_NEGATE_NV 0x853D
|
||||
#define GL_SCALE_BY_TWO_NV 0x853E
|
||||
#define GL_SCALE_BY_FOUR_NV 0x853F
|
||||
#define GL_SCALE_BY_ONE_HALF_NV 0x8540
|
||||
#define GL_BIAS_BY_NEGATIVE_ONE_HALF_NV 0x8541
|
||||
#define GL_COMBINER_INPUT_NV 0x8542
|
||||
#define GL_COMBINER_MAPPING_NV 0x8543
|
||||
#define GL_COMBINER_COMPONENT_USAGE_NV 0x8544
|
||||
#define GL_COMBINER_AB_DOT_PRODUCT_NV 0x8545
|
||||
#define GL_COMBINER_CD_DOT_PRODUCT_NV 0x8546
|
||||
#define GL_COMBINER_MUX_SUM_NV 0x8547
|
||||
#define GL_COMBINER_SCALE_NV 0x8548
|
||||
#define GL_COMBINER_BIAS_NV 0x8549
|
||||
#define GL_COMBINER_AB_OUTPUT_NV 0x854A
|
||||
#define GL_COMBINER_CD_OUTPUT_NV 0x854B
|
||||
#define GL_COMBINER_SUM_OUTPUT_NV 0x854C
|
||||
#define GL_MAX_GENERAL_COMBINERS_NV 0x854D
|
||||
#define GL_NUM_GENERAL_COMBINERS_NV 0x854E
|
||||
#define GL_COLOR_SUM_CLAMP_NV 0x854F
|
||||
#define GL_COMBINER0_NV 0x8550
|
||||
#define GL_COMBINER1_NV 0x8551
|
||||
#define GL_COMBINER2_NV 0x8552
|
||||
#define GL_COMBINER3_NV 0x8553
|
||||
#define GL_COMBINER4_NV 0x8554
|
||||
#define GL_COMBINER5_NV 0x8555
|
||||
#define GL_COMBINER6_NV 0x8556
|
||||
#define GL_COMBINER7_NV 0x8557
|
||||
/* reuse GL_TEXTURE0_ARB */
|
||||
/* reuse GL_TEXTURE1_ARB */
|
||||
/* reuse GL_ZERO */
|
||||
/* reuse GL_NONE */
|
||||
/* reuse GL_FOG */
|
||||
#endif
|
||||
typedef void (APIENTRY * PGLFNCOMBINERPARAMETERFVNVPROC) (GLenum pname, const GLfloat *params);
|
||||
typedef void (APIENTRY * PGLFNCOMBINERPARAMETERFNVPROC) (GLenum pname, GLfloat param);
|
||||
typedef void (APIENTRY * PGLFNCOMBINERPARAMETERIVNVPROC) (GLenum pname, const GLint *params);
|
||||
typedef void (APIENTRY * PGLFNCOMBINERPARAMETERINVPROC) (GLenum pname, GLint param);
|
||||
typedef void (APIENTRY * PGLFNCOMBINERINPUTNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
|
||||
typedef void (APIENTRY * PGLFNCOMBINEROUTPUTNVPROC) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum);
|
||||
typedef void (APIENTRY * PGLFNFINALCOMBINERINPUTNVPROC) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage);
|
||||
typedef void (APIENTRY * PGLFNGETCOMBINERINPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params);
|
||||
typedef void (APIENTRY * PGLFNGETCOMBINERINPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRY * PGLFNGETCOMBINEROUTPUTPARAMETERFVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params);
|
||||
typedef void (APIENTRY * PGLFNGETCOMBINEROUTPUTPARAMETERIVNVPROC) (GLenum stage, GLenum portion, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRY * PGLFNGETFINALCOMBINERINPUTPARAMETERFVNVPROC) (GLenum variable, GLenum pname, GLfloat *params);
|
||||
typedef void (APIENTRY * PGLFNGETFINALCOMBINERINPUTPARAMETERIVNVPROC) (GLenum variable, GLenum pname, GLint *params);
|
||||
/* GL_NV_register_combiners2 */
|
||||
#ifndef GL_NV_register_combiners2
|
||||
#define GL_NV_register_combiners2 1
|
||||
#define GL_PER_STAGE_CONSTANTS_NV 0x8535
|
||||
#endif
|
||||
typedef void (APIENTRY * PGLFNCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, const GLfloat *params);
|
||||
typedef void (APIENTRY * PGLFNGETCOMBINERSTAGEPARAMETERFVNVPROC) (GLenum stage, GLenum pname, GLfloat *params);
|
||||
/* GL_NV_texture_shader */
|
||||
#ifndef GL_NV_texture_shader
|
||||
#define GL_NV_texture_shader 1
|
||||
#define GL_OFFSET_TEXTURE_RECTANGLE_NV 0x864C
|
||||
#define GL_OFFSET_TEXTURE_RECTANGLE_SCALE_NV 0x864D
|
||||
#define GL_DOT_PRODUCT_TEXTURE_RECTANGLE_NV 0x864E
|
||||
#define GL_RGBA_UNSIGNED_DOT_PRODUCT_MAPPING_NV 0x86D9
|
||||
#define GL_UNSIGNED_INT_S8_S8_8_8_NV 0x86DA
|
||||
#define GL_UNSIGNED_INT_8_8_S8_S8_REV_NV 0x86DB
|
||||
#define GL_DSDT_MAG_INTENSITY_NV 0x86DC
|
||||
#define GL_SHADER_CONSISTENT_NV 0x86DD
|
||||
#define GL_TEXTURE_SHADER_NV 0x86DE
|
||||
#define GL_SHADER_OPERATION_NV 0x86DF
|
||||
#define GL_CULL_MODES_NV 0x86E0
|
||||
#define GL_OFFSET_TEXTURE_MATRIX_NV 0x86E1
|
||||
#define GL_OFFSET_TEXTURE_SCALE_NV 0x86E2
|
||||
#define GL_OFFSET_TEXTURE_BIAS_NV 0x86E3
|
||||
#define GL_OFFSET_TEXTURE_2D_MATRIX_NV GL_OFFSET_TEXTURE_MATRIX_NV
|
||||
#define GL_OFFSET_TEXTURE_2D_SCALE_NV GL_OFFSET_TEXTURE_SCALE_NV
|
||||
#define GL_OFFSET_TEXTURE_2D_BIAS_NV GL_OFFSET_TEXTURE_BIAS_NV
|
||||
#define GL_PREVIOUS_TEXTURE_INPUT_NV 0x86E4
|
||||
#define GL_CONST_EYE_NV 0x86E5
|
||||
#define GL_PASS_THROUGH_NV 0x86E6
|
||||
#define GL_CULL_FRAGMENT_NV 0x86E7
|
||||
#define GL_OFFSET_TEXTURE_2D_NV 0x86E8
|
||||
#define GL_DEPENDENT_AR_TEXTURE_2D_NV 0x86E9
|
||||
#define GL_DEPENDENT_GB_TEXTURE_2D_NV 0x86EA
|
||||
#define GL_DOT_PRODUCT_NV 0x86EC
|
||||
#define GL_DOT_PRODUCT_DEPTH_REPLACE_NV 0x86ED
|
||||
#define GL_DOT_PRODUCT_TEXTURE_2D_NV 0x86EE
|
||||
#define GL_DOT_PRODUCT_TEXTURE_CUBE_MAP_NV 0x86F0
|
||||
#define GL_DOT_PRODUCT_DIFFUSE_CUBE_MAP_NV 0x86F1
|
||||
#define GL_DOT_PRODUCT_REFLECT_CUBE_MAP_NV 0x86F2
|
||||
#define GL_DOT_PRODUCT_CONST_EYE_REFLECT_CUBE_MAP_NV 0x86F3
|
||||
#define GL_HILO_NV 0x86F4
|
||||
#define GL_DSDT_NV 0x86F5
|
||||
#define GL_DSDT_MAG_NV 0x86F6
|
||||
#define GL_DSDT_MAG_VIB_NV 0x86F7
|
||||
#define GL_HILO16_NV 0x86F8
|
||||
#define GL_SIGNED_HILO_NV 0x86F9
|
||||
#define GL_SIGNED_HILO16_NV 0x86FA
|
||||
#define GL_SIGNED_RGBA_NV 0x86FB
|
||||
#define GL_SIGNED_RGBA8_NV 0x86FC
|
||||
#define GL_SIGNED_RGB_NV 0x86FE
|
||||
#define GL_SIGNED_RGB8_NV 0x86FF
|
||||
#define GL_SIGNED_LUMINANCE_NV 0x8701
|
||||
#define GL_SIGNED_LUMINANCE8_NV 0x8702
|
||||
#define GL_SIGNED_LUMINANCE_ALPHA_NV 0x8703
|
||||
#define GL_SIGNED_LUMINANCE8_ALPHA8_NV 0x8704
|
||||
#define GL_SIGNED_ALPHA_NV 0x8705
|
||||
#define GL_SIGNED_ALPHA8_NV 0x8706
|
||||
#define GL_SIGNED_INTENSITY_NV 0x8707
|
||||
#define GL_SIGNED_INTENSITY8_NV 0x8708
|
||||
#define GL_DSDT8_NV 0x8709
|
||||
#define GL_DSDT8_MAG8_NV 0x870A
|
||||
#define GL_DSDT8_MAG8_INTENSITY8_NV 0x870B
|
||||
#define GL_SIGNED_RGB_UNSIGNED_ALPHA_NV 0x870C
|
||||
#define GL_SIGNED_RGB8_UNSIGNED_ALPHA8_NV 0x870D
|
||||
#define GL_HI_SCALE_NV 0x870E
|
||||
#define GL_LO_SCALE_NV 0x870F
|
||||
#define GL_DS_SCALE_NV 0x8710
|
||||
#define GL_DT_SCALE_NV 0x8711
|
||||
#define GL_MAGNITUDE_SCALE_NV 0x8712
|
||||
#define GL_VIBRANCE_SCALE_NV 0x8713
|
||||
#define GL_HI_BIAS_NV 0x8714
|
||||
#define GL_LO_BIAS_NV 0x8715
|
||||
#define GL_DS_BIAS_NV 0x8716
|
||||
#define GL_DT_BIAS_NV 0x8717
|
||||
#define GL_MAGNITUDE_BIAS_NV 0x8718
|
||||
#define GL_VIBRANCE_BIAS_NV 0x8719
|
||||
#define GL_TEXTURE_BORDER_VALUES_NV 0x871A
|
||||
#define GL_TEXTURE_HI_SIZE_NV 0x871B
|
||||
#define GL_TEXTURE_LO_SIZE_NV 0x871C
|
||||
#define GL_TEXTURE_DS_SIZE_NV 0x871D
|
||||
#define GL_TEXTURE_DT_SIZE_NV 0x871E
|
||||
#define GL_TEXTURE_MAG_SIZE_NV 0x871F
|
||||
#endif
|
||||
/* GL_NV_texture_shader2 */
|
||||
#ifndef GL_NV_texture_shader2
|
||||
#define GL_NV_texture_shader2 1
|
||||
#define GL_DOT_PRODUCT_TEXTURE_3D_NV 0x86EF
|
||||
#endif
|
||||
/* GL_NV_texture_shader3 */
|
||||
#ifndef GL_NV_texture_shader3
|
||||
#define GL_NV_texture_shader3 1
|
||||
#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_NV 0x8850
|
||||
#define GL_OFFSET_PROJECTIVE_TEXTURE_2D_SCALE_NV 0x8851
|
||||
#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8852
|
||||
#define GL_OFFSET_PROJECTIVE_TEXTURE_RECTANGLE_SCALE_NV 0x8853
|
||||
#define GL_OFFSET_HILO_TEXTURE_2D_NV 0x8854
|
||||
#define GL_OFFSET_HILO_TEXTURE_RECTANGLE_NV 0x8855
|
||||
#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_2D_NV 0x8856
|
||||
#define GL_OFFSET_HILO_PROJECTIVE_TEXTURE_RECTANGLE_NV 0x8857
|
||||
#define GL_DEPENDENT_HILO_TEXTURE_2D_NV 0x8858
|
||||
#define GL_DEPENDENT_RGB_TEXTURE_3D_NV 0x8859
|
||||
#define GL_DEPENDENT_RGB_TEXTURE_CUBE_MAP_NV 0x885A
|
||||
#define GL_DOT_PRODUCT_PASS_THROUGH_NV 0x885B
|
||||
#define GL_DOT_PRODUCT_TEXTURE_1D_NV 0x885C
|
||||
#define GL_DOT_PRODUCT_AFFINE_DEPTH_REPLACE_NV 0x885D
|
||||
#define GL_HILO8_NV 0x885E
|
||||
#define GL_SIGNED_HILO8_NV 0x885F
|
||||
#define GL_FORCE_BLUE_TO_ONE_NV 0x8860
|
||||
#endif
|
||||
/* GL_ATI_texture_env_combine3 */
|
||||
#ifndef GL_ATI_texture_env_combine3
|
||||
#define GL_ATI_texture_env_combine3 1
|
||||
#define GL_MODULATE_ADD_ATI 0x8744
|
||||
#define GL_MODULATE_SIGNED_ADD_ATI 0x8745
|
||||
#define GL_MODULATE_SUBTRACT_ATI 0x8746
|
||||
/* #define ONE */
|
||||
/* #define ZERO */
|
||||
#endif
|
||||
|
||||
/* GL_ARB_point_sprite */
|
||||
#ifndef GL_ARB_point_sprite
|
||||
#define GL_ARB_point_sprite 1
|
||||
#define GL_POINT_SPRITE_ARB 0x8861
|
||||
#define GL_COORD_REPLACE_ARB 0x8862
|
||||
#endif
|
||||
|
||||
/* GL_ARB_multisample */
|
||||
#ifndef GL_ARB_multisample
|
||||
#define GL_ARB_multisample 1
|
||||
#define GL_MULTISAMPLE_ARB 0x809D
|
||||
#define GL_SAMPLE_ALPHA_TO_COVERAGE_ARB 0x809E
|
||||
#define GL_SAMPLE_ALPHA_TO_ONE_ARB 0x809F
|
||||
#define GL_SAMPLE_COVERAGE_ARB 0x80A0
|
||||
#define GL_SAMPLE_BUFFERS_ARB 0x80A8
|
||||
#define GL_SAMPLES_ARB 0x80A9
|
||||
#define GL_SAMPLE_COVERAGE_VALUE_ARB 0x80AA
|
||||
#define GL_SAMPLE_COVERAGE_INVERT_ARB 0x80AB
|
||||
#define GL_MULTISAMPLE_BIT_ARB 0x20000000
|
||||
#endif
|
||||
typedef void (APIENTRY * PGLFNSAMPLECOVERAGEARBPROC) (GLclampf value, GLboolean invert);
|
||||
|
||||
/*******
|
||||
* OpenGL Official Version
|
||||
* defines
|
||||
*/
|
||||
|
||||
/* GL_VERSION_1_3 */
|
||||
#if !defined(GL_DOT3_RGBA)
|
||||
# define GL_DOT3_RGBA 0x8741
|
||||
#endif
|
||||
#if !defined(GL_SUBTRACT)
|
||||
# define GL_SUBTRACT 0x84E7
|
||||
#endif
|
||||
|
||||
|
||||
/*********************************
|
||||
* OpenGL GLX Extensions
|
||||
* defines and functions pointer
|
||||
*/
|
||||
|
||||
|
||||
|
||||
/*********************************
|
||||
* OpenGL GLX Official Version
|
||||
* defines and functions pointer
|
||||
*/
|
||||
|
||||
/* GLX_VERSION_1_3 */
|
||||
typedef GLXFBConfig * (APIENTRY * PGLXFNGLXGETFBCONFIGSPROC) (Display *dpy, int screen, int *nelements);
|
||||
typedef GLXFBConfig * (APIENTRY * PGLXFNGLXCHOOSEFBCONFIGPROC) (Display *dpy, int screen, const int *attrib_list, int *nelements);
|
||||
typedef int (APIENTRY * PGLXFNGLXGETFBCONFIGATTRIBPROC) (Display *dpy, GLXFBConfig config, int attribute, int *value);
|
||||
typedef XVisualInfo * (APIENTRY * PGLXFNGLXGETVISUALFROMFBCONFIGPROC) (Display *dpy, GLXFBConfig config);
|
||||
typedef GLXWindow (APIENTRY * PGLXFNGLXCREATEWINDOWPROC) (Display *dpy, GLXFBConfig config, Window win, const int *attrib_list);
|
||||
typedef void (APIENTRY * PGLXFNGLXDESTROYWINDOWPROC) (Display *dpy, GLXWindow win);
|
||||
typedef GLXPixmap (APIENTRY * PGLXFNGLXCREATEPIXMAPPROC) (Display *dpy, GLXFBConfig config, Pixmap pixmap, const int *attrib_list);
|
||||
typedef void (APIENTRY * PGLXFNGLXDESTROYPIXMAPPROC) (Display *dpy, GLXPixmap pixmap);
|
||||
typedef GLXPbuffer (APIENTRY * PGLXFNGLXCREATEPBUFFERPROC) (Display *dpy, GLXFBConfig config, const int *attrib_list);
|
||||
typedef void (APIENTRY * PGLXFNGLXDESTROYPBUFFERPROC) (Display *dpy, GLXPbuffer pbuf);
|
||||
typedef void (APIENTRY * PGLXFNGLXQUERYDRAWABLEPROC) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
|
||||
typedef GLXContext (APIENTRY * PGLXFNGLXCREATENEWCONTEXTPROC) (Display *dpy, GLXFBConfig config, int render_type, GLXContext share_list, Bool direct);
|
||||
typedef Bool (APIENTRY * PGLXFNGLXMAKECONTEXTCURRENTPROC) (Display *dpy, GLXDrawable draw, GLXDrawable read, GLXContext ctx);
|
||||
typedef GLXDrawable (APIENTRY * PGLXFNGLXGETCURRENTREADDRAWABLEPROC) (void);
|
||||
typedef Display * (APIENTRY * PGLXFNGLXGETCURRENTDISPLAYPROC) (void);
|
||||
typedef int (APIENTRY * PGLXFNGLXQUERYCONTEXTPROC) (Display *dpy, GLXContext ctx, int attribute, int *value);
|
||||
typedef void (APIENTRY * PGLXFNGLXSELECTEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long event_mask);
|
||||
typedef void (APIENTRY * PGLXFNGLXGETSELECTEDEVENTPROC) (Display *dpy, GLXDrawable draw, unsigned long *event_mask);
|
||||
|
||||
|
||||
/********************************************
|
||||
* OpenGL Supported Extensions (ARB and EXT)
|
||||
*/
|
||||
|
||||
typedef enum _GL_SupportedExt {
|
||||
/* ARB */
|
||||
ARB_FRAGMENT_PROGRAM,
|
||||
ARB_MULTISAMPLE,
|
||||
ARB_MULTITEXTURE,
|
||||
ARB_POINT_PARAMETERS,
|
||||
ARB_POINT_SPRITE,
|
||||
ARB_TEXTURE_COMPRESSION,
|
||||
ARB_TEXTURE_CUBE_MAP,
|
||||
ARB_TEXTURE_ENV_ADD,
|
||||
ARB_TEXTURE_ENV_COMBINE,
|
||||
ARB_TEXTURE_ENV_DOT3,
|
||||
ARB_TEXTURE_BORDER_CLAMP,
|
||||
ARB_TEXTURE_MIRRORED_REPEAT,
|
||||
ARB_VERTEX_PROGRAM,
|
||||
ARB_VERTEX_BLEND,
|
||||
/* EXT */
|
||||
EXT_FOG_COORD,
|
||||
EXT_PALETTED_TEXTURE,
|
||||
EXT_POINT_PARAMETERS,
|
||||
EXT_SECONDARY_COLOR,
|
||||
EXT_STENCIL_WRAP,
|
||||
EXT_TEXTURE_COMPRESSION_S3TC,
|
||||
EXT_TEXTURE_FILTER_ANISOTROPIC,
|
||||
EXT_TEXTURE_LOD,
|
||||
EXT_TEXTURE_LOD_BIAS,
|
||||
EXT_TEXTURE_ENV_ADD,
|
||||
EXT_TEXTURE_ENV_COMBINE,
|
||||
EXT_TEXTURE_ENV_DOT3,
|
||||
EXT_VERTEX_WEIGHTING,
|
||||
/* NVIDIA */
|
||||
NV_FOG_DISTANCE,
|
||||
NV_FRAGMENT_PROGRAM,
|
||||
NV_REGISTER_COMBINERS,
|
||||
NV_REGISTER_COMBINERS2,
|
||||
NV_TEXGEN_REFLECTION,
|
||||
NV_TEXTURE_ENV_COMBINE4,
|
||||
NV_TEXTURE_SHADER,
|
||||
NV_TEXTURE_SHADER2,
|
||||
NV_TEXTURE_SHADER3,
|
||||
NV_VERTEX_PROGRAM,
|
||||
/* ATI */
|
||||
ATI_TEXTURE_ENV_COMBINE3,
|
||||
ATI_TEXTURE_MIRROR_ONCE,
|
||||
EXT_VERTEX_SHADER,
|
||||
|
||||
OPENGL_SUPPORTED_EXT_END
|
||||
} GL_SupportedExt;
|
||||
|
||||
typedef enum _GL_Vendors {
|
||||
VENDOR_WINE = 0x0,
|
||||
VENDOR_MESA = 0x1,
|
||||
VENDOR_ATI = 0x1002,
|
||||
VENDOR_NVIDIA = 0x10de
|
||||
} GL_Vendors;
|
||||
|
||||
typedef enum _GL_Cards {
|
||||
CARD_WINE = 0x0,
|
||||
CARD_ATI_RADEON_8500 = 0x514c,
|
||||
CARD_ATI_RADEON_9700PRO = 0x4e44,
|
||||
CARD_ATI_RADEON_9800PRO = 0x4e48,
|
||||
CARD_NVIDIA_GEFORCE4_TI4600 = 0x0250,
|
||||
CARD_NVIDIA_GEFORCEFX_5900ULTRA = 0x0330
|
||||
} GL_Cards;
|
||||
|
||||
typedef enum _GL_VSVersion {
|
||||
VS_VERSION_NOT_SUPPORTED = 0x0,
|
||||
VS_VERSION_10 = 0x10,
|
||||
VS_VERSION_11 = 0x11,
|
||||
VS_VERSION_20 = 0x20,
|
||||
VS_VERSION_30 = 0x30,
|
||||
/*Force 32-bits*/
|
||||
VS_VERSION_FORCE_DWORD = 0x7FFFFFFF
|
||||
} GL_VSVersion;
|
||||
|
||||
typedef enum _GL_PSVersion {
|
||||
PS_VERSION_NOT_SUPPORTED = 0x0,
|
||||
PS_VERSION_10 = 0x10,
|
||||
PS_VERSION_11 = 0x11,
|
||||
PS_VERSION_12 = 0x12,
|
||||
PS_VERSION_13 = 0x13,
|
||||
PS_VERSION_14 = 0x14,
|
||||
PS_VERSION_20 = 0x20,
|
||||
PS_VERSION_30 = 0x30,
|
||||
/*Force 32-bits*/
|
||||
PS_VERSION_FORCE_DWORD = 0x7FFFFFFF
|
||||
} GL_PSVersion;
|
||||
|
||||
#define MAKEDWORD_VERSION(maj, min) ((maj & 0x0000FFFF) << 16) | (min & 0x0000FFFF)
|
||||
|
||||
#define GL_EXT_FUNCS_GEN \
|
||||
/** ARB Extensions **/ \
|
||||
/* GL_ARB_point_parameters */ \
|
||||
USE_GL_FUNC(PGLFNGLPOINTPARAMETERFARBPROC, glPointParameterfARB); \
|
||||
USE_GL_FUNC(PGLFNGLPOINTPARAMETERFVARBPROC, glPointParameterfvARB); \
|
||||
/* GL_ARB_texture_compression */ \
|
||||
USE_GL_FUNC(PGLFNCOMPRESSEDTEXIMAGE2DPROC, glCompressedTexImage2DARB); \
|
||||
USE_GL_FUNC(PGLFNCOMPRESSEDTEXIMAGE3DPROC, glCompressedTexImage3DARB); \
|
||||
USE_GL_FUNC(PGLFNCOMPRESSEDTEXSUBIMAGE2DPROC, glCompressedTexSubImage2DARB); \
|
||||
USE_GL_FUNC(PGLFNCOMPRESSEDTEXSUBIMAGE3DPROC, glCompressedTexSubImage3DARB); \
|
||||
/** EXT Extensions **/ \
|
||||
/* GL_EXT_fog_coord */ \
|
||||
/* GL_EXT_paletted_texture */ \
|
||||
USE_GL_FUNC(PGLFNGLCOLORTABLEEXTPROC, glColorTableEXT); \
|
||||
/* GL_EXT_point_parameters */ \
|
||||
USE_GL_FUNC(PGLFNGLPOINTPARAMETERFEXTPROC, glPointParameterfEXT); \
|
||||
USE_GL_FUNC(PGLFNGLPOINTPARAMETERFVEXTPROC, glPointParameterfvEXT); \
|
||||
/* GL_EXT_secondary_color */ \
|
||||
USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3UBEXTPROC, glSecondaryColor3ubEXT); \
|
||||
USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3FEXTPROC, glSecondaryColor3fEXT); \
|
||||
USE_GL_FUNC(PGLFNGLSECONDARYCOLOR3FVEXTPROC, glSecondaryColor3fvEXT); \
|
||||
USE_GL_FUNC(PGLFNGLSECONDARYCOLORPOINTEREXTPROC, glSecondaryColorPointerEXT); \
|
||||
/* GL_EXT_secondary_color */ \
|
||||
USE_GL_FUNC(PGLFNGENPROGRAMSARBPROC, glGenProgramsARB); \
|
||||
USE_GL_FUNC(PGLFNBINDPROGRAMARBPROC, glBindProgramARB); \
|
||||
USE_GL_FUNC(PGLFNPROGRAMSTRINGARBPROC, glProgramStringARB); \
|
||||
USE_GL_FUNC(PGLFNDELETEPROGRAMSARBPROC, glDeleteProgramsARB); \
|
||||
USE_GL_FUNC(PGLFNPROGRAMENVPARAMETER4FVARBPROC, glProgramEnvParameter4fvARB); \
|
||||
USE_GL_FUNC(PGLFNVERTEXATTRIBPOINTERARBPROC, glVertexAttribPointerARB); \
|
||||
USE_GL_FUNC(PGLFNENABLEVERTEXATTRIBARRAYARBPROC, glEnableVertexAttribArrayARB); \
|
||||
USE_GL_FUNC(PGLFNDISABLEVERTEXATTRIBARRAYARBPROC, glDisableVertexAttribArrayARB); \
|
||||
|
||||
#define GLX_EXT_FUNCS_GEN \
|
||||
/** GLX_VERSION_1_3 **/ \
|
||||
USE_GL_FUNC(PGLXFNGLXCREATEPBUFFERPROC, glXCreatePbuffer); \
|
||||
USE_GL_FUNC(PGLXFNGLXDESTROYPBUFFERPROC, glXDestroyPbuffer); \
|
||||
USE_GL_FUNC(PGLXFNGLXCREATEPIXMAPPROC, glXCreatePixmap); \
|
||||
USE_GL_FUNC(PGLXFNGLXDESTROYPIXMAPPROC, glXDestroyPixmap); \
|
||||
USE_GL_FUNC(PGLXFNGLXCREATENEWCONTEXTPROC, glXCreateNewContext); \
|
||||
USE_GL_FUNC(PGLXFNGLXMAKECONTEXTCURRENTPROC, glXMakeContextCurrent); \
|
||||
USE_GL_FUNC(PGLXFNGLXCHOOSEFBCONFIGPROC, glXChooseFBConfig); \
|
||||
|
||||
#undef APIENTRY
|
||||
#undef CALLBACK
|
||||
#undef WINAPI
|
||||
|
||||
/* Redefines the constants */
|
||||
#define CALLBACK __stdcall
|
||||
#define WINAPI __stdcall
|
||||
#define APIENTRY WINAPI
|
||||
|
||||
/* Routine common to the draw primitive and draw indexed primitive routines */
|
||||
void drawPrimitive(LPDIRECT3DDEVICE8 iface,
|
||||
int PrimitiveType,
|
||||
|
@ -855,48 +61,4 @@ typedef struct Direct3DVertexStridedData {
|
|||
} u;
|
||||
} Direct3DVertexStridedData;
|
||||
|
||||
typedef struct _WineD3D_GLContext {
|
||||
GLXContext glCtx;
|
||||
XVisualInfo* visInfo;
|
||||
Display* display;
|
||||
Drawable drawable;
|
||||
DWORD ref;
|
||||
} WineD3D_Context;
|
||||
|
||||
#define USE_GL_FUNC(type, pfn) type pfn;
|
||||
typedef struct _GL_Info {
|
||||
unsigned bIsFilled;
|
||||
|
||||
DWORD glx_version;
|
||||
DWORD gl_version;
|
||||
|
||||
GL_Vendors gl_vendor;
|
||||
GL_Cards gl_card;
|
||||
DWORD gl_driver_version;
|
||||
CHAR gl_renderer[255];
|
||||
/**
|
||||
* CAPS Constants
|
||||
*/
|
||||
UINT max_lights;
|
||||
UINT max_textures;
|
||||
UINT max_clipplanes;
|
||||
|
||||
GL_PSVersion ps_arb_version;
|
||||
GL_PSVersion ps_nv_version;
|
||||
|
||||
GL_VSVersion vs_arb_version;
|
||||
GL_VSVersion vs_nv_version;
|
||||
GL_VSVersion vs_ati_version;
|
||||
|
||||
BOOL supported[50];
|
||||
|
||||
/** OpenGL EXT and ARB functions ptr */
|
||||
GL_EXT_FUNCS_GEN;
|
||||
/** OpenGL GLX functions ptr */
|
||||
GLX_EXT_FUNCS_GEN;
|
||||
/**/
|
||||
} GL_Info;
|
||||
#undef USE_GL_FUNC
|
||||
|
||||
|
||||
#endif /* __WINE_D3DCORE_GL_H */
|
||||
|
|
|
@ -36,7 +36,6 @@
|
|||
#include "d3d8_private.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
||||
WINE_DECLARE_DEBUG_CHANNEL(d3d_caps);
|
||||
|
||||
/* x11drv GDI escapes */
|
||||
#define X11DRV_ESCAPE 6789
|
||||
|
@ -58,9 +57,6 @@ static const D3DFORMAT device_formats[NUM_FORMATS] = {
|
|||
D3DFMT_X8R8G8B8
|
||||
};
|
||||
|
||||
static void IDirect3D8Impl_FillGLCaps(LPDIRECT3D8 iface, Display* display);
|
||||
|
||||
|
||||
/* retrieve the X display to use on a given DC */
|
||||
inline static Display *get_display( HDC hdc )
|
||||
{
|
||||
|
@ -216,357 +212,6 @@ HMONITOR WINAPI IDirect3D8Impl_GetAdapterMonitor(LPDIRECT3D8 iface, UINT Adapte
|
|||
return IWineD3D_GetAdapterMonitor(This->WineD3D, Adapter);
|
||||
}
|
||||
|
||||
static void IDirect3D8Impl_FillGLCaps(LPDIRECT3D8 iface, Display* display) {
|
||||
const char *GL_Extensions = NULL;
|
||||
const char *GLX_Extensions = NULL;
|
||||
GLint gl_max;
|
||||
const char* gl_string = NULL;
|
||||
const char* gl_string_cursor = NULL;
|
||||
Bool test = 0;
|
||||
int major, minor;
|
||||
IDirect3D8Impl *This = (IDirect3D8Impl *)iface;
|
||||
|
||||
if (This->gl_info.bIsFilled) return;
|
||||
This->gl_info.bIsFilled = 1;
|
||||
|
||||
TRACE_(d3d_caps)("(%p, %p)\n", This, display);
|
||||
|
||||
if (NULL != display) {
|
||||
test = glXQueryVersion(display, &major, &minor);
|
||||
This->gl_info.glx_version = ((major & 0x0000FFFF) << 16) | (minor & 0x0000FFFF);
|
||||
gl_string = glXGetClientString(display, GLX_VENDOR);
|
||||
} else {
|
||||
gl_string = (const char*) glGetString(GL_VENDOR);
|
||||
}
|
||||
|
||||
if (strstr(gl_string, "NVIDIA")) {
|
||||
This->gl_info.gl_vendor = VENDOR_NVIDIA;
|
||||
} else if (strstr(gl_string, "ATI")) {
|
||||
This->gl_info.gl_vendor = VENDOR_ATI;
|
||||
} else {
|
||||
This->gl_info.gl_vendor = VENDOR_WINE;
|
||||
}
|
||||
|
||||
TRACE_(d3d_caps)("found GL_VENDOR (%s)->(0x%04x)\n", debugstr_a(gl_string), This->gl_info.gl_vendor);
|
||||
|
||||
gl_string = (const char*) glGetString(GL_VERSION);
|
||||
switch (This->gl_info.gl_vendor) {
|
||||
case VENDOR_NVIDIA:
|
||||
gl_string_cursor = strstr(gl_string, "NVIDIA");
|
||||
gl_string_cursor = strstr(gl_string_cursor, " ");
|
||||
while (*gl_string_cursor && ' ' == *gl_string_cursor) ++gl_string_cursor;
|
||||
if (*gl_string_cursor) {
|
||||
char tmp[16];
|
||||
int cursor = 0;
|
||||
|
||||
while (*gl_string_cursor <= '9' && *gl_string_cursor >= '0') {
|
||||
tmp[cursor++] = *gl_string_cursor;
|
||||
++gl_string_cursor;
|
||||
}
|
||||
tmp[cursor] = 0;
|
||||
major = atoi(tmp);
|
||||
|
||||
if (*gl_string_cursor != '.') WARN_(d3d_caps)("malformed GL_VERSION (%s)\n", debugstr_a(gl_string));
|
||||
++gl_string_cursor;
|
||||
|
||||
while (*gl_string_cursor <= '9' && *gl_string_cursor >= '0') {
|
||||
tmp[cursor++] = *gl_string_cursor;
|
||||
++gl_string_cursor;
|
||||
}
|
||||
tmp[cursor] = 0;
|
||||
minor = atoi(tmp);
|
||||
break;
|
||||
}
|
||||
case VENDOR_ATI:
|
||||
major = minor = 0;
|
||||
gl_string_cursor = strchr(gl_string, '-');
|
||||
if (gl_string_cursor) {
|
||||
int error = 0;
|
||||
gl_string_cursor++;
|
||||
|
||||
/* Check if version number is of the form x.y.z */
|
||||
if (*gl_string_cursor > '9' && *gl_string_cursor < '0')
|
||||
error = 1;
|
||||
if (!error && *(gl_string_cursor+2) > '9' && *(gl_string_cursor+2) < '0')
|
||||
error = 1;
|
||||
if (!error && *(gl_string_cursor+4) > '9' && *(gl_string_cursor+4) < '0')
|
||||
error = 1;
|
||||
if (!error && *(gl_string_cursor+1) != '.' && *(gl_string_cursor+3) != '.')
|
||||
error = 1;
|
||||
/* Mark version number as malformed */
|
||||
if (error)
|
||||
gl_string_cursor = 0;
|
||||
}
|
||||
if (!gl_string_cursor)
|
||||
WARN_(d3d_caps)("malformed GL_VERSION (%s)\n", debugstr_a(gl_string));
|
||||
else {
|
||||
major = *gl_string_cursor - '0';
|
||||
minor = (*(gl_string_cursor+2) - '0') * 256 + (*(gl_string_cursor+4) - '0');
|
||||
}
|
||||
break;
|
||||
default:
|
||||
major = 0;
|
||||
minor = 9;
|
||||
}
|
||||
This->gl_info.gl_driver_version = MAKEDWORD_VERSION(major, minor);
|
||||
|
||||
FIXME_(d3d_caps)("found GL_VERSION (%s)->(0x%08lx)\n", debugstr_a(gl_string), This->gl_info.gl_driver_version);
|
||||
|
||||
gl_string = (const char*) glGetString(GL_RENDERER);
|
||||
strcpy(This->gl_info.gl_renderer, gl_string);
|
||||
|
||||
switch (This->gl_info.gl_vendor) {
|
||||
case VENDOR_NVIDIA:
|
||||
if (strstr(This->gl_info.gl_renderer, "GeForce4 Ti")) {
|
||||
This->gl_info.gl_card = CARD_NVIDIA_GEFORCE4_TI4600;
|
||||
} else if (strstr(This->gl_info.gl_renderer, "GeForceFX")) {
|
||||
This->gl_info.gl_card = CARD_NVIDIA_GEFORCEFX_5900ULTRA;
|
||||
} else {
|
||||
This->gl_info.gl_card = CARD_NVIDIA_GEFORCE4_TI4600;
|
||||
}
|
||||
break;
|
||||
case VENDOR_ATI:
|
||||
if (strstr(This->gl_info.gl_renderer, "RADEON 9800 PRO")) {
|
||||
This->gl_info.gl_card = CARD_ATI_RADEON_9800PRO;
|
||||
} else if (strstr(This->gl_info.gl_renderer, "RADEON 9700 PRO")) {
|
||||
This->gl_info.gl_card = CARD_ATI_RADEON_9700PRO;
|
||||
} else {
|
||||
This->gl_info.gl_card = CARD_ATI_RADEON_8500;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
This->gl_info.gl_card = CARD_WINE;
|
||||
break;
|
||||
}
|
||||
|
||||
FIXME_(d3d_caps)("found GL_RENDERER (%s)->(0x%04x)\n", debugstr_a(This->gl_info.gl_renderer), This->gl_info.gl_card);
|
||||
|
||||
/*
|
||||
* Initialize openGL extension related variables
|
||||
* with Default values
|
||||
*/
|
||||
memset(&This->gl_info.supported, 0, sizeof(This->gl_info.supported));
|
||||
This->gl_info.max_textures = 1;
|
||||
This->gl_info.ps_arb_version = PS_VERSION_NOT_SUPPORTED;
|
||||
This->gl_info.vs_arb_version = VS_VERSION_NOT_SUPPORTED;
|
||||
This->gl_info.vs_nv_version = VS_VERSION_NOT_SUPPORTED;
|
||||
This->gl_info.vs_ati_version = VS_VERSION_NOT_SUPPORTED;
|
||||
|
||||
#define USE_GL_FUNC(type, pfn) This->gl_info.pfn = NULL;
|
||||
GL_EXT_FUNCS_GEN;
|
||||
#undef USE_GL_FUNC
|
||||
|
||||
/* Retrieve opengl defaults */
|
||||
glGetIntegerv(GL_MAX_CLIP_PLANES, &gl_max);
|
||||
This->gl_info.max_clipplanes = min(MAX_CLIPPLANES, gl_max);
|
||||
TRACE_(d3d_caps)("ClipPlanes support - num Planes=%d\n", gl_max);
|
||||
|
||||
glGetIntegerv(GL_MAX_LIGHTS, &gl_max);
|
||||
This->gl_info.max_lights = gl_max;
|
||||
TRACE_(d3d_caps)("Lights support - max lights=%d\n", gl_max);
|
||||
|
||||
/* Parse the gl supported features, in theory enabling parts of our code appropriately */
|
||||
GL_Extensions = (const char*) glGetString(GL_EXTENSIONS);
|
||||
TRACE_(d3d_caps)("GL_Extensions reported:\n");
|
||||
|
||||
if (NULL == GL_Extensions) {
|
||||
ERR(" GL_Extensions returns NULL\n");
|
||||
} else {
|
||||
while (*GL_Extensions != 0x00) {
|
||||
const char *Start = GL_Extensions;
|
||||
char ThisExtn[256];
|
||||
|
||||
memset(ThisExtn, 0x00, sizeof(ThisExtn));
|
||||
while (*GL_Extensions != ' ' && *GL_Extensions != 0x00) {
|
||||
GL_Extensions++;
|
||||
}
|
||||
memcpy(ThisExtn, Start, (GL_Extensions - Start));
|
||||
TRACE_(d3d_caps)("- %s\n", ThisExtn);
|
||||
|
||||
/**
|
||||
* ARB
|
||||
*/
|
||||
if (strcmp(ThisExtn, "GL_ARB_fragment_program") == 0) {
|
||||
This->gl_info.ps_arb_version = PS_VERSION_11;
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Pixel Shader support - version=%02x\n", This->gl_info.ps_arb_version);
|
||||
This->gl_info.supported[ARB_FRAGMENT_PROGRAM] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_ARB_multisample") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Multisample support\n");
|
||||
This->gl_info.supported[ARB_MULTISAMPLE] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_ARB_multitexture") == 0) {
|
||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_max);
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Multitexture support - GL_MAX_TEXTURE_UNITS_ARB=%u\n", gl_max);
|
||||
This->gl_info.supported[ARB_MULTITEXTURE] = TRUE;
|
||||
This->gl_info.max_textures = min(8, gl_max);
|
||||
} else if (strcmp(ThisExtn, "GL_ARB_point_parameters") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Point parameters support\n");
|
||||
This->gl_info.supported[ARB_POINT_PARAMETERS] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_ARB_point_sprite") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Point sprite support\n");
|
||||
This->gl_info.supported[ARB_POINT_SPRITE] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_ARB_texture_cube_map") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Texture Cube Map support\n");
|
||||
This->gl_info.supported[ARB_TEXTURE_CUBE_MAP] = TRUE;
|
||||
TRACE_(d3d_caps)(" IMPLIED: NVIDIA (NV) Texture Gen Reflection support\n");
|
||||
This->gl_info.supported[NV_TEXGEN_REFLECTION] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_ARB_texture_compression") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Texture Compression support\n");
|
||||
This->gl_info.supported[ARB_TEXTURE_COMPRESSION] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_ARB_texture_env_add") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Texture Env Add support\n");
|
||||
This->gl_info.supported[ARB_TEXTURE_ENV_ADD] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_ARB_texture_env_combine") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Texture Env combine support\n");
|
||||
This->gl_info.supported[ARB_TEXTURE_ENV_COMBINE] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_ARB_texture_env_dot3") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Dot3 support\n");
|
||||
This->gl_info.supported[ARB_TEXTURE_ENV_DOT3] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_ARB_texture_border_clamp") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Texture border clamp support\n");
|
||||
This->gl_info.supported[ARB_TEXTURE_BORDER_CLAMP] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_ARB_texture_mirrored_repeat") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Texture mirrored repeat support\n");
|
||||
This->gl_info.supported[ARB_TEXTURE_MIRRORED_REPEAT] = TRUE;
|
||||
} else if (strstr(ThisExtn, "GL_ARB_vertex_program")) {
|
||||
This->gl_info.vs_arb_version = VS_VERSION_11;
|
||||
TRACE_(d3d_caps)(" FOUND: ARB Vertex Shader support - version=%02x\n", This->gl_info.vs_arb_version);
|
||||
This->gl_info.supported[ARB_VERTEX_PROGRAM] = TRUE;
|
||||
|
||||
/**
|
||||
* EXT
|
||||
*/
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_fog_coord") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Fog coord support\n");
|
||||
This->gl_info.supported[EXT_FOG_COORD] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_paletted_texture") == 0) { /* handle paletted texture extensions */
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Paletted texture support\n");
|
||||
This->gl_info.supported[EXT_PALETTED_TEXTURE] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_point_parameters") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Point parameters support\n");
|
||||
This->gl_info.supported[EXT_POINT_PARAMETERS] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_secondary_color") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Secondary coord support\n");
|
||||
This->gl_info.supported[EXT_SECONDARY_COLOR] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_stencil_wrap") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Stencil wrap support\n");
|
||||
This->gl_info.supported[EXT_STENCIL_WRAP] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_texture_compression_s3tc") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Texture S3TC compression support\n");
|
||||
This->gl_info.supported[EXT_TEXTURE_COMPRESSION_S3TC] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_texture_env_add") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Texture Env Add support\n");
|
||||
This->gl_info.supported[EXT_TEXTURE_ENV_ADD] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_texture_env_combine") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Texture Env combine support\n");
|
||||
This->gl_info.supported[EXT_TEXTURE_ENV_COMBINE] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_texture_env_dot3") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Dot3 support\n");
|
||||
This->gl_info.supported[EXT_TEXTURE_ENV_DOT3] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_texture_filter_anisotropic") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Texture Anisotropic filter support\n");
|
||||
This->gl_info.supported[EXT_TEXTURE_FILTER_ANISOTROPIC] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_texture_lod") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Texture LOD support\n");
|
||||
This->gl_info.supported[EXT_TEXTURE_LOD] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_texture_lod_bias") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Texture LOD bias support\n");
|
||||
This->gl_info.supported[EXT_TEXTURE_LOD_BIAS] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_vertex_weighting") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: EXT Vertex weighting support\n");
|
||||
This->gl_info.supported[EXT_VERTEX_WEIGHTING] = TRUE;
|
||||
|
||||
/**
|
||||
* NVIDIA
|
||||
*/
|
||||
} else if (strstr(ThisExtn, "GL_NV_fog_distance")) {
|
||||
TRACE_(d3d_caps)(" FOUND: NVIDIA (NV) Fog Distance support\n");
|
||||
This->gl_info.supported[NV_FOG_DISTANCE] = TRUE;
|
||||
} else if (strstr(ThisExtn, "GL_NV_fragment_program")) {
|
||||
This->gl_info.ps_nv_version = PS_VERSION_11;
|
||||
TRACE_(d3d_caps)(" FOUND: NVIDIA (NV) Pixel Shader support - version=%02x\n", This->gl_info.ps_nv_version);
|
||||
} else if (strcmp(ThisExtn, "GL_NV_register_combiners") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: NVIDIA (NV) Register combiners (1) support\n");
|
||||
This->gl_info.supported[NV_REGISTER_COMBINERS] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_NV_register_combiners2") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: NVIDIA (NV) Register combiners (2) support\n");
|
||||
This->gl_info.supported[NV_REGISTER_COMBINERS2] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_NV_texgen_reflection") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: NVIDIA (NV) Texture Gen Reflection support\n");
|
||||
This->gl_info.supported[NV_TEXGEN_REFLECTION] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_NV_texture_env_combine4") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: NVIDIA (NV) Texture Env combine (4) support\n");
|
||||
This->gl_info.supported[NV_TEXTURE_ENV_COMBINE4] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_NV_texture_shader") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: NVIDIA (NV) Texture Shader (1) support\n");
|
||||
This->gl_info.supported[NV_TEXTURE_SHADER] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_NV_texture_shader2") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: NVIDIA (NV) Texture Shader (2) support\n");
|
||||
This->gl_info.supported[NV_TEXTURE_SHADER2] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_NV_texture_shader3") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: NVIDIA (NV) Texture Shader (3) support\n");
|
||||
This->gl_info.supported[NV_TEXTURE_SHADER3] = TRUE;
|
||||
} else if (strstr(ThisExtn, "GL_NV_vertex_program")) {
|
||||
This->gl_info.vs_nv_version = max(This->gl_info.vs_nv_version, (0 == strcmp(ThisExtn, "GL_NV_vertex_program1_1")) ? VS_VERSION_11 : VS_VERSION_10);
|
||||
This->gl_info.vs_nv_version = max(This->gl_info.vs_nv_version, (0 == strcmp(ThisExtn, "GL_NV_vertex_program2")) ? VS_VERSION_20 : VS_VERSION_10);
|
||||
TRACE_(d3d_caps)(" FOUND: NVIDIA (NV) Vertex Shader support - version=%02x\n", This->gl_info.vs_nv_version);
|
||||
This->gl_info.supported[NV_VERTEX_PROGRAM] = TRUE;
|
||||
|
||||
/**
|
||||
* ATI
|
||||
*/
|
||||
/** TODO */
|
||||
} else if (strcmp(ThisExtn, "GL_ATI_texture_env_combine3") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ATI Texture Env combine (3) support\n");
|
||||
This->gl_info.supported[ATI_TEXTURE_ENV_COMBINE3] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_ATI_texture_mirror_once") == 0) {
|
||||
TRACE_(d3d_caps)(" FOUND: ATI Texture Mirror Once support\n");
|
||||
This->gl_info.supported[ATI_TEXTURE_MIRROR_ONCE] = TRUE;
|
||||
} else if (strcmp(ThisExtn, "GL_EXT_vertex_shader") == 0) {
|
||||
This->gl_info.vs_ati_version = VS_VERSION_11;
|
||||
TRACE_(d3d_caps)(" FOUND: ATI (EXT) Vertex Shader support - version=%02x\n", This->gl_info.vs_ati_version);
|
||||
This->gl_info.supported[EXT_VERTEX_SHADER] = TRUE;
|
||||
}
|
||||
|
||||
|
||||
if (*GL_Extensions == ' ') GL_Extensions++;
|
||||
}
|
||||
}
|
||||
|
||||
#define USE_GL_FUNC(type, pfn) This->gl_info.pfn = (type) glXGetProcAddressARB( (const GLubyte *) #pfn);
|
||||
GL_EXT_FUNCS_GEN;
|
||||
#undef USE_GL_FUNC
|
||||
|
||||
if (display != NULL) {
|
||||
GLX_Extensions = glXQueryExtensionsString(display, DefaultScreen(display));
|
||||
TRACE_(d3d_caps)("GLX_Extensions reported:\n");
|
||||
|
||||
if (NULL == GLX_Extensions) {
|
||||
ERR(" GLX_Extensions returns NULL\n");
|
||||
} else {
|
||||
while (*GLX_Extensions != 0x00) {
|
||||
const char *Start = GLX_Extensions;
|
||||
char ThisExtn[256];
|
||||
|
||||
memset(ThisExtn, 0x00, sizeof(ThisExtn));
|
||||
while (*GLX_Extensions != ' ' && *GLX_Extensions != 0x00) {
|
||||
GLX_Extensions++;
|
||||
}
|
||||
memcpy(ThisExtn, Start, (GLX_Extensions - Start));
|
||||
TRACE_(d3d_caps)("- %s\n", ThisExtn);
|
||||
if (*GLX_Extensions == ' ') GLX_Extensions++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define USE_GL_FUNC(type, pfn) This->gl_info.pfn = (type) glXGetProcAddressARB( (const GLubyte *) #pfn);
|
||||
GLX_EXT_FUNCS_GEN;
|
||||
#undef USE_GL_FUNC
|
||||
|
||||
/* Only save the values obtained when a display is provided */
|
||||
if (display != NULL) This->isGLInfoValid = TRUE;
|
||||
|
||||
}
|
||||
|
||||
/* Internal function called back during the CreateDevice to create a render target */
|
||||
HRESULT WINAPI D3D8CB_CreateRenderTarget(IUnknown *device, UINT Width, UINT Height,
|
||||
WINED3DFORMAT Format, D3DMULTISAMPLE_TYPE MultiSample,
|
||||
|
@ -873,12 +518,6 @@ HRESULT WINAPI IDirect3D8Impl_CreateDevice (LPDIRECT3D8 iface,
|
|||
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
|
||||
checkGLcall("glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);");
|
||||
|
||||
/*
|
||||
* Initialize openGL extension related variables
|
||||
* with Default values
|
||||
*/
|
||||
IDirect3D8Impl_FillGLCaps(iface, object->display);
|
||||
|
||||
/* Setup all the devices defaults */
|
||||
IDirect3DDeviceImpl_InitStartupStateBlock(object);
|
||||
|
||||
|
|
|
@ -748,8 +748,7 @@ inline static VOID IDirect3DVertexShaderImpl_GenerateProgramArbHW(IDirect3DVerte
|
|||
/* Due to the dynamic constants binding mechanism, we need to declare
|
||||
* all the constants for relative addressing. */
|
||||
/* Mesa supports nly 95 constants for VS1.X although we should have at least 96. */
|
||||
if (This->direct3d8->gl_info.gl_vendor == VENDOR_MESA ||
|
||||
This->direct3d8->gl_info.gl_vendor == VENDOR_WINE) {
|
||||
if (GL_VENDOR_NAME(This) == VENDOR_MESA || GL_VENDOR_NAME(This) == VENDOR_WINE) {
|
||||
numConstants = 95;
|
||||
}
|
||||
sprintf(tmpLine, "PARAM C[%d] = { program.env[0..%d] };\n", numConstants, numConstants-1);
|
||||
|
|
|
@ -696,13 +696,6 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
|
|||
}
|
||||
}
|
||||
|
||||
/* D3D8 doesn't use the opengl capability code from WineD3D and because of this the maximum texture size isn't set. */
|
||||
if (((IWineD3DImpl *)This->wineD3D)->dxVersion == 8 && GL_LIMITS(texture_size) == 0) {
|
||||
int gl_max;
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &gl_max);
|
||||
GL_LIMITS(texture_size) = gl_max;
|
||||
}
|
||||
|
||||
/** Check against the maximum texture sizes supported by the video card **/
|
||||
if (pow2Width > GL_LIMITS(texture_size) || pow2Height > GL_LIMITS(texture_size)) {
|
||||
/* one of three options
|
||||
|
|
|
@ -1782,6 +1782,16 @@ HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, D3DDEV
|
|||
object->adapterNo = Adapter;
|
||||
object->devType = DeviceType;
|
||||
|
||||
/* Let D3D8 use WineD3D's capability detection code. We can't use the block of code after this call yet
|
||||
/ as D3D8 doesn't use WineD3D stateblocks / swapchains.
|
||||
*/
|
||||
if(This->dxVersion == 8) {
|
||||
/* Setup some defaults for creating the implicit swapchain */
|
||||
ENTER_GL();
|
||||
IWineD3DImpl_FillGLCaps(&This->gl_info, IWineD3DImpl_GetAdapterDisplay(iface, Adapter));
|
||||
LEAVE_GL();
|
||||
}
|
||||
|
||||
/* FIXME: Use for dx8 code eventually too! */
|
||||
/* Deliberately no indentation here, as this if will be removed when dx8 support merged in */
|
||||
if (This->dxVersion > 8) {
|
||||
|
|
Loading…
Reference in New Issue