wined3d: Add GL_ARB_texture_rectangles to our opengl extensions.

This commit is contained in:
Stefan Dösinger 2007-11-26 23:19:03 +01:00 committed by Alexandre Julliard
parent 7925ef35cd
commit 0cfa7f99e6
2 changed files with 20 additions and 0 deletions

View File

@ -75,6 +75,7 @@ static const struct {
{"GL_ARB_texture_float", ARB_TEXTURE_FLOAT, 0 },
{"GL_ARB_texture_mirrored_repeat", ARB_TEXTURE_MIRRORED_REPEAT, 0 },
{"GL_ARB_texture_non_power_of_two", ARB_TEXTURE_NON_POWER_OF_TWO, 0 },
{"GL_ARB_texture_rectangle", ARB_TEXTURE_RECTANGLE, 0 },
{"GL_ARB_vertex_blend", ARB_VERTEX_BLEND, 0 },
{"GL_ARB_vertex_buffer_object", ARB_VERTEX_BUFFER_OBJECT, 0 },
{"GL_ARB_vertex_program", ARB_VERTEX_PROGRAM, 0 },
@ -870,6 +871,12 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) {
} else if (gl_info->supported[NV_FRAGMENT_PROGRAM]) {
gl_info->ps_nv_version = PS_VERSION_20;
}
if (gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO]) {
/* If we have full NP2 texture support, disable GL_ARB_texture_rectangle because we will never use it.
* This saves a few redundant glDisable calls
*/
gl_info->supported[ARB_TEXTURE_RECTANGLE] = FALSE;
}
}
checkGLcall("extension detection\n");
@ -2837,6 +2844,7 @@ static void fixup_extensions(WineD3D_GL_Info *gl_info) {
gl_info->gl_card == CARD_ATI_RADEON_7200 || gl_info->gl_card == CARD_ATI_RAGE_128PRO) {
TRACE("GL_ARB_texture_non_power_of_two advertised on R500 or earlier card, removing\n");
gl_info->supported[ARB_TEXTURE_NON_POWER_OF_TWO] = FALSE;
gl_info->supported[ARB_TEXTURE_RECTANGLE] = TRUE;
}
}
}

View File

@ -2866,6 +2866,17 @@ typedef void (WINE_GLAPI * PGLFNFINISHRENDERAPPLEPROC) (void);
#define UNSIGNED_SHORT_8_8_REV_APPLE 0x85BB
#endif
/* GL_ARB_texture_rectangle */
#ifndef GL_ARB_texture_rectangle
#define GL_ARB_texture_rectangle
#define GL_TEXTURE_RECTANGLE_ARB 0x84F5
#define GL_TEXTURE_BINDING_RECTANGLE_ARB 0x84F6
#define GL_PROXY_TEXTURE_RECTANGLE_ARB 0x84F7
#define GL_MAX_RECTANGLE_TEXTURE_SIZE_ARB 0x84F8
#define GL_SAMPLER_2D_RECT_ARB 0x8B63
#define GL_SAMPLER_2D_RECT_SHADOW_ARB 0x8B64
#endif
/* GL_VERSION_2_0 */
#ifndef GL_VERSION_2_0
#define GL_VERSION_2_0 1
@ -3167,6 +3178,7 @@ typedef enum _GL_SupportedExt {
ARB_TEXTURE_BORDER_CLAMP,
ARB_TEXTURE_MIRRORED_REPEAT,
ARB_TEXTURE_NON_POWER_OF_TWO,
ARB_TEXTURE_RECTANGLE,
ARB_VERTEX_PROGRAM,
ARB_VERTEX_BLEND,
ARB_VERTEX_BUFFER_OBJECT,