wined3d: Call core GL functions through gl_info.gl_ops as well.
This commit is contained in:
parent
af1ba676c8
commit
894d161891
|
@ -3289,11 +3289,11 @@ static GLuint create_arb_blt_vertex_program(const struct wined3d_gl_info *gl_inf
|
|||
strlen(blt_vprogram), blt_vprogram));
|
||||
checkGLcall("glProgramStringARB()");
|
||||
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
if (pos != -1)
|
||||
{
|
||||
FIXME("Vertex program error at position %d: %s\n\n", pos,
|
||||
debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
debugstr_a((const char *)gl_info->gl_ops.gl.p_glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
shader_arb_dump_program_source(blt_vprogram);
|
||||
}
|
||||
else
|
||||
|
@ -3393,11 +3393,11 @@ static GLuint create_arb_blt_fragment_program(const struct wined3d_gl_info *gl_i
|
|||
GL_EXTCALL(glProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(fprogram), fprogram));
|
||||
checkGLcall("glProgramStringARB()");
|
||||
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
if (pos != -1)
|
||||
{
|
||||
FIXME("Fragment program error at position %d: %s\n\n", pos,
|
||||
debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
debugstr_a((const char *)gl_info->gl_ops.gl.p_glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
shader_arb_dump_program_source(fprogram);
|
||||
}
|
||||
else
|
||||
|
@ -3857,11 +3857,11 @@ static GLuint shader_arb_generate_pshader(const struct wined3d_shader *shader,
|
|||
buffer->bsize, buffer->buffer));
|
||||
checkGLcall("glProgramStringARB()");
|
||||
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos);
|
||||
if (errPos != -1)
|
||||
{
|
||||
FIXME("HW PixelShader Error at position %d: %s\n\n",
|
||||
errPos, debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
errPos, debugstr_a((const char *)gl_info->gl_ops.gl.p_glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
shader_arb_dump_program_source(buffer->buffer);
|
||||
retval = 0;
|
||||
}
|
||||
|
@ -4270,11 +4270,11 @@ static GLuint shader_arb_generate_vshader(const struct wined3d_shader *shader,
|
|||
buffer->bsize, buffer->buffer));
|
||||
checkGLcall("glProgramStringARB()");
|
||||
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &errPos);
|
||||
if (errPos != -1)
|
||||
{
|
||||
FIXME("HW VertexShader Error at position %d: %s\n\n",
|
||||
errPos, debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
errPos, debugstr_a((const char *)gl_info->gl_ops.gl.p_glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
shader_arb_dump_program_source(buffer->buffer);
|
||||
ret = -1;
|
||||
}
|
||||
|
@ -4641,9 +4641,10 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS,
|
|||
GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, priv->current_fprogram_id));
|
||||
checkGLcall("glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, priv->current_fprogram_id);");
|
||||
|
||||
if(!priv->use_arbfp_fixed_func) {
|
||||
/* Enable OpenGL fragment programs */
|
||||
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
if (!priv->use_arbfp_fixed_func)
|
||||
{
|
||||
/* Enable OpenGL fragment programs. */
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB);");
|
||||
}
|
||||
TRACE("(%p) : Bound fragment program %u and enabled GL_FRAGMENT_PROGRAM_ARB\n",
|
||||
|
@ -4679,7 +4680,7 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS,
|
|||
* keep GL_FRAGMENT_PROGRAM_ARB enabled, and the fixed function pipeline will bind the fixed function
|
||||
* replacement shader
|
||||
*/
|
||||
glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)");
|
||||
priv->current_fprogram_id = 0;
|
||||
}
|
||||
|
@ -4701,7 +4702,7 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS,
|
|||
checkGLcall("glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->current_vprogram_id);");
|
||||
|
||||
/* Enable OpenGL vertex programs */
|
||||
glEnable(GL_VERTEX_PROGRAM_ARB);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_VERTEX_PROGRAM_ARB);
|
||||
checkGLcall("glEnable(GL_VERTEX_PROGRAM_ARB);");
|
||||
TRACE("(%p) : Bound vertex program %u and enabled GL_VERTEX_PROGRAM_ARB\n", device, priv->current_vprogram_id);
|
||||
shader_arb_vs_local_constants(compiled, context, state);
|
||||
|
@ -4721,7 +4722,7 @@ static void shader_arb_select(const struct wined3d_context *context, BOOL usePS,
|
|||
else if (gl_info->supported[ARB_VERTEX_PROGRAM])
|
||||
{
|
||||
priv->current_vprogram_id = 0;
|
||||
glDisable(GL_VERTEX_PROGRAM_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_VERTEX_PROGRAM_ARB);
|
||||
checkGLcall("glDisable(GL_VERTEX_PROGRAM_ARB)");
|
||||
}
|
||||
}
|
||||
|
@ -4737,13 +4738,13 @@ static void shader_arb_select_depth_blt(void *shader_priv, const struct wined3d_
|
|||
|
||||
if (!priv->depth_blt_vprogram_id) priv->depth_blt_vprogram_id = create_arb_blt_vertex_program(gl_info);
|
||||
GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, priv->depth_blt_vprogram_id));
|
||||
glEnable(GL_VERTEX_PROGRAM_ARB);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_VERTEX_PROGRAM_ARB);
|
||||
|
||||
blt_fprogram = masked ? &priv->depth_blt_fprogram_id_masked[tex_type] : &priv->depth_blt_fprogram_id_full[tex_type];
|
||||
if (!*blt_fprogram) *blt_fprogram = create_arb_blt_fragment_program(gl_info, tex_type, masked);
|
||||
GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, *blt_fprogram));
|
||||
if (masked) GL_EXTCALL(glProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, 0, mask));
|
||||
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
}
|
||||
|
||||
/* GL locking is done by the caller */
|
||||
|
@ -4759,7 +4760,7 @@ static void shader_arb_deselect_depth_blt(void *shader_priv, const struct wined3
|
|||
}
|
||||
else
|
||||
{
|
||||
glDisable(GL_VERTEX_PROGRAM_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_VERTEX_PROGRAM_ARB);
|
||||
checkGLcall("glDisable(GL_VERTEX_PROGRAM_ARB)");
|
||||
}
|
||||
|
||||
|
@ -4771,7 +4772,7 @@ static void shader_arb_deselect_depth_blt(void *shader_priv, const struct wined3
|
|||
}
|
||||
else if(!priv->use_arbfp_fixed_func)
|
||||
{
|
||||
glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)");
|
||||
}
|
||||
}
|
||||
|
@ -5587,11 +5588,14 @@ struct arbfp_ffp_desc
|
|||
/* Context activation and GL locking are done by the caller. */
|
||||
static void arbfp_enable(const struct wined3d_gl_info *gl_info, BOOL enable)
|
||||
{
|
||||
if(enable) {
|
||||
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
if (enable)
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB)");
|
||||
} else {
|
||||
glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)");
|
||||
}
|
||||
}
|
||||
|
@ -6315,11 +6319,11 @@ static GLuint gen_arbfp_ffp_shader(const struct ffp_frag_settings *settings, con
|
|||
strlen(buffer.buffer), buffer.buffer));
|
||||
checkGLcall("glProgramStringARB()");
|
||||
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
if (pos != -1)
|
||||
{
|
||||
FIXME("Fragment program error at position %d: %s\n\n", pos,
|
||||
debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
debugstr_a((const char *)gl_info->gl_ops.gl.p_glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
shader_arb_dump_program_source(buffer.buffer);
|
||||
}
|
||||
else
|
||||
|
@ -6680,7 +6684,8 @@ static void arbfp_blit_free(struct wined3d_device *device)
|
|||
GL_EXTCALL(glDeleteProgramsARB(1, &priv->p8_2d_shader));
|
||||
checkGLcall("Delete yuv and p8 programs");
|
||||
|
||||
if(priv->palette_texture) glDeleteTextures(1, &priv->palette_texture);
|
||||
if (priv->palette_texture)
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &priv->palette_texture);
|
||||
LEAVE_GL();
|
||||
|
||||
HeapFree(GetProcessHeap(), 0, device->blit_priv);
|
||||
|
@ -6968,11 +6973,11 @@ static GLuint gen_p8_shader(struct arbfp_blit_priv *priv,
|
|||
strlen(buffer.buffer), buffer.buffer));
|
||||
checkGLcall("glProgramStringARB()");
|
||||
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
if (pos != -1)
|
||||
{
|
||||
FIXME("Fragment program error at position %d: %s\n\n", pos,
|
||||
debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
debugstr_a((const char *)gl_info->gl_ops.gl.p_glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
shader_arb_dump_program_source(buffer.buffer);
|
||||
}
|
||||
|
||||
|
@ -7002,29 +7007,29 @@ static void upload_palette(const struct wined3d_surface *surface, struct wined3d
|
|||
|
||||
if (gl_info->supported[APPLE_CLIENT_STORAGE])
|
||||
{
|
||||
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE);
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE);
|
||||
checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)");
|
||||
}
|
||||
|
||||
if (!priv->palette_texture)
|
||||
glGenTextures(1, &priv->palette_texture);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &priv->palette_texture);
|
||||
|
||||
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE1));
|
||||
glBindTexture(GL_TEXTURE_1D, priv->palette_texture);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_1D, priv->palette_texture);
|
||||
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
/* Make sure we have discrete color levels. */
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_1D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
/* Upload the palette */
|
||||
/* TODO: avoid unneeded uploads in the future by adding some SFLAG_PALETTE_DIRTY mechanism */
|
||||
glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, table);
|
||||
gl_info->gl_ops.gl.p_glTexImage1D(GL_TEXTURE_1D, 0, GL_RGBA, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, table);
|
||||
|
||||
if (gl_info->supported[APPLE_CLIENT_STORAGE])
|
||||
{
|
||||
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
|
||||
checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)");
|
||||
}
|
||||
|
||||
|
@ -7147,11 +7152,11 @@ static GLuint gen_yuv_shader(struct arbfp_blit_priv *priv, const struct wined3d_
|
|||
strlen(buffer.buffer), buffer.buffer));
|
||||
checkGLcall("glProgramStringARB()");
|
||||
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
if (pos != -1)
|
||||
{
|
||||
FIXME("Fragment program error at position %d: %s\n\n", pos,
|
||||
debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
debugstr_a((const char *)gl_info->gl_ops.gl.p_glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
shader_arb_dump_program_source(buffer.buffer);
|
||||
}
|
||||
else
|
||||
|
@ -7207,7 +7212,7 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context,
|
|||
if (surface->flags & SFLAG_CONVERTED)
|
||||
{
|
||||
ENTER_GL();
|
||||
glEnable(textype);
|
||||
gl_info->gl_ops.gl.p_glEnable(textype);
|
||||
checkGLcall("glEnable(textype)");
|
||||
LEAVE_GL();
|
||||
return WINED3D_OK;
|
||||
|
@ -7219,7 +7224,7 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context,
|
|||
dump_color_fixup_desc(surface->resource.format->color_fixup);
|
||||
/* Don't bother setting up a shader for unconverted formats */
|
||||
ENTER_GL();
|
||||
glEnable(textype);
|
||||
gl_info->gl_ops.gl.p_glEnable(textype);
|
||||
checkGLcall("glEnable(textype)");
|
||||
LEAVE_GL();
|
||||
return WINED3D_OK;
|
||||
|
@ -7251,7 +7256,7 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context,
|
|||
default:
|
||||
FIXME("Unsupported complex fixup %#x, not setting a shader\n", fixup);
|
||||
ENTER_GL();
|
||||
glEnable(textype);
|
||||
gl_info->gl_ops.gl.p_glEnable(textype);
|
||||
checkGLcall("glEnable(textype)");
|
||||
LEAVE_GL();
|
||||
return E_NOTIMPL;
|
||||
|
@ -7260,7 +7265,7 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context,
|
|||
if (!shader) shader = gen_yuv_shader(priv, gl_info, fixup, textype);
|
||||
|
||||
ENTER_GL();
|
||||
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
checkGLcall("glEnable(GL_FRAGMENT_PROGRAM_ARB)");
|
||||
GL_EXTCALL(glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, shader));
|
||||
checkGLcall("glBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, shader)");
|
||||
|
@ -7275,18 +7280,18 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context,
|
|||
static void arbfp_blit_unset(const struct wined3d_gl_info *gl_info)
|
||||
{
|
||||
ENTER_GL();
|
||||
glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
checkGLcall("glDisable(GL_FRAGMENT_PROGRAM_ARB)");
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_2D);
|
||||
checkGLcall("glDisable(GL_TEXTURE_2D)");
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
{
|
||||
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
|
||||
}
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
{
|
||||
glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_RECTANGLE_ARB)");
|
||||
}
|
||||
LEAVE_GL();
|
||||
|
@ -7399,7 +7404,7 @@ HRESULT arbfp_blit_surface(struct wined3d_device *device, DWORD filter,
|
|||
if (wined3d_settings.strict_draw_ordering
|
||||
|| (dst_surface->container.type == WINED3D_CONTAINER_SWAPCHAIN
|
||||
&& (dst_surface->container.u.swapchain->front_buffer == dst_surface)))
|
||||
glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
context->gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
|
||||
context_release(context);
|
||||
|
||||
|
|
|
@ -1095,11 +1095,14 @@ static const struct StateEntryTemplate atifs_fragmentstate_template[] = {
|
|||
/* Context activation and GL locking are done by the caller. */
|
||||
static void atifs_enable(const struct wined3d_gl_info *gl_info, BOOL enable)
|
||||
{
|
||||
if(enable) {
|
||||
glEnable(GL_FRAGMENT_SHADER_ATI);
|
||||
if (enable)
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_FRAGMENT_SHADER_ATI);
|
||||
checkGLcall("glEnable(GL_FRAGMENT_SHADER_ATI)");
|
||||
} else {
|
||||
glDisable(GL_FRAGMENT_SHADER_ATI);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_FRAGMENT_SHADER_ATI);
|
||||
checkGLcall("glDisable(GL_FRAGMENT_SHADER_ATI)");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struc
|
|||
* if an error during VBO creation occurs we can fall back to non-vbo operation
|
||||
* with full functionality(but performance loss)
|
||||
*/
|
||||
while (glGetError() != GL_NO_ERROR);
|
||||
while (gl_info->gl_ops.gl.p_glGetError() != GL_NO_ERROR);
|
||||
|
||||
/* Basically the FVF parameter passed to CreateVertexBuffer is no good.
|
||||
* The vertex declaration from the device determines how the data in the
|
||||
|
@ -136,7 +136,7 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struc
|
|||
* format. */
|
||||
|
||||
GL_EXTCALL(glGenBuffersARB(1, &This->buffer_object));
|
||||
error = glGetError();
|
||||
error = gl_info->gl_ops.gl.p_glGetError();
|
||||
if (!This->buffer_object || error != GL_NO_ERROR)
|
||||
{
|
||||
ERR("Failed to create a VBO with error %s (%#x)\n", debug_glerror(error), error);
|
||||
|
@ -147,7 +147,7 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struc
|
|||
if (This->buffer_type_hint == GL_ELEMENT_ARRAY_BUFFER_ARB)
|
||||
device_invalidate_state(This->resource.device, STATE_INDEXBUFFER);
|
||||
GL_EXTCALL(glBindBufferARB(This->buffer_type_hint, This->buffer_object));
|
||||
error = glGetError();
|
||||
error = gl_info->gl_ops.gl.p_glGetError();
|
||||
if (error != GL_NO_ERROR)
|
||||
{
|
||||
ERR("Failed to bind the VBO with error %s (%#x)\n", debug_glerror(error), error);
|
||||
|
@ -187,7 +187,7 @@ static void buffer_create_buffer_object(struct wined3d_buffer *This, const struc
|
|||
* we're not double buffering, so we can release the heap mem afterwards
|
||||
*/
|
||||
GL_EXTCALL(glBufferDataARB(This->buffer_type_hint, This->resource.size, This->resource.allocatedMemory, gl_usage));
|
||||
error = glGetError();
|
||||
error = gl_info->gl_ops.gl.p_glGetError();
|
||||
LEAVE_GL();
|
||||
if (error != GL_NO_ERROR)
|
||||
{
|
||||
|
@ -635,7 +635,7 @@ static void buffer_sync_apple(struct wined3d_buffer *This, DWORD flags, const st
|
|||
}
|
||||
|
||||
/* Since we don't know about old draws a glFinish is needed once */
|
||||
glFinish();
|
||||
gl_info->gl_ops.gl.p_glFinish();
|
||||
return;
|
||||
}
|
||||
TRACE("Synchronizing buffer %p\n", This);
|
||||
|
@ -663,7 +663,7 @@ drop_query:
|
|||
This->query = NULL;
|
||||
}
|
||||
|
||||
glFinish();
|
||||
gl_info->gl_ops.gl.p_glFinish();
|
||||
ENTER_GL();
|
||||
GL_EXTCALL(glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_TRUE));
|
||||
checkGLcall("glBufferParameteriAPPLE(This->buffer_type_hint, GL_BUFFER_SERIALIZED_MODIFY_APPLE, GL_TRUE)");
|
||||
|
@ -1195,7 +1195,8 @@ void CDECL wined3d_buffer_unmap(struct wined3d_buffer *buffer)
|
|||
|
||||
GL_EXTCALL(glUnmapBufferARB(buffer->buffer_type_hint));
|
||||
LEAVE_GL();
|
||||
if (wined3d_settings.strict_draw_ordering) glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
if (wined3d_settings.strict_draw_ordering)
|
||||
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
context_release(context);
|
||||
|
||||
buffer->resource.allocatedMemory = NULL;
|
||||
|
|
|
@ -1244,24 +1244,24 @@ static void bind_dummy_textures(const struct wined3d_device *device, const struc
|
|||
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i));
|
||||
checkGLcall("glActiveTextureARB");
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, device->dummy_texture_2d[i]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_texture_2d[i]);
|
||||
checkGLcall("glBindTexture");
|
||||
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, device->dummy_texture_rect[i]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_RECTANGLE_ARB, device->dummy_texture_rect[i]);
|
||||
checkGLcall("glBindTexture");
|
||||
}
|
||||
|
||||
if (gl_info->supported[EXT_TEXTURE3D])
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_3D, device->dummy_texture_3d[i]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_3D, device->dummy_texture_3d[i]);
|
||||
checkGLcall("glBindTexture");
|
||||
}
|
||||
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
{
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP, device->dummy_texture_cube[i]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_CUBE_MAP, device->dummy_texture_cube[i]);
|
||||
checkGLcall("glBindTexture");
|
||||
}
|
||||
}
|
||||
|
@ -1476,47 +1476,46 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
|||
|
||||
ENTER_GL();
|
||||
|
||||
glGetIntegerv(GL_AUX_BUFFERS, &ret->aux_buffers);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_AUX_BUFFERS, &ret->aux_buffers);
|
||||
|
||||
TRACE("Setting up the screen\n");
|
||||
/* Clear the screen */
|
||||
glClearColor(1.0f, 0.0f, 0.0f, 0.0f);
|
||||
gl_info->gl_ops.gl.p_glClearColor(1.0f, 0.0f, 0.0f, 0.0f);
|
||||
checkGLcall("glClearColor");
|
||||
glClearIndex(0);
|
||||
glClearDepth(1);
|
||||
glClearStencil(0xffff);
|
||||
gl_info->gl_ops.gl.p_glClearIndex(0);
|
||||
gl_info->gl_ops.gl.p_glClearDepth(1);
|
||||
gl_info->gl_ops.gl.p_glClearStencil(0xffff);
|
||||
|
||||
checkGLcall("glClear");
|
||||
|
||||
glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
|
||||
gl_info->gl_ops.gl.p_glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);
|
||||
checkGLcall("glLightModeli(GL_LIGHT_MODEL_LOCAL_VIEWER, GL_TRUE);");
|
||||
|
||||
glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
|
||||
gl_info->gl_ops.gl.p_glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);
|
||||
checkGLcall("glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT);");
|
||||
|
||||
glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
|
||||
gl_info->gl_ops.gl.p_glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);
|
||||
checkGLcall("glLightModeli(GL_LIGHT_MODEL_COLOR_CONTROL, GL_SEPARATE_SPECULAR_COLOR);");
|
||||
|
||||
glPixelStorei(GL_PACK_ALIGNMENT, device->surface_alignment);
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_PACK_ALIGNMENT, device->surface_alignment);
|
||||
checkGLcall("glPixelStorei(GL_PACK_ALIGNMENT, device->surface_alignment);");
|
||||
glPixelStorei(GL_UNPACK_ALIGNMENT, device->surface_alignment);
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_ALIGNMENT, device->surface_alignment);
|
||||
checkGLcall("glPixelStorei(GL_UNPACK_ALIGNMENT, device->surface_alignment);");
|
||||
|
||||
if (gl_info->supported[APPLE_CLIENT_STORAGE])
|
||||
{
|
||||
/* Most textures will use client storage if supported. Exceptions are non-native power of 2 textures
|
||||
* and textures in DIB sections(due to the memory protection).
|
||||
*/
|
||||
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
|
||||
/* Most textures will use client storage if supported. Exceptions are
|
||||
* non-native power of 2 textures and textures in DIB sections. */
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
|
||||
checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)");
|
||||
}
|
||||
if (gl_info->supported[ARB_VERTEX_BLEND])
|
||||
{
|
||||
/* Direct3D always uses n-1 weights for n world matrices and uses 1 - sum for the last one
|
||||
* this is equal to GL_WEIGHT_SUM_UNITY_ARB. Enabling it doesn't do anything unless
|
||||
* GL_VERTEX_BLEND_ARB isn't enabled too
|
||||
*/
|
||||
glEnable(GL_WEIGHT_SUM_UNITY_ARB);
|
||||
/* Direct3D always uses n-1 weights for n world matrices and uses
|
||||
* 1 - sum for the last one this is equal to GL_WEIGHT_SUM_UNITY_ARB.
|
||||
* Enabling it doesn't do anything unless GL_VERTEX_BLEND_ARB isn't
|
||||
* enabled as well. */
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_WEIGHT_SUM_UNITY_ARB);
|
||||
checkGLcall("glEnable(GL_WEIGHT_SUM_UNITY_ARB)");
|
||||
}
|
||||
if (gl_info->supported[NV_TEXTURE_SHADER2])
|
||||
|
@ -1527,7 +1526,8 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
|||
for (s = 1; s < gl_info->limits.textures; ++s)
|
||||
{
|
||||
context_active_texture(ret, gl_info, s);
|
||||
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + s - 1);
|
||||
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_SHADER_NV,
|
||||
GL_PREVIOUS_TEXTURE_INPUT_NV, GL_TEXTURE0_ARB + s - 1);
|
||||
checkGLcall("glTexEnvi(GL_TEXTURE_SHADER_NV, GL_PREVIOUS_TEXTURE_INPUT_NV, ...");
|
||||
}
|
||||
}
|
||||
|
@ -1556,7 +1556,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain,
|
|||
for (s = 0; s < gl_info->limits.textures; ++s)
|
||||
{
|
||||
context_active_texture(ret, gl_info, s);
|
||||
glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);
|
||||
gl_info->gl_ops.gl.p_glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE);
|
||||
checkGLcall("glTexEnvi(GL_POINT_SPRITE_ARB, GL_COORD_REPLACE_ARB, GL_TRUE)");
|
||||
}
|
||||
}
|
||||
|
@ -1623,7 +1623,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont
|
|||
}
|
||||
|
||||
/* GL locking is done by the caller */
|
||||
static void set_blit_dimension(UINT width, UINT height)
|
||||
static void set_blit_dimension(const struct wined3d_gl_info *gl_info, UINT width, UINT height)
|
||||
{
|
||||
const GLdouble projection[] =
|
||||
{
|
||||
|
@ -1633,11 +1633,11 @@ static void set_blit_dimension(UINT width, UINT height)
|
|||
-1.0, -1.0, -1.0, 1.0,
|
||||
};
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
gl_info->gl_ops.gl.p_glMatrixMode(GL_PROJECTION);
|
||||
checkGLcall("glMatrixMode(GL_PROJECTION)");
|
||||
glLoadMatrixd(projection);
|
||||
gl_info->gl_ops.gl.p_glLoadMatrixd(projection);
|
||||
checkGLcall("glLoadMatrixd");
|
||||
glViewport(0, 0, width, height);
|
||||
gl_info->gl_ops.gl.p_glViewport(0, 0, width, height);
|
||||
checkGLcall("glViewport");
|
||||
}
|
||||
|
||||
|
@ -1694,7 +1694,7 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
|
|||
if (context->blit_w != rt_size.cx || context->blit_h != rt_size.cy)
|
||||
{
|
||||
ENTER_GL();
|
||||
set_blit_dimension(rt_size.cx, rt_size.cy);
|
||||
set_blit_dimension(gl_info, rt_size.cx, rt_size.cy);
|
||||
LEAVE_GL();
|
||||
context->blit_w = rt_size.cx;
|
||||
context->blit_h = rt_size.cy;
|
||||
|
@ -1736,20 +1736,20 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
|
|||
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
{
|
||||
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB");
|
||||
}
|
||||
glDisable(GL_TEXTURE_3D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_3D);
|
||||
checkGLcall("glDisable GL_TEXTURE_3D");
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
{
|
||||
glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
checkGLcall("glDisable GL_TEXTURE_RECTANGLE_ARB");
|
||||
}
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_2D);
|
||||
checkGLcall("glDisable GL_TEXTURE_2D");
|
||||
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
checkGLcall("glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);");
|
||||
|
||||
if (sampler != WINED3D_UNMAPPED_STAGE)
|
||||
|
@ -1765,31 +1765,30 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
|
|||
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
{
|
||||
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
checkGLcall("glDisable GL_TEXTURE_CUBE_MAP_ARB");
|
||||
}
|
||||
glDisable(GL_TEXTURE_3D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_3D);
|
||||
checkGLcall("glDisable GL_TEXTURE_3D");
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
{
|
||||
glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
checkGLcall("glDisable GL_TEXTURE_RECTANGLE_ARB");
|
||||
}
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_2D);
|
||||
checkGLcall("glDisable GL_TEXTURE_2D");
|
||||
|
||||
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
|
||||
|
||||
glMatrixMode(GL_TEXTURE);
|
||||
gl_info->gl_ops.gl.p_glMatrixMode(GL_TEXTURE);
|
||||
checkGLcall("glMatrixMode(GL_TEXTURE)");
|
||||
glLoadIdentity();
|
||||
gl_info->gl_ops.gl.p_glLoadIdentity();
|
||||
checkGLcall("glLoadIdentity()");
|
||||
|
||||
if (gl_info->supported[EXT_TEXTURE_LOD_BIAS])
|
||||
{
|
||||
glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT,
|
||||
GL_TEXTURE_LOD_BIAS_EXT,
|
||||
0.0f);
|
||||
gl_info->gl_ops.gl.p_glTexEnvf(GL_TEXTURE_FILTER_CONTROL_EXT,
|
||||
GL_TEXTURE_LOD_BIAS_EXT, 0.0f);
|
||||
checkGLcall("glTexEnvf GL_TEXTURE_LOD_BIAS_EXT ...");
|
||||
}
|
||||
|
||||
|
@ -1804,37 +1803,37 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
|
|||
}
|
||||
|
||||
/* Other misc states */
|
||||
glDisable(GL_ALPHA_TEST);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_ALPHA_TEST);
|
||||
checkGLcall("glDisable(GL_ALPHA_TEST)");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHATESTENABLE));
|
||||
glDisable(GL_LIGHTING);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_LIGHTING);
|
||||
checkGLcall("glDisable GL_LIGHTING");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_LIGHTING));
|
||||
glDisable(GL_DEPTH_TEST);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_DEPTH_TEST);
|
||||
checkGLcall("glDisable GL_DEPTH_TEST");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ZENABLE));
|
||||
glDisableWINE(GL_FOG);
|
||||
checkGLcall("glDisable GL_FOG");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_FOGENABLE));
|
||||
glDisable(GL_BLEND);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_BLEND);
|
||||
checkGLcall("glDisable GL_BLEND");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ALPHABLENDENABLE));
|
||||
glDisable(GL_CULL_FACE);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_CULL_FACE);
|
||||
checkGLcall("glDisable GL_CULL_FACE");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_CULLMODE));
|
||||
glDisable(GL_STENCIL_TEST);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_STENCIL_TEST);
|
||||
checkGLcall("glDisable GL_STENCIL_TEST");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_STENCILENABLE));
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST);
|
||||
checkGLcall("glDisable GL_SCISSOR_TEST");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
|
||||
if (gl_info->supported[ARB_POINT_SPRITE])
|
||||
{
|
||||
glDisable(GL_POINT_SPRITE_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_POINT_SPRITE_ARB);
|
||||
checkGLcall("glDisable GL_POINT_SPRITE_ARB");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_POINTSPRITEENABLE));
|
||||
}
|
||||
glColorMask(GL_TRUE, GL_TRUE,GL_TRUE,GL_TRUE);
|
||||
gl_info->gl_ops.gl.p_glColorMask(GL_TRUE, GL_TRUE,GL_TRUE,GL_TRUE);
|
||||
checkGLcall("glColorMask");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE1));
|
||||
|
@ -1842,30 +1841,30 @@ static void SetupForBlit(const struct wined3d_device *device, struct wined3d_con
|
|||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3));
|
||||
if (gl_info->supported[EXT_SECONDARY_COLOR])
|
||||
{
|
||||
glDisable(GL_COLOR_SUM_EXT);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_COLOR_SUM_EXT);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SPECULARENABLE));
|
||||
checkGLcall("glDisable(GL_COLOR_SUM_EXT)");
|
||||
}
|
||||
|
||||
/* Setup transforms */
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
gl_info->gl_ops.gl.p_glMatrixMode(GL_MODELVIEW);
|
||||
checkGLcall("glMatrixMode(GL_MODELVIEW)");
|
||||
glLoadIdentity();
|
||||
gl_info->gl_ops.gl.p_glLoadIdentity();
|
||||
checkGLcall("glLoadIdentity()");
|
||||
context_invalidate_state(context, STATE_TRANSFORM(WINED3D_TS_WORLD_MATRIX(0)));
|
||||
|
||||
context->last_was_rhw = TRUE;
|
||||
context_invalidate_state(context, STATE_VDECL); /* because of last_was_rhw = TRUE */
|
||||
|
||||
glDisable(GL_CLIP_PLANE0); checkGLcall("glDisable(clip plane 0)");
|
||||
glDisable(GL_CLIP_PLANE1); checkGLcall("glDisable(clip plane 1)");
|
||||
glDisable(GL_CLIP_PLANE2); checkGLcall("glDisable(clip plane 2)");
|
||||
glDisable(GL_CLIP_PLANE3); checkGLcall("glDisable(clip plane 3)");
|
||||
glDisable(GL_CLIP_PLANE4); checkGLcall("glDisable(clip plane 4)");
|
||||
glDisable(GL_CLIP_PLANE5); checkGLcall("glDisable(clip plane 5)");
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_CLIP_PLANE0); checkGLcall("glDisable(clip plane 0)");
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_CLIP_PLANE1); checkGLcall("glDisable(clip plane 1)");
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_CLIP_PLANE2); checkGLcall("glDisable(clip plane 2)");
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_CLIP_PLANE3); checkGLcall("glDisable(clip plane 3)");
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_CLIP_PLANE4); checkGLcall("glDisable(clip plane 4)");
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_CLIP_PLANE5); checkGLcall("glDisable(clip plane 5)");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_CLIPPING));
|
||||
|
||||
set_blit_dimension(rt_size.cx, rt_size.cy);
|
||||
set_blit_dimension(gl_info, rt_size.cx, rt_size.cy);
|
||||
device->frag_pipe->enable_extension(gl_info, FALSE);
|
||||
|
||||
LEAVE_GL();
|
||||
|
@ -1889,21 +1888,22 @@ static inline GLenum draw_buffer_from_rt_mask(DWORD rt_mask)
|
|||
/* Context activation and GL locking are done by the caller. */
|
||||
static void context_apply_draw_buffers(struct wined3d_context *context, DWORD rt_mask)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
if (!rt_mask)
|
||||
{
|
||||
glDrawBuffer(GL_NONE);
|
||||
gl_info->gl_ops.gl.p_glDrawBuffer(GL_NONE);
|
||||
checkGLcall("glDrawBuffer()");
|
||||
}
|
||||
else if (is_rt_mask_onscreen(rt_mask))
|
||||
{
|
||||
glDrawBuffer(draw_buffer_from_rt_mask(rt_mask));
|
||||
gl_info->gl_ops.gl.p_glDrawBuffer(draw_buffer_from_rt_mask(rt_mask));
|
||||
checkGLcall("glDrawBuffer()");
|
||||
}
|
||||
else
|
||||
{
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
unsigned int i = 0;
|
||||
|
||||
while (rt_mask)
|
||||
|
@ -1924,7 +1924,7 @@ static void context_apply_draw_buffers(struct wined3d_context *context, DWORD rt
|
|||
}
|
||||
else
|
||||
{
|
||||
glDrawBuffer(context->draw_buffers[0]);
|
||||
gl_info->gl_ops.gl.p_glDrawBuffer(context->draw_buffers[0]);
|
||||
checkGLcall("glDrawBuffer()");
|
||||
}
|
||||
}
|
||||
|
@ -1938,7 +1938,9 @@ static void context_apply_draw_buffers(struct wined3d_context *context, DWORD rt
|
|||
/* GL locking is done by the caller. */
|
||||
void context_set_draw_buffer(struct wined3d_context *context, GLenum buffer)
|
||||
{
|
||||
glDrawBuffer(buffer);
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
|
||||
gl_info->gl_ops.gl.p_glDrawBuffer(buffer);
|
||||
checkGLcall("glDrawBuffer()");
|
||||
if (context->current_fbo)
|
||||
context->current_fbo->rt_mask = context_generate_rt_mask(buffer);
|
||||
|
@ -1956,12 +1958,13 @@ void context_active_texture(struct wined3d_context *context, const struct wined3
|
|||
|
||||
void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint name)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
DWORD unit = context->active_texture;
|
||||
DWORD old_texture_type = context->texture_type[unit];
|
||||
|
||||
if (name)
|
||||
{
|
||||
glBindTexture(target, name);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(target, name);
|
||||
checkGLcall("glBindTexture");
|
||||
}
|
||||
else
|
||||
|
@ -1979,19 +1982,19 @@ void context_bind_texture(struct wined3d_context *context, GLenum target, GLuint
|
|||
/* nothing to do */
|
||||
break;
|
||||
case GL_TEXTURE_2D:
|
||||
glBindTexture(GL_TEXTURE_2D, device->dummy_texture_2d[unit]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_texture_2d[unit]);
|
||||
checkGLcall("glBindTexture");
|
||||
break;
|
||||
case GL_TEXTURE_RECTANGLE_ARB:
|
||||
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, device->dummy_texture_rect[unit]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_RECTANGLE_ARB, device->dummy_texture_rect[unit]);
|
||||
checkGLcall("glBindTexture");
|
||||
break;
|
||||
case GL_TEXTURE_CUBE_MAP:
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP, device->dummy_texture_cube[unit]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_CUBE_MAP, device->dummy_texture_cube[unit]);
|
||||
checkGLcall("glBindTexture");
|
||||
break;
|
||||
case GL_TEXTURE_3D:
|
||||
glBindTexture(GL_TEXTURE_3D, device->dummy_texture_3d[unit]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_3D, device->dummy_texture_3d[unit]);
|
||||
checkGLcall("glBindTexture");
|
||||
break;
|
||||
default:
|
||||
|
@ -2171,7 +2174,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
|||
}
|
||||
context_apply_fbo_state(context, GL_FRAMEBUFFER, context->blit_targets, fb->depth_stencil,
|
||||
rt_count ? rts[0]->draw_binding : SFLAG_INTEXTURE);
|
||||
glReadBuffer(GL_NONE);
|
||||
gl_info->gl_ops.gl.p_glReadBuffer(GL_NONE);
|
||||
checkGLcall("glReadBuffer");
|
||||
}
|
||||
else
|
||||
|
@ -2229,8 +2232,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win
|
|||
/* Blending and clearing should be orthogonal, but tests on the nvidia
|
||||
* driver show that disabling blending when clearing improves the clearing
|
||||
* performance incredibly. */
|
||||
glDisable(GL_BLEND);
|
||||
glEnable(GL_SCISSOR_TEST);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_BLEND);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_SCISSOR_TEST);
|
||||
checkGLcall("glEnable GL_SCISSOR_TEST");
|
||||
LEAVE_GL();
|
||||
|
||||
|
@ -2272,6 +2275,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const
|
|||
void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)
|
||||
{
|
||||
const struct wined3d_device *device = context->swapchain->device;
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
const struct wined3d_fb_state *fb = state->fb;
|
||||
DWORD rt_mask = find_draw_buffers_mask(context, device);
|
||||
DWORD *cur_mask;
|
||||
|
@ -2286,7 +2290,7 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat
|
|||
{
|
||||
context_apply_fbo_state(context, GL_FRAMEBUFFER, fb->render_targets, fb->depth_stencil,
|
||||
fb->render_targets[0]->draw_binding);
|
||||
glReadBuffer(GL_NONE);
|
||||
gl_info->gl_ops.gl.p_glReadBuffer(GL_NONE);
|
||||
checkGLcall("glReadBuffer");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -646,6 +646,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
|||
{
|
||||
const RECT *clear_rect = (rect_count > 0 && rects) ? (const RECT *)rects : NULL;
|
||||
struct wined3d_surface *target = rt_count ? fb->render_targets[0] : NULL;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
UINT drawable_width, drawable_height;
|
||||
struct wined3d_context *context;
|
||||
GLbitfield clear_mask = 0;
|
||||
|
@ -678,6 +679,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
|||
WARN("Invalid context, skipping clear.\n");
|
||||
return;
|
||||
}
|
||||
gl_info = context->gl_info;
|
||||
|
||||
if (target)
|
||||
{
|
||||
|
@ -713,14 +715,14 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
|||
/* Only set the values up once, as they are not changing. */
|
||||
if (flags & WINED3DCLEAR_STENCIL)
|
||||
{
|
||||
if (context->gl_info->supported[EXT_STENCIL_TWO_SIDE])
|
||||
if (gl_info->supported[EXT_STENCIL_TWO_SIDE])
|
||||
{
|
||||
glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_STENCIL_TEST_TWO_SIDE_EXT);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_TWOSIDEDSTENCILMODE));
|
||||
}
|
||||
glStencilMask(~0U);
|
||||
gl_info->gl_ops.gl.p_glStencilMask(~0U);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_STENCILWRITEMASK));
|
||||
glClearStencil(stencil);
|
||||
gl_info->gl_ops.gl.p_glClearStencil(stencil);
|
||||
checkGLcall("glClearStencil");
|
||||
clear_mask = clear_mask | GL_STENCIL_BUFFER_BIT;
|
||||
}
|
||||
|
@ -731,9 +733,9 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
|||
|
||||
surface_modify_ds_location(fb->depth_stencil, location, ds_rect.right, ds_rect.bottom);
|
||||
|
||||
glDepthMask(GL_TRUE);
|
||||
gl_info->gl_ops.gl.p_glDepthMask(GL_TRUE);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_ZWRITEENABLE));
|
||||
glClearDepth(depth);
|
||||
gl_info->gl_ops.gl.p_glClearDepth(depth);
|
||||
checkGLcall("glClearDepth");
|
||||
clear_mask = clear_mask | GL_DEPTH_BUFFER_BIT;
|
||||
}
|
||||
|
@ -748,12 +750,12 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
|||
surface_modify_location(rt, rt->draw_binding, TRUE);
|
||||
}
|
||||
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
gl_info->gl_ops.gl.p_glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE1));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE2));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3));
|
||||
glClearColor(color->r, color->g, color->b, color->a);
|
||||
gl_info->gl_ops.gl.p_glClearColor(color->r, color->g, color->b, color->a);
|
||||
checkGLcall("glClearColor");
|
||||
clear_mask = clear_mask | GL_COLOR_BUFFER_BIT;
|
||||
}
|
||||
|
@ -762,16 +764,16 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
|||
{
|
||||
if (render_offscreen)
|
||||
{
|
||||
glScissor(draw_rect->left, draw_rect->top,
|
||||
gl_info->gl_ops.gl.p_glScissor(draw_rect->left, draw_rect->top,
|
||||
draw_rect->right - draw_rect->left, draw_rect->bottom - draw_rect->top);
|
||||
}
|
||||
else
|
||||
{
|
||||
glScissor(draw_rect->left, drawable_height - draw_rect->bottom,
|
||||
gl_info->gl_ops.gl.p_glScissor(draw_rect->left, drawable_height - draw_rect->bottom,
|
||||
draw_rect->right - draw_rect->left, draw_rect->bottom - draw_rect->top);
|
||||
}
|
||||
checkGLcall("glScissor");
|
||||
glClear(clear_mask);
|
||||
gl_info->gl_ops.gl.p_glClear(clear_mask);
|
||||
checkGLcall("glClear");
|
||||
}
|
||||
else
|
||||
|
@ -799,17 +801,17 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
|||
|
||||
if (render_offscreen)
|
||||
{
|
||||
glScissor(current_rect.left, current_rect.top,
|
||||
gl_info->gl_ops.gl.p_glScissor(current_rect.left, current_rect.top,
|
||||
current_rect.right - current_rect.left, current_rect.bottom - current_rect.top);
|
||||
}
|
||||
else
|
||||
{
|
||||
glScissor(current_rect.left, drawable_height - current_rect.bottom,
|
||||
gl_info->gl_ops.gl.p_glScissor(current_rect.left, drawable_height - current_rect.bottom,
|
||||
current_rect.right - current_rect.left, current_rect.bottom - current_rect.top);
|
||||
}
|
||||
checkGLcall("glScissor");
|
||||
|
||||
glClear(clear_mask);
|
||||
gl_info->gl_ops.gl.p_glClear(clear_mask);
|
||||
checkGLcall("glClear");
|
||||
}
|
||||
}
|
||||
|
@ -819,7 +821,7 @@ void device_clear_render_targets(struct wined3d_device *device, UINT rt_count, c
|
|||
if (wined3d_settings.strict_draw_ordering || (flags & WINED3DCLEAR_TARGET
|
||||
&& target->container.type == WINED3D_CONTAINER_SWAPCHAIN
|
||||
&& target->container.u.swapchain->front_buffer == target))
|
||||
glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
|
||||
context_release(context);
|
||||
}
|
||||
|
@ -989,7 +991,7 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
|||
if (gl_info->supported[APPLE_CLIENT_STORAGE])
|
||||
{
|
||||
/* The dummy texture does not have client storage backing */
|
||||
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE);
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE);
|
||||
checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)");
|
||||
}
|
||||
|
||||
|
@ -1001,36 +1003,38 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
|||
/* Make appropriate texture active */
|
||||
context_active_texture(context, gl_info, i);
|
||||
|
||||
glGenTextures(1, &device->dummy_texture_2d[i]);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_texture_2d[i]);
|
||||
checkGLcall("glGenTextures");
|
||||
TRACE("Dummy 2D texture %u given name %u.\n", i, device->dummy_texture_2d[i]);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, device->dummy_texture_2d[i]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, device->dummy_texture_2d[i]);
|
||||
checkGLcall("glBindTexture");
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 1, 1, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 1, 1, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color);
|
||||
checkGLcall("glTexImage2D");
|
||||
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
{
|
||||
glGenTextures(1, &device->dummy_texture_rect[i]);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_texture_rect[i]);
|
||||
checkGLcall("glGenTextures");
|
||||
TRACE("Dummy rectangle texture %u given name %u.\n", i, device->dummy_texture_rect[i]);
|
||||
|
||||
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, device->dummy_texture_rect[i]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_RECTANGLE_ARB, device->dummy_texture_rect[i]);
|
||||
checkGLcall("glBindTexture");
|
||||
|
||||
glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, 1, 1, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA8, 1, 1, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color);
|
||||
checkGLcall("glTexImage2D");
|
||||
}
|
||||
|
||||
if (gl_info->supported[EXT_TEXTURE3D])
|
||||
{
|
||||
glGenTextures(1, &device->dummy_texture_3d[i]);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_texture_3d[i]);
|
||||
checkGLcall("glGenTextures");
|
||||
TRACE("Dummy 3D texture %u given name %u.\n", i, device->dummy_texture_3d[i]);
|
||||
|
||||
glBindTexture(GL_TEXTURE_3D, device->dummy_texture_3d[i]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_3D, device->dummy_texture_3d[i]);
|
||||
checkGLcall("glBindTexture");
|
||||
|
||||
GL_EXTCALL(glTexImage3DEXT(GL_TEXTURE_3D, 0, GL_RGBA8, 1, 1, 1, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color));
|
||||
|
@ -1039,16 +1043,17 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
|||
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
{
|
||||
glGenTextures(1, &device->dummy_texture_cube[i]);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &device->dummy_texture_cube[i]);
|
||||
checkGLcall("glGenTextures");
|
||||
TRACE("Dummy cube texture %u given name %u.\n", i, device->dummy_texture_cube[i]);
|
||||
|
||||
glBindTexture(GL_TEXTURE_CUBE_MAP, device->dummy_texture_cube[i]);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_CUBE_MAP, device->dummy_texture_cube[i]);
|
||||
checkGLcall("glBindTexture");
|
||||
|
||||
for (j = GL_TEXTURE_CUBE_MAP_POSITIVE_X; j <= GL_TEXTURE_CUBE_MAP_NEGATIVE_Z; ++j)
|
||||
{
|
||||
glTexImage2D(j, 0, GL_RGBA8, 1, 1, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(j, 0, GL_RGBA8, 1, 1, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color);
|
||||
checkGLcall("glTexImage2D");
|
||||
}
|
||||
}
|
||||
|
@ -1057,7 +1062,7 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
|
|||
if (gl_info->supported[APPLE_CLIENT_STORAGE])
|
||||
{
|
||||
/* Re-enable because if supported it is enabled by default */
|
||||
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
|
||||
checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)");
|
||||
}
|
||||
|
||||
|
@ -1072,23 +1077,23 @@ static void destroy_dummy_textures(struct wined3d_device *device, const struct w
|
|||
ENTER_GL();
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
{
|
||||
glDeleteTextures(count, device->dummy_texture_cube);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(count, device->dummy_texture_cube);
|
||||
checkGLcall("glDeleteTextures(count, device->dummy_texture_cube)");
|
||||
}
|
||||
|
||||
if (gl_info->supported[EXT_TEXTURE3D])
|
||||
{
|
||||
glDeleteTextures(count, device->dummy_texture_3d);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(count, device->dummy_texture_3d);
|
||||
checkGLcall("glDeleteTextures(count, device->dummy_texture_3d)");
|
||||
}
|
||||
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
{
|
||||
glDeleteTextures(count, device->dummy_texture_rect);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(count, device->dummy_texture_rect);
|
||||
checkGLcall("glDeleteTextures(count, device->dummy_texture_rect)");
|
||||
}
|
||||
|
||||
glDeleteTextures(count, device->dummy_texture_2d);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(count, device->dummy_texture_2d);
|
||||
checkGLcall("glDeleteTextures(count, device->dummy_texture_2d)");
|
||||
LEAVE_GL();
|
||||
|
||||
|
@ -1452,7 +1457,7 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
|||
if (device->cursorTexture)
|
||||
{
|
||||
ENTER_GL();
|
||||
glDeleteTextures(1, &device->cursorTexture);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->cursorTexture);
|
||||
LEAVE_GL();
|
||||
device->cursorTexture = 0;
|
||||
}
|
||||
|
@ -1463,7 +1468,7 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device)
|
|||
if (device->depth_blt_texture)
|
||||
{
|
||||
ENTER_GL();
|
||||
glDeleteTextures(1, &device->depth_blt_texture);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->depth_blt_texture);
|
||||
LEAVE_GL();
|
||||
device->depth_blt_texture = 0;
|
||||
}
|
||||
|
@ -3811,7 +3816,7 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device)
|
|||
|
||||
context = context_acquire(device, NULL);
|
||||
/* We only have to do this if we need to read the, swapbuffers performs a flush for us */
|
||||
glFlush();
|
||||
context->gl_info->gl_ops.gl.p_glFlush();
|
||||
/* No checkGLcall here to avoid locking the lock just for checking a call that hardly ever
|
||||
* fails. */
|
||||
context_release(context);
|
||||
|
@ -4793,7 +4798,7 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
|
|||
{
|
||||
struct wined3d_context *context = context_acquire(device, NULL);
|
||||
ENTER_GL();
|
||||
glDeleteTextures(1, &device->cursorTexture);
|
||||
context->gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->cursorTexture);
|
||||
LEAVE_GL();
|
||||
context_release(context);
|
||||
device->cursorTexture = 0;
|
||||
|
@ -4863,23 +4868,23 @@ HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device
|
|||
|
||||
if (gl_info->supported[APPLE_CLIENT_STORAGE])
|
||||
{
|
||||
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE);
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE);
|
||||
checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_FALSE)");
|
||||
}
|
||||
|
||||
invalidate_active_texture(device, context);
|
||||
/* Create a new cursor texture */
|
||||
glGenTextures(1, &device->cursorTexture);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &device->cursorTexture);
|
||||
checkGLcall("glGenTextures");
|
||||
context_bind_texture(context, GL_TEXTURE_2D, device->cursorTexture);
|
||||
/* Copy the bitmap memory into the cursor texture */
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, intfmt, width, height, 0, gl_format, type, mem);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, intfmt, width, height, 0, gl_format, type, mem);
|
||||
checkGLcall("glTexImage2D");
|
||||
HeapFree(GetProcessHeap(), 0, mem);
|
||||
|
||||
if (gl_info->supported[APPLE_CLIENT_STORAGE])
|
||||
{
|
||||
glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
|
||||
gl_info->gl_ops.gl.p_glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE);
|
||||
checkGLcall("glPixelStorei(GL_UNPACK_CLIENT_STORAGE_APPLE, GL_TRUE)");
|
||||
}
|
||||
|
||||
|
@ -5044,12 +5049,12 @@ static void delete_opengl_contexts(struct wined3d_device *device, struct wined3d
|
|||
ENTER_GL();
|
||||
if (device->depth_blt_texture)
|
||||
{
|
||||
glDeleteTextures(1, &device->depth_blt_texture);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->depth_blt_texture);
|
||||
device->depth_blt_texture = 0;
|
||||
}
|
||||
if (device->cursorTexture)
|
||||
{
|
||||
glDeleteTextures(1, &device->cursorTexture);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &device->cursorTexture);
|
||||
device->cursorTexture = 0;
|
||||
}
|
||||
LEAVE_GL();
|
||||
|
|
|
@ -422,7 +422,7 @@ static inline BOOL test_arb_vs_offset_limit(const struct wined3d_gl_info *gl_inf
|
|||
"MOV result.position, C[A0.x + 65];\n"
|
||||
"END\n";
|
||||
|
||||
while(glGetError());
|
||||
while (gl_info->gl_ops.gl.p_glGetError());
|
||||
GL_EXTCALL(glGenProgramsARB(1, &prog));
|
||||
if(!prog) {
|
||||
ERR("Failed to create an ARB offset limit test program\n");
|
||||
|
@ -430,10 +430,10 @@ static inline BOOL test_arb_vs_offset_limit(const struct wined3d_gl_info *gl_inf
|
|||
GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prog));
|
||||
GL_EXTCALL(glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
|
||||
strlen(testcode), testcode));
|
||||
if (glGetError())
|
||||
if (gl_info->gl_ops.gl.p_glGetError())
|
||||
{
|
||||
TRACE("OpenGL implementation does not allow indirect addressing offsets > 63\n");
|
||||
TRACE("error: %s\n", debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
TRACE("error: %s\n", debugstr_a((const char *)gl_info->gl_ops.gl.p_glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
ret = TRUE;
|
||||
} else TRACE("OpenGL implementation allows offsets > 63\n");
|
||||
|
||||
|
@ -521,12 +521,12 @@ static void test_pbo_functionality(struct wined3d_gl_info *gl_info)
|
|||
|
||||
ENTER_GL();
|
||||
|
||||
while (glGetError());
|
||||
glGenTextures(1, &texture);
|
||||
glBindTexture(GL_TEXTURE_2D, texture);
|
||||
while (gl_info->gl_ops.gl.p_glGetError());
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &texture);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, texture);
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 4, 4, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 0);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, 0);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 4, 4, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, 0);
|
||||
checkGLcall("Specifying the PBO test texture");
|
||||
|
||||
GL_EXTCALL(glGenBuffersARB(1, &pbo));
|
||||
|
@ -534,20 +534,20 @@ static void test_pbo_functionality(struct wined3d_gl_info *gl_info)
|
|||
GL_EXTCALL(glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_ARB, sizeof(pattern), pattern, GL_STREAM_DRAW_ARB));
|
||||
checkGLcall("Specifying the PBO test pbo");
|
||||
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 4, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
|
||||
gl_info->gl_ops.gl.p_glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 4, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
|
||||
checkGLcall("Loading the PBO test texture");
|
||||
|
||||
GL_EXTCALL(glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_ARB, 0));
|
||||
LEAVE_GL();
|
||||
|
||||
glFinish(); /* just to be sure */
|
||||
gl_info->gl_ops.gl.p_glFinish(); /* just to be sure */
|
||||
|
||||
memset(check, 0, sizeof(check));
|
||||
ENTER_GL();
|
||||
glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, check);
|
||||
gl_info->gl_ops.gl.p_glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, check);
|
||||
checkGLcall("Reading back the PBO test texture");
|
||||
|
||||
glDeleteTextures(1, &texture);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &texture);
|
||||
GL_EXTCALL(glDeleteBuffersARB(1, &pbo));
|
||||
checkGLcall("PBO test cleanup");
|
||||
|
||||
|
@ -606,12 +606,13 @@ static BOOL match_allows_spec_alpha(const struct wined3d_gl_info *gl_info, const
|
|||
GLenum error;
|
||||
DWORD data[16];
|
||||
|
||||
if (!gl_info->supported[EXT_SECONDARY_COLOR]) return FALSE;
|
||||
if (!gl_info->supported[EXT_SECONDARY_COLOR])
|
||||
return FALSE;
|
||||
|
||||
ENTER_GL();
|
||||
while(glGetError());
|
||||
while (gl_info->gl_ops.gl.p_glGetError());
|
||||
GL_EXTCALL(glSecondaryColorPointerEXT)(4, GL_UNSIGNED_BYTE, 4, data);
|
||||
error = glGetError();
|
||||
error = gl_info->gl_ops.gl.p_glGetError();
|
||||
LEAVE_GL();
|
||||
|
||||
if (error == GL_NO_ERROR)
|
||||
|
@ -644,7 +645,7 @@ static BOOL match_broken_nv_clip(const struct wined3d_gl_info *gl_info, const ch
|
|||
if (!gl_info->supported[NV_VERTEX_PROGRAM2_OPTION]) return FALSE;
|
||||
|
||||
ENTER_GL();
|
||||
while(glGetError());
|
||||
while (gl_info->gl_ops.gl.p_glGetError());
|
||||
|
||||
GL_EXTCALL(glGenProgramsARB(1, &prog));
|
||||
if(!prog)
|
||||
|
@ -656,13 +657,13 @@ static BOOL match_broken_nv_clip(const struct wined3d_gl_info *gl_info, const ch
|
|||
GL_EXTCALL(glBindProgramARB(GL_VERTEX_PROGRAM_ARB, prog));
|
||||
GL_EXTCALL(glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
|
||||
strlen(testcode), testcode));
|
||||
glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_PROGRAM_ERROR_POSITION_ARB, &pos);
|
||||
if(pos != -1)
|
||||
{
|
||||
WARN("GL_NV_vertex_program2_option result.clip[] test failed\n");
|
||||
TRACE("error: %s\n", debugstr_a((const char *)glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
TRACE("error: %s\n", debugstr_a((const char *)gl_info->gl_ops.gl.p_glGetString(GL_PROGRAM_ERROR_STRING_ARB)));
|
||||
ret = TRUE;
|
||||
while(glGetError());
|
||||
while (gl_info->gl_ops.gl.p_glGetError());
|
||||
}
|
||||
else TRACE("GL_NV_vertex_program2_option result.clip[] test passed\n");
|
||||
|
||||
|
@ -688,11 +689,11 @@ static BOOL match_fbo_tex_update(const struct wined3d_gl_info *gl_info, const ch
|
|||
|
||||
ENTER_GL();
|
||||
|
||||
glGenTextures(1, &tex);
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 4, 4, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &tex);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, tex);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 4, 4, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, NULL);
|
||||
checkGLcall("glTexImage2D");
|
||||
|
||||
gl_info->fbo_ops.glGenFramebuffers(1, &fbo);
|
||||
|
@ -705,23 +706,23 @@ static BOOL match_fbo_tex_update(const struct wined3d_gl_info *gl_info, const ch
|
|||
checkGLcall("glCheckFramebufferStatus");
|
||||
|
||||
memset(data, 0x11, sizeof(data));
|
||||
glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 4, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, data);
|
||||
gl_info->gl_ops.gl.p_glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 4, 4, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, data);
|
||||
checkGLcall("glTexSubImage2D");
|
||||
|
||||
glClearColor(0.996f, 0.729f, 0.745f, 0.792f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
gl_info->gl_ops.gl.p_glClearColor(0.996f, 0.729f, 0.745f, 0.792f);
|
||||
gl_info->gl_ops.gl.p_glClear(GL_COLOR_BUFFER_BIT);
|
||||
checkGLcall("glClear");
|
||||
|
||||
glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, data);
|
||||
gl_info->gl_ops.gl.p_glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, data);
|
||||
checkGLcall("glGetTexImage");
|
||||
|
||||
gl_info->fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
|
||||
gl_info->fbo_ops.glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, 0);
|
||||
checkGLcall("glBindTexture");
|
||||
|
||||
gl_info->fbo_ops.glDeleteFramebuffers(1, &fbo);
|
||||
glDeleteTextures(1, &tex);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &tex);
|
||||
checkGLcall("glDeleteTextures");
|
||||
|
||||
LEAVE_GL();
|
||||
|
@ -740,18 +741,18 @@ static BOOL match_broken_rgba16(const struct wined3d_gl_info *gl_info, const cha
|
|||
|
||||
ENTER_GL();
|
||||
|
||||
glGenTextures(1, &tex);
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16, 4, 4, 0, GL_RGBA, GL_UNSIGNED_SHORT, NULL);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &tex);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, tex);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA16, 4, 4, 0, GL_RGBA, GL_UNSIGNED_SHORT, NULL);
|
||||
checkGLcall("glTexImage2D");
|
||||
|
||||
glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_RED_SIZE, &size);
|
||||
gl_info->gl_ops.gl.p_glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_RED_SIZE, &size);
|
||||
checkGLcall("glGetTexLevelParameteriv");
|
||||
TRACE("Real color depth is %d\n", size);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, 0);
|
||||
checkGLcall("glBindTexture");
|
||||
glDeleteTextures(1, &tex);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &tex);
|
||||
checkGLcall("glDeleteTextures");
|
||||
|
||||
LEAVE_GL();
|
||||
|
@ -2350,26 +2351,26 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
|
|||
gl_info->limits.arb_ps_instructions = 0;
|
||||
gl_info->limits.arb_ps_temps = 0;
|
||||
|
||||
glGetIntegerv(GL_MAX_CLIP_PLANES, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_CLIP_PLANES, &gl_max);
|
||||
gl_info->limits.clipplanes = min(WINED3DMAXUSERCLIPPLANES, gl_max);
|
||||
TRACE("Clip plane support - max planes %d.\n", gl_max);
|
||||
|
||||
glGetIntegerv(GL_MAX_LIGHTS, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_LIGHTS, &gl_max);
|
||||
gl_info->limits.lights = gl_max;
|
||||
TRACE("Light support - max lights %d.\n", gl_max);
|
||||
|
||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_TEXTURE_SIZE, &gl_max);
|
||||
gl_info->limits.texture_size = gl_max;
|
||||
TRACE("Maximum texture size support - max texture size %d.\n", gl_max);
|
||||
|
||||
glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, gl_floatv);
|
||||
gl_info->gl_ops.gl.p_glGetFloatv(GL_ALIASED_POINT_SIZE_RANGE, gl_floatv);
|
||||
gl_info->limits.pointsize_min = gl_floatv[0];
|
||||
gl_info->limits.pointsize_max = gl_floatv[1];
|
||||
TRACE("Maximum point size support - max point size %f.\n", gl_floatv[1]);
|
||||
|
||||
if (gl_info->supported[ARB_MAP_BUFFER_ALIGNMENT])
|
||||
{
|
||||
glGetIntegerv(GL_MIN_MAP_BUFFER_ALIGNMENT, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MIN_MAP_BUFFER_ALIGNMENT, &gl_max);
|
||||
TRACE("Minimum buffer map alignment: %d.\n", gl_max);
|
||||
}
|
||||
else
|
||||
|
@ -2378,28 +2379,28 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
|
|||
}
|
||||
if (gl_info->supported[NV_REGISTER_COMBINERS])
|
||||
{
|
||||
glGetIntegerv(GL_MAX_GENERAL_COMBINERS_NV, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_GENERAL_COMBINERS_NV, &gl_max);
|
||||
gl_info->limits.general_combiners = gl_max;
|
||||
TRACE("Max general combiners: %d.\n", gl_max);
|
||||
}
|
||||
if (gl_info->supported[ARB_DRAW_BUFFERS] && wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_DRAW_BUFFERS_ARB, &gl_max);
|
||||
gl_info->limits.buffers = gl_max;
|
||||
TRACE("Max draw buffers: %u.\n", gl_max);
|
||||
}
|
||||
if (gl_info->supported[ARB_MULTITEXTURE])
|
||||
{
|
||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_TEXTURE_UNITS_ARB, &gl_max);
|
||||
gl_info->limits.textures = min(MAX_TEXTURES, gl_max);
|
||||
TRACE("Max textures: %d.\n", gl_info->limits.textures);
|
||||
|
||||
if (gl_info->supported[ARB_FRAGMENT_PROGRAM])
|
||||
{
|
||||
GLint tmp;
|
||||
glGetIntegerv(GL_MAX_TEXTURE_COORDS_ARB, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_TEXTURE_COORDS_ARB, &gl_max);
|
||||
gl_info->limits.texture_coords = min(MAX_TEXTURES, gl_max);
|
||||
glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &tmp);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS_ARB, &tmp);
|
||||
gl_info->limits.fragment_samplers = min(MAX_FRAGMENT_SAMPLERS, tmp);
|
||||
}
|
||||
else
|
||||
|
@ -2413,11 +2414,11 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
|
|||
if (gl_info->supported[ARB_VERTEX_SHADER])
|
||||
{
|
||||
GLint tmp;
|
||||
glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB, &tmp);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS_ARB, &tmp);
|
||||
gl_info->limits.vertex_samplers = tmp;
|
||||
glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB, &tmp);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS_ARB, &tmp);
|
||||
gl_info->limits.combined_samplers = tmp;
|
||||
glGetIntegerv(GL_MAX_VERTEX_ATTRIBS_ARB, &tmp);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_VERTEX_ATTRIBS_ARB, &tmp);
|
||||
gl_info->limits.vertex_attribs = tmp;
|
||||
|
||||
/* Loading GLSL sampler uniforms is much simpler if we can assume that the sampler setup
|
||||
|
@ -2455,19 +2456,19 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
|
|||
}
|
||||
if (gl_info->supported[ARB_VERTEX_BLEND])
|
||||
{
|
||||
glGetIntegerv(GL_MAX_VERTEX_UNITS_ARB, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_VERTEX_UNITS_ARB, &gl_max);
|
||||
gl_info->limits.blends = gl_max;
|
||||
TRACE("Max blends: %u.\n", gl_info->limits.blends);
|
||||
}
|
||||
if (gl_info->supported[EXT_TEXTURE3D])
|
||||
{
|
||||
glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE_EXT, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_3D_TEXTURE_SIZE_EXT, &gl_max);
|
||||
gl_info->limits.texture3d_size = gl_max;
|
||||
TRACE("Max texture3D size: %d.\n", gl_info->limits.texture3d_size);
|
||||
}
|
||||
if (gl_info->supported[EXT_TEXTURE_FILTER_ANISOTROPIC])
|
||||
{
|
||||
glGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT, &gl_max);
|
||||
gl_info->limits.anisotropy = gl_max;
|
||||
TRACE("Max anisotropy: %d.\n", gl_info->limits.anisotropy);
|
||||
}
|
||||
|
@ -2508,29 +2509,29 @@ static void wined3d_adapter_init_limits(struct wined3d_gl_info *gl_info)
|
|||
}
|
||||
if (gl_info->supported[ARB_VERTEX_SHADER])
|
||||
{
|
||||
glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS_ARB, &gl_max);
|
||||
gl_info->limits.glsl_vs_float_constants = gl_max / 4;
|
||||
TRACE("Max ARB_VERTEX_SHADER float constants: %u.\n", gl_info->limits.glsl_vs_float_constants);
|
||||
}
|
||||
if (gl_info->supported[ARB_FRAGMENT_SHADER])
|
||||
{
|
||||
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS_ARB, &gl_max);
|
||||
gl_info->limits.glsl_ps_float_constants = gl_max / 4;
|
||||
TRACE("Max ARB_FRAGMENT_SHADER float constants: %u.\n", gl_info->limits.glsl_ps_float_constants);
|
||||
glGetIntegerv(GL_MAX_VARYING_FLOATS_ARB, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_VARYING_FLOATS_ARB, &gl_max);
|
||||
gl_info->limits.glsl_varyings = gl_max;
|
||||
TRACE("Max GLSL varyings: %u (%u 4 component varyings).\n", gl_max, gl_max / 4);
|
||||
}
|
||||
|
||||
if (gl_info->supported[NV_LIGHT_MAX_EXPONENT])
|
||||
glGetFloatv(GL_MAX_SHININESS_NV, &gl_info->limits.shininess);
|
||||
gl_info->gl_ops.gl.p_glGetFloatv(GL_MAX_SHININESS_NV, &gl_info->limits.shininess);
|
||||
else
|
||||
gl_info->limits.shininess = 128.0f;
|
||||
|
||||
if ((gl_info->supported[ARB_FRAMEBUFFER_OBJECT] || gl_info->supported[EXT_FRAMEBUFFER_MULTISAMPLE])
|
||||
&& wined3d_settings.allow_multisampling)
|
||||
{
|
||||
glGetIntegerv(GL_MAX_SAMPLES, &gl_max);
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv(GL_MAX_SAMPLES, &gl_max);
|
||||
gl_info->limits.samples = gl_max;
|
||||
}
|
||||
}
|
||||
|
@ -2554,7 +2555,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
|
|||
|
||||
ENTER_GL();
|
||||
|
||||
gl_renderer_str = (const char *)glGetString(GL_RENDERER);
|
||||
gl_renderer_str = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_RENDERER);
|
||||
TRACE("GL_RENDERER: %s.\n", debugstr_a(gl_renderer_str));
|
||||
if (!gl_renderer_str)
|
||||
{
|
||||
|
@ -2563,7 +2564,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
gl_vendor_str = (const char *)glGetString(GL_VENDOR);
|
||||
gl_vendor_str = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_VENDOR);
|
||||
TRACE("GL_VENDOR: %s.\n", debugstr_a(gl_vendor_str));
|
||||
if (!gl_vendor_str)
|
||||
{
|
||||
|
@ -2573,7 +2574,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
|
|||
}
|
||||
|
||||
/* Parse the GL_VERSION field into major and minor information */
|
||||
gl_version_str = (const char *)glGetString(GL_VERSION);
|
||||
gl_version_str = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_VERSION);
|
||||
TRACE("GL_VERSION: %s.\n", debugstr_a(gl_version_str));
|
||||
if (!gl_version_str)
|
||||
{
|
||||
|
@ -2584,7 +2585,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
|
|||
gl_version = wined3d_parse_gl_version(gl_version_str);
|
||||
|
||||
/* Parse the gl supported features, in theory enabling parts of our code appropriately. */
|
||||
GL_Extensions = (const char *)glGetString(GL_EXTENSIONS);
|
||||
GL_Extensions = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_EXTENSIONS);
|
||||
if (!GL_Extensions)
|
||||
{
|
||||
LEAVE_GL();
|
||||
|
@ -2738,7 +2739,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
|
|||
|
||||
if (gl_info->supported[ARB_SHADING_LANGUAGE_100])
|
||||
{
|
||||
const char *str = (const char *)glGetString(GL_SHADING_LANGUAGE_VERSION_ARB);
|
||||
const char *str = (const char *)gl_info->gl_ops.gl.p_glGetString(GL_SHADING_LANGUAGE_VERSION_ARB);
|
||||
unsigned int major, minor;
|
||||
|
||||
TRACE("GLSL version string: %s.\n", debugstr_a(str));
|
||||
|
@ -5211,7 +5212,7 @@ static void WINE_GLAPI position_d3dcolor(const void *data)
|
|||
DWORD pos = *((const DWORD *)data);
|
||||
|
||||
FIXME("Add a test for fixed function position from d3dcolor type\n");
|
||||
glVertex4s(D3DCOLOR_B_R(pos),
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glVertex4s(D3DCOLOR_B_R(pos),
|
||||
D3DCOLOR_B_G(pos),
|
||||
D3DCOLOR_B_B(pos),
|
||||
D3DCOLOR_B_A(pos));
|
||||
|
@ -5225,11 +5226,11 @@ static void WINE_GLAPI position_float4(const void *data)
|
|||
{
|
||||
float w = 1.0f / pos[3];
|
||||
|
||||
glVertex4f(pos[0] * w, pos[1] * w, pos[2] * w, w);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glVertex4f(pos[0] * w, pos[1] * w, pos[2] * w, w);
|
||||
}
|
||||
else
|
||||
{
|
||||
glVertex3fv(pos);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glVertex3fv(pos);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -5237,7 +5238,7 @@ static void WINE_GLAPI diffuse_d3dcolor(const void *data)
|
|||
{
|
||||
DWORD diffuseColor = *((const DWORD *)data);
|
||||
|
||||
glColor4ub(D3DCOLOR_B_R(diffuseColor),
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glColor4ub(D3DCOLOR_B_R(diffuseColor),
|
||||
D3DCOLOR_B_G(diffuseColor),
|
||||
D3DCOLOR_B_B(diffuseColor),
|
||||
D3DCOLOR_B_A(diffuseColor));
|
||||
|
@ -5262,12 +5263,12 @@ static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info)
|
|||
{
|
||||
position_funcs[WINED3D_FFP_EMIT_FLOAT1] = invalid_func;
|
||||
position_funcs[WINED3D_FFP_EMIT_FLOAT2] = invalid_func;
|
||||
position_funcs[WINED3D_FFP_EMIT_FLOAT3] = (glAttribFunc)glVertex3fv;
|
||||
position_funcs[WINED3D_FFP_EMIT_FLOAT3] = (glAttribFunc)gl_info->gl_ops.gl.p_glVertex3fv;
|
||||
position_funcs[WINED3D_FFP_EMIT_FLOAT4] = position_float4;
|
||||
position_funcs[WINED3D_FFP_EMIT_D3DCOLOR] = position_d3dcolor;
|
||||
position_funcs[WINED3D_FFP_EMIT_UBYTE4] = invalid_func;
|
||||
position_funcs[WINED3D_FFP_EMIT_SHORT2] = invalid_func;
|
||||
position_funcs[WINED3D_FFP_EMIT_SHORT4] = (glAttribFunc)glVertex2sv;
|
||||
position_funcs[WINED3D_FFP_EMIT_SHORT4] = (glAttribFunc)gl_info->gl_ops.gl.p_glVertex2sv;
|
||||
position_funcs[WINED3D_FFP_EMIT_UBYTE4N] = invalid_func;
|
||||
position_funcs[WINED3D_FFP_EMIT_SHORT2N] = invalid_func;
|
||||
position_funcs[WINED3D_FFP_EMIT_SHORT4N] = invalid_func;
|
||||
|
@ -5280,17 +5281,17 @@ static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info)
|
|||
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_FLOAT1] = invalid_func;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_FLOAT2] = invalid_func;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_FLOAT3] = (glAttribFunc)glColor3fv;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_FLOAT4] = (glAttribFunc)glColor4fv;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_FLOAT3] = (glAttribFunc)gl_info->gl_ops.gl.p_glColor3fv;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_FLOAT4] = (glAttribFunc)gl_info->gl_ops.gl.p_glColor4fv;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_D3DCOLOR] = diffuse_d3dcolor;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_UBYTE4] = invalid_func;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_SHORT2] = invalid_func;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_SHORT4] = invalid_func;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_UBYTE4N] = (glAttribFunc)glColor4ubv;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_UBYTE4N] = (glAttribFunc)gl_info->gl_ops.gl.p_glColor4ubv;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_SHORT2N] = invalid_func;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_SHORT4N] = (glAttribFunc)glColor4sv;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_SHORT4N] = (glAttribFunc)gl_info->gl_ops.gl.p_glColor4sv;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_USHORT2N] = invalid_func;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_USHORT4N] = (glAttribFunc)glColor4usv;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_USHORT4N] = (glAttribFunc)gl_info->gl_ops.gl.p_glColor4usv;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_UDEC3] = invalid_func;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_DEC3N] = invalid_func;
|
||||
diffuse_funcs[WINED3D_FFP_EMIT_FLOAT16_2] = invalid_func;
|
||||
|
@ -5335,8 +5336,8 @@ static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info)
|
|||
*/
|
||||
normal_funcs[WINED3D_FFP_EMIT_FLOAT1] = invalid_func;
|
||||
normal_funcs[WINED3D_FFP_EMIT_FLOAT2] = invalid_func;
|
||||
normal_funcs[WINED3D_FFP_EMIT_FLOAT3] = (glAttribFunc)glNormal3fv;
|
||||
normal_funcs[WINED3D_FFP_EMIT_FLOAT4] = (glAttribFunc)glNormal3fv; /* Just ignore the 4th value */
|
||||
normal_funcs[WINED3D_FFP_EMIT_FLOAT3] = (glAttribFunc)gl_info->gl_ops.gl.p_glNormal3fv;
|
||||
normal_funcs[WINED3D_FFP_EMIT_FLOAT4] = (glAttribFunc)gl_info->gl_ops.gl.p_glNormal3fv; /* Just ignore the 4th value */
|
||||
normal_funcs[WINED3D_FFP_EMIT_D3DCOLOR] = invalid_func;
|
||||
normal_funcs[WINED3D_FFP_EMIT_UBYTE4] = invalid_func;
|
||||
normal_funcs[WINED3D_FFP_EMIT_SHORT2] = invalid_func;
|
||||
|
@ -5380,6 +5381,8 @@ static void fillGLAttribFuncs(const struct wined3d_gl_info *gl_info)
|
|||
/* Do not call while under the GL lock. */
|
||||
static BOOL InitAdapters(struct wined3d *wined3d)
|
||||
{
|
||||
struct wined3d_adapter *adapter = &wined3d->adapters[0];
|
||||
struct wined3d_gl_info *gl_info = &adapter->gl_info;
|
||||
static HMODULE mod_gl;
|
||||
BOOL ret;
|
||||
int ps_selected_mode, vs_selected_mode;
|
||||
|
@ -5405,8 +5408,8 @@ static BOOL InitAdapters(struct wined3d *wined3d)
|
|||
|
||||
/* Dynamically load all GL core functions */
|
||||
#ifdef USE_WIN32_OPENGL
|
||||
#define USE_GL_FUNC(pfn) pfn = (void*)GetProcAddress(mod_gl, #pfn);
|
||||
GL_FUNCS_GEN;
|
||||
#define USE_GL_FUNC(f) gl_info->gl_ops.gl.p_##f = (void *)GetProcAddress(mod_gl, #f);
|
||||
ALL_WGL_FUNCS
|
||||
#undef USE_GL_FUNC
|
||||
#else
|
||||
/* To bypass the opengl32 thunks retrieve functions from the WGL driver instead of opengl32 */
|
||||
|
@ -5415,19 +5418,15 @@ static BOOL InitAdapters(struct wined3d *wined3d)
|
|||
const struct opengl_funcs *wgl_driver = __wine_get_wgl_driver( hdc, WINE_WGL_DRIVER_VERSION );
|
||||
ReleaseDC( 0, hdc );
|
||||
if (!wgl_driver || wgl_driver == (void *)-1) goto nogl_adapter;
|
||||
#define USE_GL_FUNC(pfn) pfn = wgl_driver->gl.p_##pfn;
|
||||
GL_FUNCS_GEN;
|
||||
#undef USE_GL_FUNC
|
||||
gl_info->gl_ops.gl = wgl_driver->gl;
|
||||
}
|
||||
#endif
|
||||
|
||||
glEnableWINE = glEnable;
|
||||
glDisableWINE = glDisable;
|
||||
glEnableWINE = gl_info->gl_ops.gl.p_glEnable;
|
||||
glDisableWINE = gl_info->gl_ops.gl.p_glDisable;
|
||||
|
||||
/* For now only one default adapter */
|
||||
{
|
||||
struct wined3d_adapter *adapter = &wined3d->adapters[0];
|
||||
const struct wined3d_gl_info *gl_info = &adapter->gl_info;
|
||||
struct wined3d_fake_gl_ctx fake_gl_ctx = {0};
|
||||
struct wined3d_pixel_format *cfgs;
|
||||
int iPixelFormat;
|
||||
|
|
|
@ -49,14 +49,14 @@ static void drawStridedFast(const struct wined3d_gl_info *gl_info, GLenum primit
|
|||
}
|
||||
else
|
||||
{
|
||||
glDrawElements(primitive_type, count,
|
||||
gl_info->gl_ops.gl.p_glDrawElements(primitive_type, count,
|
||||
idxtype, (const char *)idx_data + (idx_size * start_idx));
|
||||
checkGLcall("glDrawElements");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
glDrawArrays(primitive_type, start_idx, count);
|
||||
gl_info->gl_ops.gl.p_glDrawArrays(primitive_type, start_idx, count);
|
||||
checkGLcall("glDrawArrays");
|
||||
}
|
||||
}
|
||||
|
@ -107,7 +107,7 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi
|
|||
}
|
||||
|
||||
/* Start drawing in GL */
|
||||
glBegin(glPrimType);
|
||||
gl_info->gl_ops.gl.p_glBegin(glPrimType);
|
||||
|
||||
if (si->use_map & (1 << WINED3D_FFP_POSITION))
|
||||
{
|
||||
|
@ -122,7 +122,7 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi
|
|||
}
|
||||
else
|
||||
{
|
||||
glNormal3f(0, 0, 0);
|
||||
gl_info->gl_ops.gl.p_glNormal3f(0, 0, 0);
|
||||
}
|
||||
|
||||
num_untracked_materials = context->num_untracked_materials;
|
||||
|
@ -136,7 +136,7 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi
|
|||
}
|
||||
else
|
||||
{
|
||||
glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
gl_info->gl_ops.gl.p_glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
}
|
||||
|
||||
if (si->use_map & (1 << WINED3D_FFP_SPECULAR))
|
||||
|
@ -211,7 +211,7 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi
|
|||
if (gl_info->supported[ARB_MULTITEXTURE])
|
||||
GL_EXTCALL(glMultiTexCoord4fARB(GL_TEXTURE0_ARB + texture_idx, 0, 0, 0, 1));
|
||||
else
|
||||
glTexCoord4f(0, 0, 0, 1);
|
||||
gl_info->gl_ops.gl.p_glTexCoord4f(0, 0, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -271,7 +271,7 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi
|
|||
|
||||
for (i = 0; i < num_untracked_materials; ++i)
|
||||
{
|
||||
glMaterialfv(GL_FRONT_AND_BACK, context->untracked_materials[i], color);
|
||||
gl_info->gl_ops.gl.p_glMaterialfv(GL_FRONT_AND_BACK, context->untracked_materials[i], color);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ static void drawStridedSlow(const struct wined3d_device *device, const struct wi
|
|||
if (!idxData) ++SkipnStrides;
|
||||
}
|
||||
|
||||
glEnd();
|
||||
gl_info->gl_ops.gl.p_glEnd();
|
||||
checkGLcall("glEnd and previous calls");
|
||||
}
|
||||
|
||||
|
@ -449,7 +449,7 @@ static void drawStridedSlowVs(const struct wined3d_gl_info *gl_info, const struc
|
|||
}
|
||||
|
||||
/* Start drawing in GL */
|
||||
glBegin(glPrimitiveType);
|
||||
gl_info->gl_ops.gl.p_glBegin(glPrimitiveType);
|
||||
|
||||
for (vx_index = 0; vx_index < numberOfVertices; ++vx_index)
|
||||
{
|
||||
|
@ -473,7 +473,7 @@ static void drawStridedSlowVs(const struct wined3d_gl_info *gl_info, const struc
|
|||
SkipnStrides++;
|
||||
}
|
||||
|
||||
glEnd();
|
||||
gl_info->gl_ops.gl.p_glEnd();
|
||||
}
|
||||
|
||||
/* GL locking is done by the caller */
|
||||
|
@ -548,7 +548,7 @@ static void drawStridedInstanced(const struct wined3d_gl_info *gl_info, const st
|
|||
}
|
||||
else
|
||||
{
|
||||
glDrawElements(glPrimitiveType, numberOfVertices, idxtype,
|
||||
gl_info->gl_ops.gl.p_glDrawElements(glPrimitiveType, numberOfVertices, idxtype,
|
||||
(const char *)idxData + (idxSize * startIdx));
|
||||
checkGLcall("glDrawElements");
|
||||
}
|
||||
|
@ -580,6 +580,7 @@ static void remove_vbos(const struct wined3d_gl_info *gl_info,
|
|||
void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartIdx, BOOL indexed, const void *idxData)
|
||||
{
|
||||
const struct wined3d_state *state = &device->stateBlock->state;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
struct wined3d_context *context;
|
||||
unsigned int i;
|
||||
|
||||
|
@ -609,6 +610,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
WARN("Invalid context, skipping draw.\n");
|
||||
return;
|
||||
}
|
||||
gl_info = context->gl_info;
|
||||
|
||||
if (device->fb.depth_stencil)
|
||||
{
|
||||
|
@ -654,8 +656,8 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy);
|
||||
}
|
||||
|
||||
if ((!context->gl_info->supported[WINED3D_GL_VERSION_2_0]
|
||||
|| !context->gl_info->supported[NV_POINT_SPRITE])
|
||||
if ((!gl_info->supported[WINED3D_GL_VERSION_2_0]
|
||||
|| !gl_info->supported[NV_POINT_SPRITE])
|
||||
&& context->render_offscreen
|
||||
&& state->render_states[WINED3D_RS_POINTSPRITEENABLE]
|
||||
&& state->gl_primitive_type == GL_POINTS)
|
||||
|
@ -722,7 +724,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
if(emulation) {
|
||||
stream_info = &stridedlcl;
|
||||
memcpy(&stridedlcl, &device->strided_streams, sizeof(stridedlcl));
|
||||
remove_vbos(context->gl_info, state, &stridedlcl);
|
||||
remove_vbos(gl_info, state, &stridedlcl);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -738,7 +740,7 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
} else {
|
||||
TRACE("Using immediate mode with vertex shaders for half float emulation\n");
|
||||
}
|
||||
drawStridedSlowVs(context->gl_info, state, stream_info,
|
||||
drawStridedSlowVs(gl_info, state, stream_info,
|
||||
index_count, glPrimType, idxData, idx_size, StartIdx);
|
||||
}
|
||||
else
|
||||
|
@ -750,12 +752,12 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
else if (device->instancedDraw)
|
||||
{
|
||||
/* Instancing emulation with mixing immediate mode and arrays */
|
||||
drawStridedInstanced(context->gl_info, state, stream_info,
|
||||
drawStridedInstanced(gl_info, state, stream_info,
|
||||
index_count, glPrimType, idxData, idx_size, StartIdx, base_vertex_index);
|
||||
}
|
||||
else
|
||||
{
|
||||
drawStridedFast(context->gl_info, glPrimType, index_count, idx_size, idxData, StartIdx, base_vertex_index);
|
||||
drawStridedFast(gl_info, glPrimType, index_count, idx_size, idxData, StartIdx, base_vertex_index);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -767,7 +769,8 @@ void drawPrimitive(struct wined3d_device *device, UINT index_count, UINT StartId
|
|||
wined3d_event_query_issue(device->buffer_queries[i], device);
|
||||
}
|
||||
|
||||
if (wined3d_settings.strict_draw_ordering) glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
if (wined3d_settings.strict_draw_ordering)
|
||||
gl_info->gl_ops.gl.p_glFlush(); /* Flush to ensure ordering across contexts. */
|
||||
|
||||
context_release(context);
|
||||
|
||||
|
@ -816,6 +819,7 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct wined3d_rect_pat
|
|||
struct wined3d_state *state = &This->stateBlock->state;
|
||||
struct wined3d_stream_info stream_info;
|
||||
struct wined3d_stream_info_element *e;
|
||||
const struct wined3d_gl_info *gl_info;
|
||||
struct wined3d_context *context;
|
||||
struct wined3d_shader *vs;
|
||||
const BYTE *data;
|
||||
|
@ -827,6 +831,7 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct wined3d_rect_pat
|
|||
* takes care of dirtifying. Dirtifying is preferred over pushing / popping, since drawing the
|
||||
* patch (as opposed to normal draws) will most likely need different changes anyway. */
|
||||
context = context_acquire(This, NULL);
|
||||
gl_info = context->gl_info;
|
||||
context_apply_blit_state(context, This);
|
||||
|
||||
/* First, locate the position data. This is provided in a vertex buffer in
|
||||
|
@ -882,20 +887,20 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct wined3d_rect_pat
|
|||
|
||||
ENTER_GL();
|
||||
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
gl_info->gl_ops.gl.p_glMatrixMode(GL_PROJECTION);
|
||||
checkGLcall("glMatrixMode(GL_PROJECTION)");
|
||||
glLoadIdentity();
|
||||
gl_info->gl_ops.gl.p_glLoadIdentity();
|
||||
checkGLcall("glLoadIdentity()");
|
||||
glScalef(1.0f / (max_x), 1.0f / (max_y), max_z == 0.0f ? 1.0f : 1.0f / (2.0f * max_z));
|
||||
glTranslatef(0.0f, 0.0f, 0.5f);
|
||||
gl_info->gl_ops.gl.p_glScalef(1.0f / (max_x), 1.0f / (max_y), max_z == 0.0f ? 1.0f : 1.0f / (2.0f * max_z));
|
||||
gl_info->gl_ops.gl.p_glTranslatef(0.0f, 0.0f, 0.5f);
|
||||
checkGLcall("glScalef");
|
||||
glViewport(-max_x, -max_y, 2 * (max_x), 2 * (max_y));
|
||||
gl_info->gl_ops.gl.p_glViewport(-max_x, -max_y, 2 * (max_x), 2 * (max_y));
|
||||
checkGLcall("glViewport");
|
||||
|
||||
/* Some states to take care of. If we're in wireframe opengl will produce lines, and confuse
|
||||
* our feedback buffer parser
|
||||
*/
|
||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
gl_info->gl_ops.gl.p_glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
|
||||
checkGLcall("glPolygonMode(GL_FRONT_AND_BACK, GL_FILL)");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_FILLMODE));
|
||||
if (patch->has_normals)
|
||||
|
@ -905,47 +910,47 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct wined3d_rect_pat
|
|||
static const GLfloat green[] = {0.0f, 1.0f, 0.0f, 0.0f};
|
||||
static const GLfloat blue[] = {0.0f, 0.0f, 1.0f, 0.0f};
|
||||
static const GLfloat white[] = {1.0f, 1.0f, 1.0f, 1.0f};
|
||||
glEnable(GL_LIGHTING);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_LIGHTING);
|
||||
checkGLcall("glEnable(GL_LIGHTING)");
|
||||
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, black);
|
||||
gl_info->gl_ops.gl.p_glLightModelfv(GL_LIGHT_MODEL_AMBIENT, black);
|
||||
checkGLcall("glLightModel for MODEL_AMBIENT");
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_AMBIENT));
|
||||
|
||||
for (i = 3; i < context->gl_info->limits.lights; ++i)
|
||||
{
|
||||
glDisable(GL_LIGHT0 + i);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_LIGHT0 + i);
|
||||
checkGLcall("glDisable(GL_LIGHT0 + i)");
|
||||
context_invalidate_state(context, STATE_ACTIVELIGHT(i));
|
||||
}
|
||||
|
||||
context_invalidate_state(context, STATE_ACTIVELIGHT(0));
|
||||
glLightfv(GL_LIGHT0, GL_DIFFUSE, red);
|
||||
glLightfv(GL_LIGHT0, GL_SPECULAR, black);
|
||||
glLightfv(GL_LIGHT0, GL_AMBIENT, black);
|
||||
glLightfv(GL_LIGHT0, GL_POSITION, red);
|
||||
glEnable(GL_LIGHT0);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT0, GL_DIFFUSE, red);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT0, GL_SPECULAR, black);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT0, GL_AMBIENT, black);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT0, GL_POSITION, red);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_LIGHT0);
|
||||
checkGLcall("Setting up light 1");
|
||||
context_invalidate_state(context, STATE_ACTIVELIGHT(1));
|
||||
glLightfv(GL_LIGHT1, GL_DIFFUSE, green);
|
||||
glLightfv(GL_LIGHT1, GL_SPECULAR, black);
|
||||
glLightfv(GL_LIGHT1, GL_AMBIENT, black);
|
||||
glLightfv(GL_LIGHT1, GL_POSITION, green);
|
||||
glEnable(GL_LIGHT1);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT1, GL_DIFFUSE, green);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT1, GL_SPECULAR, black);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT1, GL_AMBIENT, black);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT1, GL_POSITION, green);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_LIGHT1);
|
||||
checkGLcall("Setting up light 2");
|
||||
context_invalidate_state(context, STATE_ACTIVELIGHT(2));
|
||||
glLightfv(GL_LIGHT2, GL_DIFFUSE, blue);
|
||||
glLightfv(GL_LIGHT2, GL_SPECULAR, black);
|
||||
glLightfv(GL_LIGHT2, GL_AMBIENT, black);
|
||||
glLightfv(GL_LIGHT2, GL_POSITION, blue);
|
||||
glEnable(GL_LIGHT2);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT2, GL_DIFFUSE, blue);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT2, GL_SPECULAR, black);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT2, GL_AMBIENT, black);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT2, GL_POSITION, blue);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_LIGHT2);
|
||||
checkGLcall("Setting up light 3");
|
||||
|
||||
context_invalidate_state(context, STATE_MATERIAL);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORVERTEX));
|
||||
glDisable(GL_COLOR_MATERIAL);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, black);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, black);
|
||||
glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, white);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_COLOR_MATERIAL);
|
||||
gl_info->gl_ops.gl.p_glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, black);
|
||||
gl_info->gl_ops.gl.p_glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, black);
|
||||
gl_info->gl_ops.gl.p_glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, white);
|
||||
checkGLcall("Setting up materials");
|
||||
}
|
||||
|
||||
|
@ -957,26 +962,33 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct wined3d_rect_pat
|
|||
num_quads = ceilf(patch->numSegs[0]) * ceilf(patch->numSegs[1]);
|
||||
out_vertex_size = 3 /* position */;
|
||||
d3d_out_vertex_size = 3;
|
||||
glEnable(GL_MAP2_VERTEX_3);
|
||||
if(patch->has_normals && patch->has_texcoords) {
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_MAP2_VERTEX_3);
|
||||
if (patch->has_normals && patch->has_texcoords)
|
||||
{
|
||||
FIXME("Texcoords not handled yet\n");
|
||||
feedback_type = GL_3D_COLOR_TEXTURE;
|
||||
out_vertex_size += 8;
|
||||
d3d_out_vertex_size += 7;
|
||||
glEnable(GL_AUTO_NORMAL);
|
||||
glEnable(GL_MAP2_TEXTURE_COORD_4);
|
||||
} else if(patch->has_texcoords) {
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_AUTO_NORMAL);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_MAP2_TEXTURE_COORD_4);
|
||||
}
|
||||
else if (patch->has_texcoords)
|
||||
{
|
||||
FIXME("Texcoords not handled yet\n");
|
||||
feedback_type = GL_3D_COLOR_TEXTURE;
|
||||
out_vertex_size += 7;
|
||||
d3d_out_vertex_size += 4;
|
||||
glEnable(GL_MAP2_TEXTURE_COORD_4);
|
||||
} else if(patch->has_normals) {
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_MAP2_TEXTURE_COORD_4);
|
||||
}
|
||||
else if (patch->has_normals)
|
||||
{
|
||||
feedback_type = GL_3D_COLOR;
|
||||
out_vertex_size += 4;
|
||||
d3d_out_vertex_size += 3;
|
||||
glEnable(GL_AUTO_NORMAL);
|
||||
} else {
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_AUTO_NORMAL);
|
||||
}
|
||||
else
|
||||
{
|
||||
feedback_type = GL_3D;
|
||||
}
|
||||
checkGLcall("glEnable vertex attrib generation");
|
||||
|
@ -985,31 +997,32 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct wined3d_rect_pat
|
|||
+ 4 * num_quads /* 2 triangle markers per quad + num verts in tri */;
|
||||
feedbuffer = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, buffer_size * sizeof(float) * 8);
|
||||
|
||||
glMap2f(GL_MAP2_VERTEX_3,
|
||||
gl_info->gl_ops.gl.p_glMap2f(GL_MAP2_VERTEX_3,
|
||||
0.0f, 1.0f, vtxStride / sizeof(float), info->width,
|
||||
0.0f, 1.0f, info->stride * vtxStride / sizeof(float), info->height,
|
||||
(const GLfloat *)data);
|
||||
checkGLcall("glMap2f");
|
||||
if (patch->has_texcoords)
|
||||
{
|
||||
glMap2f(GL_MAP2_TEXTURE_COORD_4,
|
||||
gl_info->gl_ops.gl.p_glMap2f(GL_MAP2_TEXTURE_COORD_4,
|
||||
0.0f, 1.0f, vtxStride / sizeof(float), info->width,
|
||||
0.0f, 1.0f, info->stride * vtxStride / sizeof(float), info->height,
|
||||
(const GLfloat *)data);
|
||||
checkGLcall("glMap2f");
|
||||
}
|
||||
glMapGrid2f(ceilf(patch->numSegs[0]), 0.0f, 1.0f, ceilf(patch->numSegs[1]), 0.0f, 1.0f);
|
||||
gl_info->gl_ops.gl.p_glMapGrid2f(ceilf(patch->numSegs[0]), 0.0f, 1.0f, ceilf(patch->numSegs[1]), 0.0f, 1.0f);
|
||||
checkGLcall("glMapGrid2f");
|
||||
|
||||
glFeedbackBuffer(buffer_size * 2, feedback_type, feedbuffer);
|
||||
gl_info->gl_ops.gl.p_glFeedbackBuffer(buffer_size * 2, feedback_type, feedbuffer);
|
||||
checkGLcall("glFeedbackBuffer");
|
||||
glRenderMode(GL_FEEDBACK);
|
||||
gl_info->gl_ops.gl.p_glRenderMode(GL_FEEDBACK);
|
||||
|
||||
glEvalMesh2(GL_FILL, 0, ceilf(patch->numSegs[0]), 0, ceilf(patch->numSegs[1]));
|
||||
gl_info->gl_ops.gl.p_glEvalMesh2(GL_FILL, 0, ceilf(patch->numSegs[0]), 0, ceilf(patch->numSegs[1]));
|
||||
checkGLcall("glEvalMesh2");
|
||||
|
||||
i = glRenderMode(GL_RENDER);
|
||||
if(i == -1) {
|
||||
i = gl_info->gl_ops.gl.p_glRenderMode(GL_RENDER);
|
||||
if (i == -1)
|
||||
{
|
||||
LEAVE_GL();
|
||||
ERR("Feedback failed. Expected %d elements back\n", buffer_size);
|
||||
HeapFree(GetProcessHeap(), 0, feedbuffer);
|
||||
|
@ -1076,16 +1089,16 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct wined3d_rect_pat
|
|||
static const GLfloat x[] = {-1.0f, 0.0f, 0.0f, 0.0f};
|
||||
static const GLfloat y[] = { 0.0f, -1.0f, 0.0f, 0.0f};
|
||||
static const GLfloat z[] = { 0.0f, 0.0f, -1.0f, 0.0f};
|
||||
glLightfv(GL_LIGHT0, GL_POSITION, x);
|
||||
glLightfv(GL_LIGHT1, GL_POSITION, y);
|
||||
glLightfv(GL_LIGHT2, GL_POSITION, z);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT0, GL_POSITION, x);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT1, GL_POSITION, y);
|
||||
gl_info->gl_ops.gl.p_glLightfv(GL_LIGHT2, GL_POSITION, z);
|
||||
checkGLcall("Setting up reverse light directions");
|
||||
|
||||
glRenderMode(GL_FEEDBACK);
|
||||
gl_info->gl_ops.gl.p_glRenderMode(GL_FEEDBACK);
|
||||
checkGLcall("glRenderMode(GL_FEEDBACK)");
|
||||
glEvalMesh2(GL_FILL, 0, ceilf(patch->numSegs[0]), 0, ceilf(patch->numSegs[1]));
|
||||
gl_info->gl_ops.gl.p_glEvalMesh2(GL_FILL, 0, ceilf(patch->numSegs[0]), 0, ceilf(patch->numSegs[1]));
|
||||
checkGLcall("glEvalMesh2");
|
||||
i = glRenderMode(GL_RENDER);
|
||||
i = gl_info->gl_ops.gl.p_glRenderMode(GL_RENDER);
|
||||
checkGLcall("glRenderMode(GL_RENDER)");
|
||||
|
||||
i = 0;
|
||||
|
@ -1127,10 +1140,10 @@ HRESULT tesselate_rectpatch(struct wined3d_device *This, struct wined3d_rect_pat
|
|||
}
|
||||
}
|
||||
|
||||
glDisable(GL_MAP2_VERTEX_3);
|
||||
glDisable(GL_AUTO_NORMAL);
|
||||
glDisable(GL_MAP2_NORMAL);
|
||||
glDisable(GL_MAP2_TEXTURE_COORD_4);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_MAP2_VERTEX_3);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_AUTO_NORMAL);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_MAP2_NORMAL);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_MAP2_TEXTURE_COORD_4);
|
||||
checkGLcall("glDisable vertex attrib generation");
|
||||
LEAVE_GL();
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ static void WINE_GLAPI wine_glMultiTexCoord1fARB(GLenum target, GLfloat s) {
|
|||
ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
|
||||
return;
|
||||
}
|
||||
glTexCoord1f(s);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glTexCoord1f(s);
|
||||
}
|
||||
|
||||
static void WINE_GLAPI wine_glMultiTexCoord1fvARB(GLenum target, const GLfloat *v) {
|
||||
|
@ -44,7 +44,7 @@ static void WINE_GLAPI wine_glMultiTexCoord1fvARB(GLenum target, const GLfloat *
|
|||
ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
|
||||
return;
|
||||
}
|
||||
glTexCoord1fv(v);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glTexCoord1fv(v);
|
||||
}
|
||||
|
||||
static void WINE_GLAPI wine_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLfloat t) {
|
||||
|
@ -52,7 +52,7 @@ static void WINE_GLAPI wine_glMultiTexCoord2fARB(GLenum target, GLfloat s, GLflo
|
|||
ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
|
||||
return;
|
||||
}
|
||||
glTexCoord2f(s, t);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glTexCoord2f(s, t);
|
||||
}
|
||||
|
||||
static void WINE_GLAPI wine_glMultiTexCoord2fvARB(GLenum target, const GLfloat *v) {
|
||||
|
@ -60,7 +60,7 @@ static void WINE_GLAPI wine_glMultiTexCoord2fvARB(GLenum target, const GLfloat *
|
|||
ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
|
||||
return;
|
||||
}
|
||||
glTexCoord2fv(v);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glTexCoord2fv(v);
|
||||
}
|
||||
|
||||
static void WINE_GLAPI wine_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r) {
|
||||
|
@ -68,7 +68,7 @@ static void WINE_GLAPI wine_glMultiTexCoord3fARB(GLenum target, GLfloat s, GLflo
|
|||
ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
|
||||
return;
|
||||
}
|
||||
glTexCoord3f(s, t, r);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glTexCoord3f(s, t, r);
|
||||
}
|
||||
|
||||
static void WINE_GLAPI wine_glMultiTexCoord3fvARB(GLenum target, const GLfloat *v) {
|
||||
|
@ -76,7 +76,7 @@ static void WINE_GLAPI wine_glMultiTexCoord3fvARB(GLenum target, const GLfloat *
|
|||
ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
|
||||
return;
|
||||
}
|
||||
glTexCoord3fv(v);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glTexCoord3fv(v);
|
||||
}
|
||||
|
||||
static void WINE_GLAPI wine_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) {
|
||||
|
@ -84,7 +84,7 @@ static void WINE_GLAPI wine_glMultiTexCoord4fARB(GLenum target, GLfloat s, GLflo
|
|||
ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
|
||||
return;
|
||||
}
|
||||
glTexCoord4f(s, t, r, q);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glTexCoord4f(s, t, r, q);
|
||||
}
|
||||
|
||||
static void WINE_GLAPI wine_glMultiTexCoord4fvARB(GLenum target, const GLfloat *v) {
|
||||
|
@ -92,7 +92,7 @@ static void WINE_GLAPI wine_glMultiTexCoord4fvARB(GLenum target, const GLfloat *
|
|||
ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
|
||||
return;
|
||||
}
|
||||
glTexCoord4fv(v);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glTexCoord4fv(v);
|
||||
}
|
||||
|
||||
static void WINE_GLAPI wine_glMultiTexCoord2svARB(GLenum target, const GLshort *v) {
|
||||
|
@ -100,7 +100,7 @@ static void WINE_GLAPI wine_glMultiTexCoord2svARB(GLenum target, const GLshort *
|
|||
ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
|
||||
return;
|
||||
}
|
||||
glTexCoord2sv(v);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glTexCoord2sv(v);
|
||||
}
|
||||
|
||||
static void WINE_GLAPI wine_glMultiTexCoord4svARB(GLenum target, const GLshort *v) {
|
||||
|
@ -108,7 +108,7 @@ static void WINE_GLAPI wine_glMultiTexCoord4svARB(GLenum target, const GLshort *
|
|||
ERR("Texture unit > 0 used, but GL_ARB_multitexture is not supported\n");
|
||||
return;
|
||||
}
|
||||
glTexCoord4sv(v);
|
||||
context_get_current()->gl_info->gl_ops.gl.p_glTexCoord4sv(v);
|
||||
}
|
||||
|
||||
static void WINE_GLAPI wine_glActiveTextureARB(GLenum texture) {
|
||||
|
@ -365,20 +365,20 @@ void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info)
|
|||
if(old_multitex_glGetIntegerv) {
|
||||
FIXME("GL_ARB_multitexture glGetIntegerv hook already applied\n");
|
||||
} else {
|
||||
old_multitex_glGetIntegerv = glGetIntegerv;
|
||||
glGetIntegerv = wine_glGetIntegerv;
|
||||
old_multitex_glGetIntegerv = gl_info->gl_ops.gl.p_glGetIntegerv;
|
||||
gl_info->gl_ops.gl.p_glGetIntegerv = wine_glGetIntegerv;
|
||||
}
|
||||
if(old_multitex_glGetFloatv) {
|
||||
FIXME("GL_ARB_multitexture glGetGloatv hook already applied\n");
|
||||
} else {
|
||||
old_multitex_glGetFloatv = glGetFloatv;
|
||||
glGetFloatv = wine_glGetFloatv;
|
||||
old_multitex_glGetFloatv = gl_info->gl_ops.gl.p_glGetFloatv;
|
||||
gl_info->gl_ops.gl.p_glGetFloatv = wine_glGetFloatv;
|
||||
}
|
||||
if(old_multitex_glGetDoublev) {
|
||||
FIXME("GL_ARB_multitexture glGetDoublev hook already applied\n");
|
||||
} else {
|
||||
old_multitex_glGetDoublev = glGetDoublev;
|
||||
glGetDoublev = wine_glGetDoublev;
|
||||
old_multitex_glGetDoublev = gl_info->gl_ops.gl.p_glGetDoublev;
|
||||
gl_info->gl_ops.gl.p_glGetDoublev = wine_glGetDoublev;
|
||||
}
|
||||
gl_info->supported[ARB_MULTITEXTURE] = TRUE;
|
||||
}
|
||||
|
@ -423,26 +423,26 @@ void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info)
|
|||
if(old_fogcoord_glFogi) {
|
||||
FIXME("GL_EXT_fogcoord glFogi hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glFogi = glFogi;
|
||||
glFogi = wine_glFogi;
|
||||
old_fogcoord_glFogi = gl_info->gl_ops.gl.p_glFogi;
|
||||
gl_info->gl_ops.gl.p_glFogi = wine_glFogi;
|
||||
}
|
||||
if(old_fogcoord_glFogiv) {
|
||||
FIXME("GL_EXT_fogcoord glFogiv hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glFogiv = glFogiv;
|
||||
glFogiv = wine_glFogiv;
|
||||
old_fogcoord_glFogiv = gl_info->gl_ops.gl.p_glFogiv;
|
||||
gl_info->gl_ops.gl.p_glFogiv = wine_glFogiv;
|
||||
}
|
||||
if(old_fogcoord_glFogf) {
|
||||
FIXME("GL_EXT_fogcoord glFogf hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glFogf = glFogf;
|
||||
glFogf = wine_glFogf;
|
||||
old_fogcoord_glFogf = gl_info->gl_ops.gl.p_glFogf;
|
||||
gl_info->gl_ops.gl.p_glFogf = wine_glFogf;
|
||||
}
|
||||
if(old_fogcoord_glFogfv) {
|
||||
FIXME("GL_EXT_fogcoord glFogfv hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glFogfv = glFogfv;
|
||||
glFogfv = wine_glFogfv;
|
||||
old_fogcoord_glFogfv = gl_info->gl_ops.gl.p_glFogfv;
|
||||
gl_info->gl_ops.gl.p_glFogfv = wine_glFogfv;
|
||||
}
|
||||
if(old_fogcoord_glEnable) {
|
||||
FIXME("GL_EXT_fogcoord glEnable hook already applied\n");
|
||||
|
@ -460,57 +460,57 @@ void add_gl_compat_wrappers(struct wined3d_gl_info *gl_info)
|
|||
if(old_fogcoord_glVertex4f) {
|
||||
FIXME("GL_EXT_fogcoord glVertex4f hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glVertex4f = glVertex4f;
|
||||
glVertex4f = wine_glVertex4f;
|
||||
old_fogcoord_glVertex4f = gl_info->gl_ops.gl.p_glVertex4f;
|
||||
gl_info->gl_ops.gl.p_glVertex4f = wine_glVertex4f;
|
||||
}
|
||||
if(old_fogcoord_glVertex4fv) {
|
||||
FIXME("GL_EXT_fogcoord glVertex4fv hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glVertex4fv = glVertex4fv;
|
||||
glVertex4fv = wine_glVertex4fv;
|
||||
old_fogcoord_glVertex4fv = gl_info->gl_ops.gl.p_glVertex4fv;
|
||||
gl_info->gl_ops.gl.p_glVertex4fv = wine_glVertex4fv;
|
||||
}
|
||||
if(old_fogcoord_glVertex3f) {
|
||||
FIXME("GL_EXT_fogcoord glVertex3f hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glVertex3f = glVertex3f;
|
||||
glVertex3f = wine_glVertex3f;
|
||||
old_fogcoord_glVertex3f = gl_info->gl_ops.gl.p_glVertex3f;
|
||||
gl_info->gl_ops.gl.p_glVertex3f = wine_glVertex3f;
|
||||
}
|
||||
if(old_fogcoord_glVertex3fv) {
|
||||
FIXME("GL_EXT_fogcoord glVertex3fv hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glVertex3fv = glVertex3fv;
|
||||
glVertex3fv = wine_glVertex3fv;
|
||||
old_fogcoord_glVertex3fv = gl_info->gl_ops.gl.p_glVertex3fv;
|
||||
gl_info->gl_ops.gl.p_glVertex3fv = wine_glVertex3fv;
|
||||
}
|
||||
|
||||
if(old_fogcoord_glColor4f) {
|
||||
FIXME("GL_EXT_fogcoord glColor4f hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glColor4f = glColor4f;
|
||||
glColor4f = wine_glColor4f;
|
||||
old_fogcoord_glColor4f = gl_info->gl_ops.gl.p_glColor4f;
|
||||
gl_info->gl_ops.gl.p_glColor4f = wine_glColor4f;
|
||||
}
|
||||
if(old_fogcoord_glColor4fv) {
|
||||
FIXME("GL_EXT_fogcoord glColor4fv hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glColor4fv = glColor4fv;
|
||||
glColor4fv = wine_glColor4fv;
|
||||
old_fogcoord_glColor4fv = gl_info->gl_ops.gl.p_glColor4fv;
|
||||
gl_info->gl_ops.gl.p_glColor4fv = wine_glColor4fv;
|
||||
}
|
||||
if(old_fogcoord_glColor3f) {
|
||||
FIXME("GL_EXT_fogcoord glColor3f hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glColor3f = glColor3f;
|
||||
glColor3f = wine_glColor3f;
|
||||
old_fogcoord_glColor3f = gl_info->gl_ops.gl.p_glColor3f;
|
||||
gl_info->gl_ops.gl.p_glColor3f = wine_glColor3f;
|
||||
}
|
||||
if(old_fogcoord_glColor3fv) {
|
||||
FIXME("GL_EXT_fogcoord glColor3fv hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glColor3fv = glColor3fv;
|
||||
glColor3fv = wine_glColor3fv;
|
||||
old_fogcoord_glColor3fv = gl_info->gl_ops.gl.p_glColor3fv;
|
||||
gl_info->gl_ops.gl.p_glColor3fv = wine_glColor3fv;
|
||||
}
|
||||
if(old_fogcoord_glColor4ub) {
|
||||
FIXME("GL_EXT_fogcoord glColor4ub hook already applied\n");
|
||||
} else {
|
||||
old_fogcoord_glColor4ub = glColor4ub;
|
||||
glColor4ub = wine_glColor4ub;
|
||||
old_fogcoord_glColor4ub = gl_info->gl_ops.gl.p_glColor4ub;
|
||||
gl_info->gl_ops.gl.p_glColor4ub = wine_glColor4ub;
|
||||
}
|
||||
|
||||
if(old_fogcoord_glFogCoordfEXT) {
|
||||
|
|
|
@ -33,6 +33,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
|
|||
|
||||
static void nvts_activate_dimensions(const struct wined3d_state *state, DWORD stage, struct wined3d_context *context)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
BOOL bumpmap = FALSE;
|
||||
|
||||
if (stage > 0
|
||||
|
@ -50,24 +51,28 @@ static void nvts_activate_dimensions(const struct wined3d_state *state, DWORD st
|
|||
switch (state->textures[stage]->target)
|
||||
{
|
||||
case GL_TEXTURE_2D:
|
||||
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, bumpmap ? GL_OFFSET_TEXTURE_2D_NV : GL_TEXTURE_2D);
|
||||
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV,
|
||||
bumpmap ? GL_OFFSET_TEXTURE_2D_NV : GL_TEXTURE_2D);
|
||||
checkGLcall("glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, ...)");
|
||||
break;
|
||||
case GL_TEXTURE_RECTANGLE_ARB:
|
||||
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, bumpmap ? GL_OFFSET_TEXTURE_2D_NV : GL_TEXTURE_RECTANGLE_ARB);
|
||||
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV,
|
||||
bumpmap ? GL_OFFSET_TEXTURE_2D_NV : GL_TEXTURE_RECTANGLE_ARB);
|
||||
checkGLcall("glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, ...)");
|
||||
break;
|
||||
case GL_TEXTURE_3D:
|
||||
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_3D);
|
||||
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_3D);
|
||||
checkGLcall("glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_3D)");
|
||||
break;
|
||||
case GL_TEXTURE_CUBE_MAP_ARB:
|
||||
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_CUBE_MAP_ARB);
|
||||
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_CUBE_MAP_ARB);
|
||||
checkGLcall("glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_TEXTURE_CUBE_MAP_ARB)");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
|
||||
checkGLcall("glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE)");
|
||||
}
|
||||
}
|
||||
|
@ -494,12 +499,12 @@ static void nvrc_colorop(struct wined3d_context *context, const struct wined3d_s
|
|||
|
||||
if (state->lowest_disabled_stage > 0)
|
||||
{
|
||||
glEnable(GL_REGISTER_COMBINERS_NV);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_REGISTER_COMBINERS_NV);
|
||||
GL_EXTCALL(glCombinerParameteriNV(GL_NUM_GENERAL_COMBINERS_NV, state->lowest_disabled_stage));
|
||||
}
|
||||
else
|
||||
{
|
||||
glDisable(GL_REGISTER_COMBINERS_NV);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_REGISTER_COMBINERS_NV);
|
||||
}
|
||||
if (stage >= state->lowest_disabled_stage)
|
||||
{
|
||||
|
@ -507,23 +512,23 @@ static void nvrc_colorop(struct wined3d_context *context, const struct wined3d_s
|
|||
if (mapped_stage != WINED3D_UNMAPPED_STAGE)
|
||||
{
|
||||
/* Disable everything here */
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_2D);
|
||||
checkGLcall("glDisable(GL_TEXTURE_2D)");
|
||||
glDisable(GL_TEXTURE_3D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_3D);
|
||||
checkGLcall("glDisable(GL_TEXTURE_3D)");
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
{
|
||||
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
|
||||
}
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
{
|
||||
glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_RECTANGLE_ARB)");
|
||||
}
|
||||
if (gl_info->supported[NV_TEXTURE_SHADER2] && mapped_stage < gl_info->limits.textures)
|
||||
{
|
||||
glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
|
||||
gl_info->gl_ops.gl.p_glTexEnvi(GL_TEXTURE_SHADER_NV, GL_SHADER_OPERATION_NV, GL_NONE);
|
||||
}
|
||||
}
|
||||
/* All done */
|
||||
|
@ -615,7 +620,7 @@ static void nvts_bumpenvmat(struct wined3d_context *context, const struct wined3
|
|||
mat[1][0] = *((float *)&state->texture_states[stage][WINED3D_TSS_BUMPENV_MAT01]);
|
||||
mat[0][1] = *((float *)&state->texture_states[stage][WINED3D_TSS_BUMPENV_MAT10]);
|
||||
mat[1][1] = *((float *)&state->texture_states[stage][WINED3D_TSS_BUMPENV_MAT11]);
|
||||
glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_MATRIX_NV, (float *)mat);
|
||||
gl_info->gl_ops.gl.p_glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_MATRIX_NV, (float *)mat);
|
||||
checkGLcall("glTexEnvfv(GL_TEXTURE_SHADER_NV, GL_OFFSET_TEXTURE_MATRIX_NV, mat)");
|
||||
}
|
||||
}
|
||||
|
@ -634,12 +639,12 @@ static void nvrc_enable(const struct wined3d_gl_info *gl_info, BOOL enable)
|
|||
{
|
||||
if (enable)
|
||||
{
|
||||
glEnable(GL_REGISTER_COMBINERS_NV);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_REGISTER_COMBINERS_NV);
|
||||
checkGLcall("glEnable(GL_REGISTER_COMBINERS_NV)");
|
||||
}
|
||||
else
|
||||
{
|
||||
glDisable(GL_REGISTER_COMBINERS_NV);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_REGISTER_COMBINERS_NV);
|
||||
checkGLcall("glDisable(GL_REGISTER_COMBINERS_NV)");
|
||||
}
|
||||
}
|
||||
|
@ -650,12 +655,12 @@ static void nvts_enable(const struct wined3d_gl_info *gl_info, BOOL enable)
|
|||
nvrc_enable(gl_info, enable);
|
||||
if (enable)
|
||||
{
|
||||
glEnable(GL_TEXTURE_SHADER_NV);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_TEXTURE_SHADER_NV);
|
||||
checkGLcall("glEnable(GL_TEXTURE_SHADER_NV)");
|
||||
}
|
||||
else
|
||||
{
|
||||
glDisable(GL_TEXTURE_SHADER_NV);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_SHADER_NV);
|
||||
checkGLcall("glDisable(GL_TEXTURE_SHADER_NV)");
|
||||
}
|
||||
}
|
||||
|
|
1392
dlls/wined3d/state.c
1392
dlls/wined3d/state.c
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -325,20 +325,20 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
|
|||
|
||||
ENTER_GL();
|
||||
context_apply_fbo_state_blit(context, GL_READ_FRAMEBUFFER, backbuffer, NULL, location);
|
||||
glReadBuffer(GL_COLOR_ATTACHMENT0);
|
||||
gl_info->gl_ops.gl.p_glReadBuffer(GL_COLOR_ATTACHMENT0);
|
||||
context_check_fbo_status(context, GL_READ_FRAMEBUFFER);
|
||||
|
||||
context_apply_fbo_state_blit(context, GL_DRAW_FRAMEBUFFER, swapchain->front_buffer, NULL, SFLAG_INDRAWABLE);
|
||||
context_set_draw_buffer(context, GL_BACK);
|
||||
context_invalidate_state(context, STATE_FRAMEBUFFER);
|
||||
|
||||
glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
gl_info->gl_ops.gl.p_glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE1));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE2));
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_COLORWRITEENABLE3));
|
||||
|
||||
glDisable(GL_SCISSOR_TEST);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_SCISSOR_TEST);
|
||||
context_invalidate_state(context, STATE_RENDER(WINED3D_RS_SCISSORTESTENABLE));
|
||||
|
||||
/* Note that the texture is upside down */
|
||||
|
@ -377,8 +377,8 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
|
|||
/* Set up the texture. The surface is not in a wined3d_texture
|
||||
* container, so there are no D3D texture settings to dirtify. */
|
||||
device->blitter->set_shader(device->blit_priv, context2, backbuffer);
|
||||
glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MIN_FILTER, gl_filter);
|
||||
glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MAG_FILTER, gl_filter);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MIN_FILTER, gl_filter);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(backbuffer->texture_target, GL_TEXTURE_MAG_FILTER, gl_filter);
|
||||
|
||||
context_set_draw_buffer(context, GL_BACK);
|
||||
|
||||
|
@ -390,32 +390,33 @@ static void swapchain_blit(const struct wined3d_swapchain *swapchain,
|
|||
*
|
||||
* Note that context_apply_blit_state() set up viewport and ortho to
|
||||
* match the surface size - we want the GL drawable(=window) size. */
|
||||
glPushAttrib(GL_VIEWPORT_BIT);
|
||||
glViewport(dst_rect->left, win_h - dst_rect->bottom, dst_rect->right, win_h - dst_rect->top);
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glPushMatrix();
|
||||
glLoadIdentity();
|
||||
gl_info->gl_ops.gl.p_glPushAttrib(GL_VIEWPORT_BIT);
|
||||
gl_info->gl_ops.gl.p_glViewport(dst_rect->left, win_h - dst_rect->bottom,
|
||||
dst_rect->right, win_h - dst_rect->top);
|
||||
gl_info->gl_ops.gl.p_glMatrixMode(GL_PROJECTION);
|
||||
gl_info->gl_ops.gl.p_glPushMatrix();
|
||||
gl_info->gl_ops.gl.p_glLoadIdentity();
|
||||
|
||||
glBegin(GL_QUADS);
|
||||
gl_info->gl_ops.gl.p_glBegin(GL_QUADS);
|
||||
/* bottom left */
|
||||
glTexCoord2f(tex_left, tex_bottom);
|
||||
glVertex2i(-1, -1);
|
||||
gl_info->gl_ops.gl.p_glTexCoord2f(tex_left, tex_bottom);
|
||||
gl_info->gl_ops.gl.p_glVertex2i(-1, -1);
|
||||
|
||||
/* top left */
|
||||
glTexCoord2f(tex_left, tex_top);
|
||||
glVertex2i(-1, 1);
|
||||
gl_info->gl_ops.gl.p_glTexCoord2f(tex_left, tex_top);
|
||||
gl_info->gl_ops.gl.p_glVertex2i(-1, 1);
|
||||
|
||||
/* top right */
|
||||
glTexCoord2f(tex_right, tex_top);
|
||||
glVertex2i(1, 1);
|
||||
gl_info->gl_ops.gl.p_glTexCoord2f(tex_right, tex_top);
|
||||
gl_info->gl_ops.gl.p_glVertex2i(1, 1);
|
||||
|
||||
/* bottom right */
|
||||
glTexCoord2f(tex_right, tex_bottom);
|
||||
glVertex2i(1, -1);
|
||||
glEnd();
|
||||
gl_info->gl_ops.gl.p_glTexCoord2f(tex_right, tex_bottom);
|
||||
gl_info->gl_ops.gl.p_glVertex2i(1, -1);
|
||||
gl_info->gl_ops.gl.p_glEnd();
|
||||
|
||||
glPopMatrix();
|
||||
glPopAttrib();
|
||||
gl_info->gl_ops.gl.p_glPopMatrix();
|
||||
gl_info->gl_ops.gl.p_glPopAttrib();
|
||||
|
||||
device->blitter->unset_shader(context->gl_info);
|
||||
checkGLcall("Swapchain present blit(manual)\n");
|
||||
|
@ -564,7 +565,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT
|
|||
}
|
||||
|
||||
if (swapchain->num_contexts > 1)
|
||||
glFinish();
|
||||
gl_info->gl_ops.gl.p_glFinish();
|
||||
SwapBuffers(context->hdc); /* TODO: cycle through the swapchain buffers */
|
||||
|
||||
TRACE("SwapBuffers called, Starting new frame\n");
|
||||
|
|
|
@ -75,10 +75,10 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc
|
|||
}
|
||||
|
||||
/* A GL context is provided by the caller */
|
||||
static void gltexture_delete(struct gl_texture *tex)
|
||||
static void gltexture_delete(const struct wined3d_gl_info *gl_info, struct gl_texture *tex)
|
||||
{
|
||||
ENTER_GL();
|
||||
glDeleteTextures(1, &tex->name);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &tex->name);
|
||||
LEAVE_GL();
|
||||
tex->name = 0;
|
||||
}
|
||||
|
@ -94,10 +94,10 @@ static void wined3d_texture_unload(struct wined3d_texture *texture)
|
|||
}
|
||||
|
||||
if (texture->texture_rgb.name)
|
||||
gltexture_delete(&texture->texture_rgb);
|
||||
gltexture_delete(context->gl_info, &texture->texture_rgb);
|
||||
|
||||
if (texture->texture_srgb.name)
|
||||
gltexture_delete(&texture->texture_srgb);
|
||||
gltexture_delete(context->gl_info, &texture->texture_srgb);
|
||||
|
||||
if (context) context_release(context);
|
||||
|
||||
|
@ -136,6 +136,7 @@ void wined3d_texture_set_dirty(struct wined3d_texture *texture, BOOL dirty)
|
|||
static HRESULT wined3d_texture_bind(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb, BOOL *set_surface_desc)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
struct gl_texture *gl_tex;
|
||||
BOOL new_texture = FALSE;
|
||||
HRESULT hr = WINED3D_OK;
|
||||
|
@ -157,14 +158,14 @@ static HRESULT wined3d_texture_bind(struct wined3d_texture *texture,
|
|||
if (!gl_tex->name)
|
||||
{
|
||||
*set_surface_desc = TRUE;
|
||||
glGenTextures(1, &gl_tex->name);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &gl_tex->name);
|
||||
checkGLcall("glGenTextures");
|
||||
TRACE("Generated texture %d.\n", gl_tex->name);
|
||||
if (texture->resource.pool == WINED3D_POOL_DEFAULT)
|
||||
{
|
||||
/* Tell OpenGL to try and keep this texture in video ram (well mostly). */
|
||||
GLclampf tmp = 0.9f;
|
||||
glPrioritizeTextures(1, &gl_tex->name, &tmp);
|
||||
gl_info->gl_ops.gl.p_glPrioritizeTextures(1, &gl_tex->name, &tmp);
|
||||
}
|
||||
/* Initialise the state of the texture object to the OpenGL defaults,
|
||||
* not the D3D defaults. */
|
||||
|
@ -191,7 +192,7 @@ static HRESULT wined3d_texture_bind(struct wined3d_texture *texture,
|
|||
* the code simpler all in all, and the run-time path free from
|
||||
* additional checks. */
|
||||
context_bind_texture(context, target, gl_tex->name);
|
||||
glTexParameteri(target, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_GENERATE_MIPMAP_SGIS, GL_TRUE);
|
||||
checkGLcall("glTexParameteri(target, GL_GENERATE_MIPMAP_SGIS, GL_TRUE)");
|
||||
}
|
||||
}
|
||||
|
@ -214,15 +215,15 @@ static HRESULT wined3d_texture_bind(struct wined3d_texture *texture,
|
|||
if (target != GL_TEXTURE_RECTANGLE_ARB)
|
||||
{
|
||||
TRACE("Setting GL_TEXTURE_MAX_LEVEL to %u.\n", texture->level_count - 1);
|
||||
glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, texture->level_count - 1);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, texture->level_count - 1);
|
||||
checkGLcall("glTexParameteri(target, GL_TEXTURE_MAX_LEVEL, texture->level_count)");
|
||||
}
|
||||
if (target == GL_TEXTURE_CUBE_MAP_ARB)
|
||||
{
|
||||
/* Cubemaps are always set to clamp, regardless of the sampler state. */
|
||||
glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -256,7 +257,7 @@ static void apply_wrap(const struct wined3d_gl_info *gl_info, GLenum target,
|
|||
gl_wrap = gl_info->wrap_lookup[d3d_wrap - WINED3D_TADDRESS_WRAP];
|
||||
|
||||
TRACE("Setting param %#x to %#x for target %#x.\n", param, gl_wrap, target);
|
||||
glTexParameteri(target, param, gl_wrap);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, param, gl_wrap);
|
||||
checkGLcall("glTexParameteri(target, param, gl_wrap)");
|
||||
}
|
||||
|
||||
|
@ -306,7 +307,7 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
|
|||
state = sampler_states[WINED3D_SAMP_BORDER_COLOR];
|
||||
D3DCOLORTOGLFLOAT4(state, col);
|
||||
TRACE("Setting border color for %#x to %#x.\n", target, state);
|
||||
glTexParameterfv(target, GL_TEXTURE_BORDER_COLOR, &col[0]);
|
||||
gl_info->gl_ops.gl.p_glTexParameterfv(target, GL_TEXTURE_BORDER_COLOR, &col[0]);
|
||||
checkGLcall("glTexParameterfv(..., GL_TEXTURE_BORDER_COLOR, ...)");
|
||||
gl_tex->states[WINED3DTEXSTA_BORDERCOLOR] = state;
|
||||
}
|
||||
|
@ -322,7 +323,7 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
|
|||
gl_value = wined3d_gl_mag_filter(texture->mag_lookup,
|
||||
min(max(state, WINED3D_TEXF_POINT), WINED3D_TEXF_LINEAR));
|
||||
TRACE("ValueMAG=%#x setting MAGFILTER to %#x.\n", state, gl_value);
|
||||
glTexParameteri(target, GL_TEXTURE_MAG_FILTER, gl_value);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_MAG_FILTER, gl_value);
|
||||
|
||||
gl_tex->states[WINED3DTEXSTA_MAGFILTER] = state;
|
||||
}
|
||||
|
@ -351,7 +352,7 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
|
|||
TRACE("ValueMIN=%#x, ValueMIP=%#x, setting MINFILTER to %#x.\n",
|
||||
sampler_states[WINED3D_SAMP_MIN_FILTER],
|
||||
sampler_states[WINED3D_SAMP_MIP_FILTER], gl_value);
|
||||
glTexParameteri(target, GL_TEXTURE_MIN_FILTER, gl_value);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_MIN_FILTER, gl_value);
|
||||
checkGLcall("glTexParameter GL_TEXTURE_MIN_FILTER, ...");
|
||||
|
||||
if (!cond_np2)
|
||||
|
@ -370,7 +371,7 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
|
|||
* (default 0), while GL_TEXTURE_MAX_LEVEL specifies the smallest
|
||||
* mimap used (default 1000). So WINED3D_SAMP_MAX_MIP_LEVEL
|
||||
* corresponds to GL_TEXTURE_BASE_LEVEL. */
|
||||
glTexParameteri(target, GL_TEXTURE_BASE_LEVEL, gl_value);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_BASE_LEVEL, gl_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -386,7 +387,7 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
|
|||
{
|
||||
if (gl_info->supported[EXT_TEXTURE_FILTER_ANISOTROPIC])
|
||||
{
|
||||
glTexParameteri(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso);
|
||||
checkGLcall("glTexParameteri(GL_TEXTURE_MAX_ANISOTROPY_EXT, aniso)");
|
||||
}
|
||||
else
|
||||
|
@ -399,7 +400,7 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
|
|||
/* These should always be the same unless EXT_texture_sRGB_decode is supported. */
|
||||
if (sampler_states[WINED3D_SAMP_SRGB_TEXTURE] != gl_tex->states[WINED3DTEXSTA_SRGBTEXTURE])
|
||||
{
|
||||
glTexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT,
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_SRGB_DECODE_EXT,
|
||||
sampler_states[WINED3D_SAMP_SRGB_TEXTURE] ? GL_DECODE_EXT : GL_SKIP_DECODE_EXT);
|
||||
checkGLcall("glTexParameteri(GL_TEXTURE_SRGB_DECODE_EXT)");
|
||||
gl_tex->states[WINED3DTEXSTA_SRGBTEXTURE] = sampler_states[WINED3D_SAMP_SRGB_TEXTURE];
|
||||
|
@ -410,14 +411,14 @@ void wined3d_texture_apply_state_changes(struct wined3d_texture *texture,
|
|||
{
|
||||
if (texture->resource.format->flags & WINED3DFMT_FLAG_SHADOW)
|
||||
{
|
||||
glTexParameteri(target, GL_DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE);
|
||||
glTexParameteri(target, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_DEPTH_TEXTURE_MODE_ARB, GL_LUMINANCE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
|
||||
checkGLcall("glTexParameteri(target, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB)");
|
||||
gl_tex->states[WINED3DTEXSTA_SHADOW] = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
glTexParameteri(target, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE);
|
||||
checkGLcall("glTexParameteri(target, GL_TEXTURE_COMPARE_MODE_ARB, GL_NONE)");
|
||||
gl_tex->states[WINED3DTEXSTA_SHADOW] = FALSE;
|
||||
}
|
||||
|
@ -592,6 +593,7 @@ HRESULT CDECL wined3d_texture_add_dirty_region(struct wined3d_texture *texture,
|
|||
static HRESULT texture2d_bind(struct wined3d_texture *texture,
|
||||
struct wined3d_context *context, BOOL srgb)
|
||||
{
|
||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
||||
BOOL set_gl_texture_desc;
|
||||
HRESULT hr;
|
||||
|
||||
|
@ -627,13 +629,13 @@ static HRESULT texture2d_bind(struct wined3d_texture *texture,
|
|||
GLenum target = texture->target;
|
||||
|
||||
ENTER_GL();
|
||||
glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
checkGLcall("glTexParameteri(target, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)");
|
||||
glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
checkGLcall("glTexParameteri(target, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)");
|
||||
glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
checkGLcall("glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_NEAREST)");
|
||||
glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
checkGLcall("glTexParameteri(target, GL_TEXTURE_MAG_FILTER, GL_NEAREST)");
|
||||
LEAVE_GL();
|
||||
gl_tex->states[WINED3DTEXSTA_ADDRESSU] = WINED3D_TADDRESS_CLAMP;
|
||||
|
|
|
@ -997,15 +997,16 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
|
|||
|
||||
ENTER_GL();
|
||||
|
||||
while(glGetError());
|
||||
glDisable(GL_BLEND);
|
||||
while (gl_info->gl_ops.gl.p_glGetError());
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_BLEND);
|
||||
|
||||
glGenTextures(1, &tex);
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &tex);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, tex);
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, format->glInternal, 16, 16, 0, format->glFormat, format->glType, NULL);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, format->glInternal, 16, 16, 0,
|
||||
format->glFormat, format->glType, NULL);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
gl_info->fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0);
|
||||
|
||||
|
@ -1039,13 +1040,14 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
|
|||
TRACE("Format %s is not supported as FBO color attachment, trying rtInternal format as fallback.\n",
|
||||
debug_d3dformat(format->id));
|
||||
|
||||
while(glGetError());
|
||||
while (gl_info->gl_ops.gl.p_glGetError());
|
||||
|
||||
gl_info->fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, 0, 0);
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, format->rtInternal, 16, 16, 0, format->glFormat, format->glType, NULL);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, format->rtInternal, 16, 16, 0,
|
||||
format->glFormat, format->glType, NULL);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
gl_info->fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0);
|
||||
|
||||
|
@ -1087,55 +1089,55 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
|
|||
checkGLcall("RB attachment");
|
||||
}
|
||||
|
||||
glEnable(GL_BLEND);
|
||||
glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
if (glGetError() == GL_INVALID_FRAMEBUFFER_OPERATION)
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_BLEND);
|
||||
gl_info->gl_ops.gl.p_glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
gl_info->gl_ops.gl.p_glClear(GL_COLOR_BUFFER_BIT);
|
||||
if (gl_info->gl_ops.gl.p_glGetError() == GL_INVALID_FRAMEBUFFER_OPERATION)
|
||||
{
|
||||
while(glGetError());
|
||||
while (gl_info->gl_ops.gl.p_glGetError());
|
||||
TRACE("Format doesn't support post-pixelshader blending.\n");
|
||||
format->flags &= ~WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING;
|
||||
}
|
||||
else
|
||||
{
|
||||
glViewport(0, 0, 16, 16);
|
||||
glDisable(GL_LIGHTING);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gl_info->gl_ops.gl.p_glViewport(0, 0, 16, 16);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_LIGHTING);
|
||||
gl_info->gl_ops.gl.p_glMatrixMode(GL_MODELVIEW);
|
||||
gl_info->gl_ops.gl.p_glLoadIdentity();
|
||||
gl_info->gl_ops.gl.p_glMatrixMode(GL_PROJECTION);
|
||||
gl_info->gl_ops.gl.p_glLoadIdentity();
|
||||
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
gl_info->gl_ops.gl.p_glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
|
||||
/* Draw a full-black quad */
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glColor4ub(0x00, 0x00, 0x00, 0xff);
|
||||
glVertex3f(-1.0f, -1.0f, 0.0f);
|
||||
glColor4ub(0x00, 0x00, 0x00, 0xff);
|
||||
glVertex3f(1.0f, -1.0f, 0.0f);
|
||||
glColor4ub(0x00, 0x00, 0x00, 0xff);
|
||||
glVertex3f(-1.0f, 1.0f, 0.0f);
|
||||
glColor4ub(0x00, 0x00, 0x00, 0xff);
|
||||
glVertex3f(1.0f, 1.0f, 0.0f);
|
||||
glEnd();
|
||||
gl_info->gl_ops.gl.p_glBegin(GL_TRIANGLE_STRIP);
|
||||
gl_info->gl_ops.gl.p_glColor4ub(0x00, 0x00, 0x00, 0xff);
|
||||
gl_info->gl_ops.gl.p_glVertex3f(-1.0f, -1.0f, 0.0f);
|
||||
gl_info->gl_ops.gl.p_glColor4ub(0x00, 0x00, 0x00, 0xff);
|
||||
gl_info->gl_ops.gl.p_glVertex3f(1.0f, -1.0f, 0.0f);
|
||||
gl_info->gl_ops.gl.p_glColor4ub(0x00, 0x00, 0x00, 0xff);
|
||||
gl_info->gl_ops.gl.p_glVertex3f(-1.0f, 1.0f, 0.0f);
|
||||
gl_info->gl_ops.gl.p_glColor4ub(0x00, 0x00, 0x00, 0xff);
|
||||
gl_info->gl_ops.gl.p_glVertex3f(1.0f, 1.0f, 0.0f);
|
||||
gl_info->gl_ops.gl.p_glEnd();
|
||||
|
||||
/* Draw a half-transparent red quad */
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glColor4ub(0xff, 0x00, 0x00, 0x80);
|
||||
glVertex3f(-1.0f, -1.0f, 0.0f);
|
||||
glColor4ub(0xff, 0x00, 0x00, 0x80);
|
||||
glVertex3f(1.0f, -1.0f, 0.0f);
|
||||
glColor4ub(0xff, 0x00, 0x00, 0x80);
|
||||
glVertex3f(-1.0f, 1.0f, 0.0f);
|
||||
glColor4ub(0xff, 0x00, 0x00, 0x80);
|
||||
glVertex3f(1.0f, 1.0f, 0.0f);
|
||||
glEnd();
|
||||
gl_info->gl_ops.gl.p_glBegin(GL_TRIANGLE_STRIP);
|
||||
gl_info->gl_ops.gl.p_glColor4ub(0xff, 0x00, 0x00, 0x80);
|
||||
gl_info->gl_ops.gl.p_glVertex3f(-1.0f, -1.0f, 0.0f);
|
||||
gl_info->gl_ops.gl.p_glColor4ub(0xff, 0x00, 0x00, 0x80);
|
||||
gl_info->gl_ops.gl.p_glVertex3f(1.0f, -1.0f, 0.0f);
|
||||
gl_info->gl_ops.gl.p_glColor4ub(0xff, 0x00, 0x00, 0x80);
|
||||
gl_info->gl_ops.gl.p_glVertex3f(-1.0f, 1.0f, 0.0f);
|
||||
gl_info->gl_ops.gl.p_glColor4ub(0xff, 0x00, 0x00, 0x80);
|
||||
gl_info->gl_ops.gl.p_glVertex3f(1.0f, 1.0f, 0.0f);
|
||||
gl_info->gl_ops.gl.p_glEnd();
|
||||
|
||||
glGenTextures(1, &tex2);
|
||||
glBindTexture(GL_TEXTURE_2D, tex2);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &tex2);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, tex2);
|
||||
|
||||
glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 0, 0, 16, 16, 0);
|
||||
glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, readback);
|
||||
gl_info->gl_ops.gl.p_glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 0, 0, 16, 16, 0);
|
||||
gl_info->gl_ops.gl.p_glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, readback);
|
||||
checkGLcall("Post-pixelshader blending check");
|
||||
|
||||
color = readback[7 * 16 + 7];
|
||||
|
@ -1159,8 +1161,8 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
|
|||
format->flags |= WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING;
|
||||
}
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
glDeleteTextures(1, &tex2);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, tex);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &tex2);
|
||||
}
|
||||
|
||||
if (gl_info->supported[ARB_FRAMEBUFFER_OBJECT]
|
||||
|
@ -1175,7 +1177,8 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
|
|||
|
||||
if (format->glInternal != format->glGammaInternal)
|
||||
{
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, format->glGammaInternal, 16, 16, 0, format->glFormat, format->glType, NULL);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, format->glGammaInternal, 16, 16, 0,
|
||||
format->glFormat, format->glType, NULL);
|
||||
gl_info->fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, tex, 0);
|
||||
|
||||
status = gl_info->fbo_ops.glCheckFramebufferStatus(GL_FRAMEBUFFER);
|
||||
|
@ -1194,7 +1197,7 @@ static void check_fbo_compat(const struct wined3d_gl_info *gl_info, struct wined
|
|||
else if (status == GL_FRAMEBUFFER_COMPLETE)
|
||||
format->flags |= WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB;
|
||||
|
||||
glDeleteTextures(1, &tex);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &tex);
|
||||
|
||||
LEAVE_GL();
|
||||
}
|
||||
|
@ -1211,8 +1214,8 @@ static void init_format_fbo_compat_info(struct wined3d_gl_info *gl_info)
|
|||
|
||||
gl_info->fbo_ops.glGenFramebuffers(1, &fbo);
|
||||
gl_info->fbo_ops.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
||||
glDrawBuffer(GL_COLOR_ATTACHMENT0);
|
||||
glReadBuffer(GL_COLOR_ATTACHMENT0);
|
||||
gl_info->gl_ops.gl.p_glDrawBuffer(GL_COLOR_ATTACHMENT0);
|
||||
gl_info->gl_ops.gl.p_glReadBuffer(GL_COLOR_ATTACHMENT0);
|
||||
|
||||
LEAVE_GL();
|
||||
}
|
||||
|
@ -1347,59 +1350,61 @@ static BOOL check_filter(const struct wined3d_gl_info *gl_info, GLenum internal)
|
|||
*/
|
||||
|
||||
ENTER_GL();
|
||||
while(glGetError());
|
||||
while (gl_info->gl_ops.gl.p_glGetError());
|
||||
|
||||
glGenTextures(1, &buffer);
|
||||
glBindTexture(GL_TEXTURE_2D, buffer);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &buffer);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, buffer);
|
||||
memset(readback, 0x7e, sizeof(readback));
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 16, 1, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, readback);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 16, 1, 0,
|
||||
GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, readback);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
|
||||
|
||||
glGenTextures(1, &tex);
|
||||
glBindTexture(GL_TEXTURE_2D, tex);
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, internal, 2, 1, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, data);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
gl_info->gl_ops.gl.p_glGenTextures(1, &tex);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, tex);
|
||||
gl_info->gl_ops.gl.p_glTexImage2D(GL_TEXTURE_2D, 0, internal, 2, 1, 0,
|
||||
GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, data);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_TEXTURE_2D);
|
||||
|
||||
gl_info->fbo_ops.glGenFramebuffers(1, &fbo);
|
||||
gl_info->fbo_ops.glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
||||
gl_info->fbo_ops.glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, buffer, 0);
|
||||
glDrawBuffer(GL_COLOR_ATTACHMENT0);
|
||||
gl_info->gl_ops.gl.p_glDrawBuffer(GL_COLOR_ATTACHMENT0);
|
||||
|
||||
glViewport(0, 0, 16, 1);
|
||||
glDisable(GL_LIGHTING);
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glMatrixMode(GL_PROJECTION);
|
||||
glLoadIdentity();
|
||||
gl_info->gl_ops.gl.p_glViewport(0, 0, 16, 1);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_LIGHTING);
|
||||
gl_info->gl_ops.gl.p_glMatrixMode(GL_MODELVIEW);
|
||||
gl_info->gl_ops.gl.p_glLoadIdentity();
|
||||
gl_info->gl_ops.gl.p_glMatrixMode(GL_PROJECTION);
|
||||
gl_info->gl_ops.gl.p_glLoadIdentity();
|
||||
|
||||
glClearColor(0, 1, 0, 0);
|
||||
glClear(GL_COLOR_BUFFER_BIT);
|
||||
gl_info->gl_ops.gl.p_glClearColor(0, 1, 0, 0);
|
||||
gl_info->gl_ops.gl.p_glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
glBegin(GL_TRIANGLE_STRIP);
|
||||
glTexCoord2f(0.0, 0.0);
|
||||
glVertex2f(-1.0f, -1.0f);
|
||||
glTexCoord2f(1.0, 0.0);
|
||||
glVertex2f(1.0f, -1.0f);
|
||||
glTexCoord2f(0.0, 1.0);
|
||||
glVertex2f(-1.0f, 1.0f);
|
||||
glTexCoord2f(1.0, 1.0);
|
||||
glVertex2f(1.0f, 1.0f);
|
||||
glEnd();
|
||||
gl_info->gl_ops.gl.p_glBegin(GL_TRIANGLE_STRIP);
|
||||
gl_info->gl_ops.gl.p_glTexCoord2f(0.0, 0.0);
|
||||
gl_info->gl_ops.gl.p_glVertex2f(-1.0f, -1.0f);
|
||||
gl_info->gl_ops.gl.p_glTexCoord2f(1.0, 0.0);
|
||||
gl_info->gl_ops.gl.p_glVertex2f(1.0f, -1.0f);
|
||||
gl_info->gl_ops.gl.p_glTexCoord2f(0.0, 1.0);
|
||||
gl_info->gl_ops.gl.p_glVertex2f(-1.0f, 1.0f);
|
||||
gl_info->gl_ops.gl.p_glTexCoord2f(1.0, 1.0);
|
||||
gl_info->gl_ops.gl.p_glVertex2f(1.0f, 1.0f);
|
||||
gl_info->gl_ops.gl.p_glEnd();
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, buffer);
|
||||
gl_info->gl_ops.gl.p_glBindTexture(GL_TEXTURE_2D, buffer);
|
||||
memset(readback, 0x7f, sizeof(readback));
|
||||
glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, readback);
|
||||
if(color_match(readback[6], 0xffffffff, 5) || color_match(readback[6], 0x00000000, 5) ||
|
||||
color_match(readback[9], 0xffffffff, 5) || color_match(readback[9], 0x00000000, 5))
|
||||
gl_info->gl_ops.gl.p_glGetTexImage(GL_TEXTURE_2D, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, readback);
|
||||
if (color_match(readback[6], 0xffffffff, 5) || color_match(readback[6], 0x00000000, 5)
|
||||
|| color_match(readback[9], 0xffffffff, 5) || color_match(readback[9], 0x00000000, 5))
|
||||
{
|
||||
TRACE("Read back colors 0x%08x and 0x%08x close to unfiltered color, assuming no filtering\n",
|
||||
readback[6], readback[9]);
|
||||
|
@ -1414,10 +1419,10 @@ static BOOL check_filter(const struct wined3d_gl_info *gl_info, GLenum internal)
|
|||
|
||||
gl_info->fbo_ops.glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
gl_info->fbo_ops.glDeleteFramebuffers(1, &fbo);
|
||||
glDeleteTextures(1, &tex);
|
||||
glDeleteTextures(1, &buffer);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &tex);
|
||||
gl_info->gl_ops.gl.p_glDeleteTextures(1, &buffer);
|
||||
|
||||
if(glGetError())
|
||||
if (gl_info->gl_ops.gl.p_glGetError())
|
||||
{
|
||||
FIXME("Error during filtering test for format %x, returning no filtering\n", internal);
|
||||
ret = FALSE;
|
||||
|
@ -2523,17 +2528,17 @@ BOOL is_invalid_op(const struct wined3d_state *state, int stage,
|
|||
|
||||
/* Setup this textures matrix according to the texture flags*/
|
||||
/* GL locking is done by the caller (state handler) */
|
||||
void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords, BOOL transformed,
|
||||
enum wined3d_format_id vtx_fmt, BOOL ffp_proj_control)
|
||||
void set_texture_matrix(const struct wined3d_gl_info *gl_info, const float *smat, DWORD flags,
|
||||
BOOL calculatedCoords, BOOL transformed, enum wined3d_format_id vtx_fmt, BOOL ffp_proj_control)
|
||||
{
|
||||
float mat[16];
|
||||
|
||||
glMatrixMode(GL_TEXTURE);
|
||||
gl_info->gl_ops.gl.p_glMatrixMode(GL_TEXTURE);
|
||||
checkGLcall("glMatrixMode(GL_TEXTURE)");
|
||||
|
||||
if (flags == WINED3D_TTFF_DISABLE || flags == WINED3D_TTFF_COUNT1 || transformed)
|
||||
{
|
||||
glLoadIdentity();
|
||||
gl_info->gl_ops.gl.p_glLoadIdentity();
|
||||
checkGLcall("glLoadIdentity()");
|
||||
return;
|
||||
}
|
||||
|
@ -2628,7 +2633,7 @@ void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords, B
|
|||
}
|
||||
}
|
||||
|
||||
glLoadMatrixf(mat);
|
||||
gl_info->gl_ops.gl.p_glLoadMatrixf(mat);
|
||||
checkGLcall("glLoadMatrixf(mat)");
|
||||
}
|
||||
|
||||
|
@ -3182,77 +3187,79 @@ void texture_activate_dimensions(const struct wined3d_texture *texture, const st
|
|||
switch (texture->target)
|
||||
{
|
||||
case GL_TEXTURE_2D:
|
||||
glDisable(GL_TEXTURE_3D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_3D);
|
||||
checkGLcall("glDisable(GL_TEXTURE_3D)");
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
{
|
||||
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
|
||||
}
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
{
|
||||
glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_RECTANGLE_ARB)");
|
||||
}
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_TEXTURE_2D);
|
||||
checkGLcall("glEnable(GL_TEXTURE_2D)");
|
||||
break;
|
||||
case GL_TEXTURE_RECTANGLE_ARB:
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_2D);
|
||||
checkGLcall("glDisable(GL_TEXTURE_2D)");
|
||||
glDisable(GL_TEXTURE_3D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_3D);
|
||||
checkGLcall("glDisable(GL_TEXTURE_3D)");
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
{
|
||||
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
|
||||
}
|
||||
glEnable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
checkGLcall("glEnable(GL_TEXTURE_RECTANGLE_ARB)");
|
||||
break;
|
||||
case GL_TEXTURE_3D:
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
{
|
||||
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
|
||||
}
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
{
|
||||
glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_RECTANGLE_ARB)");
|
||||
}
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_2D);
|
||||
checkGLcall("glDisable(GL_TEXTURE_2D)");
|
||||
glEnable(GL_TEXTURE_3D);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_TEXTURE_3D);
|
||||
checkGLcall("glEnable(GL_TEXTURE_3D)");
|
||||
break;
|
||||
case GL_TEXTURE_CUBE_MAP_ARB:
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_2D);
|
||||
checkGLcall("glDisable(GL_TEXTURE_2D)");
|
||||
glDisable(GL_TEXTURE_3D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_3D);
|
||||
checkGLcall("glDisable(GL_TEXTURE_3D)");
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
{
|
||||
glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_RECTANGLE_ARB)");
|
||||
}
|
||||
glEnable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
checkGLcall("glEnable(GL_TEXTURE_CUBE_MAP_ARB)");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
glEnable(GL_TEXTURE_2D);
|
||||
}
|
||||
else
|
||||
{
|
||||
gl_info->gl_ops.gl.p_glEnable(GL_TEXTURE_2D);
|
||||
checkGLcall("glEnable(GL_TEXTURE_2D)");
|
||||
glDisable(GL_TEXTURE_3D);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_3D);
|
||||
checkGLcall("glDisable(GL_TEXTURE_3D)");
|
||||
if (gl_info->supported[ARB_TEXTURE_CUBE_MAP])
|
||||
{
|
||||
glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_CUBE_MAP_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_CUBE_MAP_ARB)");
|
||||
}
|
||||
if (gl_info->supported[ARB_TEXTURE_RECTANGLE])
|
||||
{
|
||||
glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
gl_info->gl_ops.gl.p_glDisable(GL_TEXTURE_RECTANGLE_ARB);
|
||||
checkGLcall("glDisable(GL_TEXTURE_RECTANGLE_ARB)");
|
||||
}
|
||||
/* Binding textures is done by samplers. A dummy texture will be bound */
|
||||
|
|
|
@ -891,362 +891,8 @@ typedef struct __GLsync *GLsync;
|
|||
typedef char GLchar;
|
||||
#endif
|
||||
|
||||
void (WINE_GLAPI *glAccum)(GLenum op, GLfloat value) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glAlphaFunc)(GLenum func, GLclampf ref) DECLSPEC_HIDDEN;
|
||||
GLboolean (WINE_GLAPI *glAreTexturesResident)(GLsizei n, const GLuint *textures, GLboolean *residences) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glArrayElement)(GLint i) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glBegin)(GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glBindTexture)(GLenum target, GLuint texture) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glBitmap)(GLsizei width, GLsizei height, GLfloat xorig,
|
||||
GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glBlendFunc)(GLenum sfactor, GLenum dfactor) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glCallList)(GLuint list) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glCallLists)(GLsizei n, GLenum type, const GLvoid *lists) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glClear)(GLbitfield mask) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glClearAccum)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glClearColor)(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glClearDepth)(GLclampd depth) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glClearIndex)(GLfloat c) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glClearStencil)(GLint s) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glClipPlane)(GLenum plane, const GLdouble *equation) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3b)(GLbyte red, GLbyte green, GLbyte blue) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3bv)(const GLbyte *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3d)(GLdouble red, GLdouble green, GLdouble blue) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3f)(GLfloat red, GLfloat green, GLfloat blue) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3i)(GLint red, GLint green, GLint blue) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3s)(GLshort red, GLshort green, GLshort blue) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3ub)(GLubyte red, GLubyte green, GLubyte blue) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3ubv)(const GLubyte *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3ui)(GLuint red, GLuint green, GLuint blue) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3uiv)(const GLuint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3us)(GLushort red, GLushort green, GLushort blue) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor3usv)(const GLushort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4b)(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4bv)(const GLbyte *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4d)(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4f)(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4i)(GLint red, GLint green, GLint blue, GLint alpha) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4s)(GLshort red, GLshort green, GLshort blue, GLshort alpha) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4ub)(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4ubv)(const GLubyte *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4ui)(GLuint red, GLuint green, GLuint blue, GLuint alpha) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4uiv)(const GLuint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4us)(GLushort red, GLushort green, GLushort blue, GLushort alpha) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColor4usv)(const GLushort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColorMask)(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColorMaterial)(GLenum face, GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glColorPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glCopyPixels)(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glCopyTexImage1D)(GLenum target, GLint level,
|
||||
GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glCopyTexImage2D)(GLenum target, GLint level,
|
||||
GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glCopyTexSubImage1D)(GLenum target, GLint level,
|
||||
GLint xoffset, GLint x, GLint y, GLsizei width) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glCopyTexSubImage2D)(GLenum target, GLint level,
|
||||
GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glCullFace)(GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDeleteLists)(GLuint list, GLsizei range) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDeleteTextures)(GLsizei n, const GLuint *textures) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDepthFunc)(GLenum func) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDepthMask)(GLboolean flag) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDepthRange)(GLclampd nearParam, GLclampd farParam) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDisable)(GLenum cap) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDisableWINE)(GLenum cap) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDisableClientState)(GLenum array) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDrawArrays)(GLenum mode, GLint first, GLsizei count) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDrawBuffer)(GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDrawElements)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glDrawPixels)(GLsizei width, GLsizei height, GLenum format,
|
||||
GLenum type, const GLvoid *pixels) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEdgeFlag)(GLboolean flag) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEdgeFlagPointer)(GLsizei stride, const GLvoid *pointer) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEdgeFlagv)(const GLboolean *flag) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEnable)(GLenum cap) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEnableWINE)(GLenum cap) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEnableClientState)(GLenum array) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEnd)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEndList)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalCoord1d)(GLdouble u) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalCoord1dv)(const GLdouble *u) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalCoord1f)(GLfloat u) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalCoord1fv)(const GLfloat *u) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalCoord2d)(GLdouble u, GLdouble v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalCoord2dv)(const GLdouble *u) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalCoord2f)(GLfloat u, GLfloat v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalCoord2fv)(const GLfloat *u) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalMesh1)(GLenum mode, GLint i1, GLint i2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalMesh2)(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalPoint1)(GLint i) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glEvalPoint2)(GLint i, GLint j) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glFeedbackBuffer)(GLsizei size, GLenum type, GLfloat *buffer) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glFinish)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glFlush)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glFogf)(GLenum pname, GLfloat param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glFogfv)(GLenum pname, const GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glFogi)(GLenum pname, GLint param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glFogiv)(GLenum pname, const GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glFrontFace)(GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glFrustum)(GLdouble left, GLdouble right, GLdouble bottom,
|
||||
GLdouble top, GLdouble zNear, GLdouble zFar) DECLSPEC_HIDDEN;
|
||||
GLuint (WINE_GLAPI *glGenLists)(GLsizei range) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGenTextures)(GLsizei n, GLuint *textures) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetBooleanv)(GLenum pname, GLboolean *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetClipPlane)(GLenum plane, GLdouble *equation) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetDoublev)(GLenum pname, GLdouble *params) DECLSPEC_HIDDEN;
|
||||
GLenum (WINE_GLAPI *glGetError)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetFloatv)(GLenum pname, GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetIntegerv)(GLenum pname, GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetLightfv)(GLenum light, GLenum pname, GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetLightiv)(GLenum light, GLenum pname, GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetMapdv)(GLenum target, GLenum query, GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetMapfv)(GLenum target, GLenum query, GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetMapiv)(GLenum target, GLenum query, GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetMaterialfv)(GLenum face, GLenum pname, GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetMaterialiv)(GLenum face, GLenum pname, GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetPixelMapfv)(GLenum map, GLfloat *values) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetPixelMapuiv)(GLenum map, GLuint *values) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetPixelMapusv)(GLenum map, GLushort *values) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetPointerv)(GLenum pname, GLvoid **params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetPolygonStipple)(GLubyte *mask) DECLSPEC_HIDDEN;
|
||||
const GLubyte * (WINE_GLAPI *glGetString)(GLenum name) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetTexEnvfv)(GLenum target, GLenum pname, GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetTexEnviv)(GLenum target, GLenum pname, GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetTexGendv)(GLenum coord, GLenum pname, GLdouble *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetTexGenfv)(GLenum coord, GLenum pname, GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetTexGeniv)(GLenum coord, GLenum pname, GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetTexImage)(GLenum target, GLint level, GLenum format,
|
||||
GLenum type, GLvoid *pixels) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetTexLevelParameterfv)(GLenum target, GLint level, GLenum pname, GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetTexLevelParameteriv)(GLenum target, GLint level, GLenum pname, GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetTexParameterfv)(GLenum target, GLenum pname, GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glGetTexParameteriv)(GLenum target, GLenum pname, GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glHint)(GLenum target, GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexMask)(GLuint mask) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexd)(GLdouble c) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexdv)(const GLdouble *c) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexf)(GLfloat c) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexfv)(const GLfloat *c) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexi)(GLint c) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexiv)(const GLint *c) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexs)(GLshort c) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexsv)(const GLshort *c) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexub)(GLubyte c) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glIndexubv)(const GLubyte *c) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glInitNames)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glInterleavedArrays)(GLenum format, GLsizei stride, const GLvoid *pointer) DECLSPEC_HIDDEN;
|
||||
GLboolean (WINE_GLAPI *glIsEnabled)(GLenum cap) DECLSPEC_HIDDEN;
|
||||
GLboolean (WINE_GLAPI *glIsList)(GLuint list) DECLSPEC_HIDDEN;
|
||||
GLboolean (WINE_GLAPI *glIsTexture)(GLuint texture) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLightModelf)(GLenum pname, GLfloat param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLightModelfv)(GLenum pname, const GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLightModeli)(GLenum pname, GLint param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLightModeliv)(GLenum pname, const GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLightf)(GLenum light, GLenum pname, GLfloat param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLightfv)(GLenum light, GLenum pname, const GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLighti)(GLenum light, GLenum pname, GLint param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLightiv)(GLenum light, GLenum pname, const GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLineStipple)(GLint factor, GLushort pattern) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLineWidth)(GLfloat width) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glListBase)(GLuint base) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLoadIdentity)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLoadMatrixd)(const GLdouble *m) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLoadMatrixf)(const GLfloat *m) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLoadName)(GLuint name) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glLogicOp)(GLenum opcode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMap1d)(GLenum target, GLdouble u1, GLdouble u2,
|
||||
GLint stride, GLint order, const GLdouble *points) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMap1f)(GLenum target, GLfloat u1, GLfloat u2, GLint stride,
|
||||
GLint order, const GLfloat *points) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMap2d)(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder,
|
||||
GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMap2f)(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder,
|
||||
GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMapGrid1d)(GLint un, GLdouble u1, GLdouble u2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMapGrid1f)(GLint un, GLfloat u1, GLfloat u2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMapGrid2d)(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMapGrid2f)(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMaterialf)(GLenum face, GLenum pname, GLfloat param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMaterialfv)(GLenum face, GLenum pname, const GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMateriali)(GLenum face, GLenum pname, GLint param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMaterialiv)(GLenum face, GLenum pname, const GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMatrixMode)(GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMultMatrixd)(const GLdouble *m) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glMultMatrixf)(const GLfloat *m) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNewList)(GLuint list, GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNormal3b)(GLbyte nx, GLbyte ny, GLbyte nz) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNormal3bv)(const GLbyte *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNormal3d)(GLdouble nx, GLdouble ny, GLdouble nz) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNormal3dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNormal3f)(GLfloat nx, GLfloat ny, GLfloat nz) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNormal3fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNormal3i)(GLint nx, GLint ny, GLint nz) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNormal3iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNormal3s)(GLshort nx, GLshort ny, GLshort nz) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNormal3sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glNormalPointer)(GLenum type, GLsizei stride, const GLvoid *pointer) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glOrtho)(GLdouble left, GLdouble right, GLdouble bottom,
|
||||
GLdouble top, GLdouble zNear, GLdouble zFar) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPassThrough)(GLfloat token) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPixelMapfv)(GLenum map, GLint mapsize, const GLfloat *values) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPixelMapuiv)(GLenum map, GLint mapsize, const GLuint *values) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPixelMapusv)(GLenum map, GLint mapsize, const GLushort *values) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPixelStoref)(GLenum pname, GLfloat param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPixelStorei)(GLenum pname, GLint param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPixelTransferf)(GLenum pname, GLfloat param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPixelTransferi)(GLenum pname, GLint param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPixelZoom)(GLfloat xfactor, GLfloat yfactor) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPointSize)(GLfloat size) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPolygonMode)(GLenum face, GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPolygonOffset)(GLfloat factor, GLfloat units) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPolygonStipple)(const GLubyte *mask) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPopAttrib)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPopClientAttrib)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPopMatrix)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPopName)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPrioritizeTextures)(GLsizei n, const GLuint *textures, const GLclampf *priorities) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPushAttrib)(GLbitfield mask) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPushClientAttrib)(GLbitfield mask) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPushMatrix)(void) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glPushName)(GLuint name) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos2d)(GLdouble x, GLdouble y) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos2dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos2f)(GLfloat x, GLfloat y) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos2fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos2i)(GLint x, GLint y) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos2iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos2s)(GLshort x, GLshort y) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos2sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos3d)(GLdouble x, GLdouble y, GLdouble z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos3dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos3f)(GLfloat x, GLfloat y, GLfloat z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos3fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos3i)(GLint x, GLint y, GLint z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos3iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos3s)(GLshort x, GLshort y, GLshort z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos3sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos4dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos4fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos4i)(GLint x, GLint y, GLint z, GLint w) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos4iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos4s)(GLshort x, GLshort y, GLshort z, GLshort w) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRasterPos4sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glReadBuffer)(GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glReadPixels)(GLint x, GLint y, GLsizei width, GLsizei height,
|
||||
GLenum format, GLenum type, GLvoid *pixels) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRectd)(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRectdv)(const GLdouble *v1, const GLdouble *v2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRectf)(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRectfv)(const GLfloat *v1, const GLfloat *v2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRecti)(GLint x1, GLint y1, GLint x2, GLint y2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRectiv)(const GLint *v1, const GLint *v2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRects)(GLshort x1, GLshort y1, GLshort x2, GLshort y2) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRectsv)(const GLshort *v1, const GLshort *v2) DECLSPEC_HIDDEN;
|
||||
GLint (WINE_GLAPI *glRenderMode)(GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRotated)(GLdouble angle, GLdouble x, GLdouble y, GLdouble z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glRotatef)(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glScaled)(GLdouble x, GLdouble y, GLdouble z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glScalef)(GLfloat x, GLfloat y, GLfloat z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glScissor)(GLint x, GLint y, GLsizei width, GLsizei height) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glSelectBuffer)(GLsizei size, GLuint *buffer) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glShadeModel)(GLenum mode) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glStencilFunc)(GLenum func, GLint ref, GLuint mask) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glStencilMask)(GLuint mask) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glStencilOp)(GLenum fail, GLenum zfail, GLenum zpass) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord1d)(GLdouble s) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord1dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord1f)(GLfloat s) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord1fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord1i)(GLint s) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord1iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord1s)(GLshort s) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord1sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord2d)(GLdouble s, GLdouble t) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord2dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord2f)(GLfloat s, GLfloat t) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord2fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord2i)(GLint s, GLint t) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord2iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord2s)(GLshort s, GLshort t) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord2sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord3d)(GLdouble s, GLdouble t, GLdouble r) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord3dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord3f)(GLfloat s, GLfloat t, GLfloat r) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord3fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord3i)(GLint s, GLint t, GLint r) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord3iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord3s)(GLshort s, GLshort t, GLshort r) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord3sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord4d)(GLdouble s, GLdouble t, GLdouble r, GLdouble q) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord4dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord4f)(GLfloat s, GLfloat t, GLfloat r, GLfloat q) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord4fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord4i)(GLint s, GLint t, GLint r, GLint q) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord4iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord4s)(GLshort s, GLshort t, GLshort r, GLshort q) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoord4sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexCoordPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexEnvf)(GLenum target, GLenum pname, GLfloat param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexEnvfv)(GLenum target, GLenum pname, const GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexEnvi)(GLenum target, GLenum pname, GLint param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexEnviv)(GLenum target, GLenum pname, const GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexGend)(GLenum coord, GLenum pname, GLdouble param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexGendv)(GLenum coord, GLenum pname, const GLdouble *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexGenf)(GLenum coord, GLenum pname, GLfloat param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexGenfv)(GLenum coord, GLenum pname, const GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexGeni)(GLenum coord, GLenum pname, GLint param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexGeniv)(GLenum coord, GLenum pname, const GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexImage1D)(GLenum target, GLint level, GLint internalformat, GLsizei width,
|
||||
GLint border, GLenum format, GLenum type, const GLvoid *pixels) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexImage2D)(GLenum target, GLint level, GLint internalformat, GLsizei width,
|
||||
GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexParameterf)(GLenum target, GLenum pname, GLfloat param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexParameterfv)(GLenum target, GLenum pname, const GLfloat *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexParameteri)(GLenum target, GLenum pname, GLint param) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexParameteriv)(GLenum target, GLenum pname, const GLint *params) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexSubImage1D)(GLenum target, GLint level, GLint xoffset,
|
||||
GLsizei width, GLenum format, GLenum type, const GLvoid *pixels) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTexSubImage2D)(GLenum target, GLint level, GLint xoffset, GLint yoffset,
|
||||
GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTranslated)(GLdouble x, GLdouble y, GLdouble z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glTranslatef)(GLfloat x, GLfloat y, GLfloat z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex2d)(GLdouble x, GLdouble y) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex2dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex2f)(GLfloat x, GLfloat y) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex2fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex2i)(GLint x, GLint y) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex2iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex2s)(GLshort x, GLshort y) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex2sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex3d)(GLdouble x, GLdouble y, GLdouble z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex3dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex3f)(GLfloat x, GLfloat y, GLfloat z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex3fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex3i)(GLint x, GLint y, GLint z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex3iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex3s)(GLshort x, GLshort y, GLshort z) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex3sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex4d)(GLdouble x, GLdouble y, GLdouble z, GLdouble w) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex4dv)(const GLdouble *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex4f)(GLfloat x, GLfloat y, GLfloat z, GLfloat w) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex4fv)(const GLfloat *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex4i)(GLint x, GLint y, GLint z, GLint w) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex4iv)(const GLint *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex4s)(GLshort x, GLshort y, GLshort z, GLshort w) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertex4sv)(const GLshort *v) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glVertexPointer)(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) DECLSPEC_HIDDEN;
|
||||
void (WINE_GLAPI *glViewport)(GLint x, GLint y, GLsizei width, GLsizei height) DECLSPEC_HIDDEN;
|
||||
|
||||
/* WGL functions */
|
||||
HGLRC (WINAPI *pwglCreateContext)(HDC) DECLSPEC_HIDDEN;
|
||||
|
@ -1257,344 +903,6 @@ PROC (WINAPI *pwglGetProcAddress)(LPCSTR) DECLSPEC_HIDDEN;
|
|||
BOOL (WINAPI *pwglMakeCurrent)(HDC, HGLRC) DECLSPEC_HIDDEN;
|
||||
BOOL (WINAPI *pwglShareLists)(HGLRC, HGLRC) DECLSPEC_HIDDEN;
|
||||
|
||||
#define GL_FUNCS_GEN \
|
||||
USE_GL_FUNC(glAccum) \
|
||||
USE_GL_FUNC(glAlphaFunc) \
|
||||
USE_GL_FUNC(glAreTexturesResident) \
|
||||
USE_GL_FUNC(glArrayElement) \
|
||||
USE_GL_FUNC(glBegin) \
|
||||
USE_GL_FUNC(glBindTexture) \
|
||||
USE_GL_FUNC(glBitmap) \
|
||||
USE_GL_FUNC(glBlendFunc) \
|
||||
USE_GL_FUNC(glCallList) \
|
||||
USE_GL_FUNC(glCallLists) \
|
||||
USE_GL_FUNC(glClear) \
|
||||
USE_GL_FUNC(glClearAccum) \
|
||||
USE_GL_FUNC(glClearColor) \
|
||||
USE_GL_FUNC(glClearDepth) \
|
||||
USE_GL_FUNC(glClearIndex) \
|
||||
USE_GL_FUNC(glClearStencil) \
|
||||
USE_GL_FUNC(glClipPlane) \
|
||||
USE_GL_FUNC(glColor3b) \
|
||||
USE_GL_FUNC(glColor3bv) \
|
||||
USE_GL_FUNC(glColor3d) \
|
||||
USE_GL_FUNC(glColor3dv) \
|
||||
USE_GL_FUNC(glColor3f) \
|
||||
USE_GL_FUNC(glColor3fv) \
|
||||
USE_GL_FUNC(glColor3i) \
|
||||
USE_GL_FUNC(glColor3iv) \
|
||||
USE_GL_FUNC(glColor3s) \
|
||||
USE_GL_FUNC(glColor3sv) \
|
||||
USE_GL_FUNC(glColor3ub) \
|
||||
USE_GL_FUNC(glColor3ubv) \
|
||||
USE_GL_FUNC(glColor3ui) \
|
||||
USE_GL_FUNC(glColor3uiv) \
|
||||
USE_GL_FUNC(glColor3us) \
|
||||
USE_GL_FUNC(glColor3usv) \
|
||||
USE_GL_FUNC(glColor4b) \
|
||||
USE_GL_FUNC(glColor4bv) \
|
||||
USE_GL_FUNC(glColor4d) \
|
||||
USE_GL_FUNC(glColor4dv) \
|
||||
USE_GL_FUNC(glColor4f) \
|
||||
USE_GL_FUNC(glColor4fv) \
|
||||
USE_GL_FUNC(glColor4i) \
|
||||
USE_GL_FUNC(glColor4iv) \
|
||||
USE_GL_FUNC(glColor4s) \
|
||||
USE_GL_FUNC(glColor4sv) \
|
||||
USE_GL_FUNC(glColor4ub) \
|
||||
USE_GL_FUNC(glColor4ubv) \
|
||||
USE_GL_FUNC(glColor4ui) \
|
||||
USE_GL_FUNC(glColor4uiv) \
|
||||
USE_GL_FUNC(glColor4us) \
|
||||
USE_GL_FUNC(glColor4usv) \
|
||||
USE_GL_FUNC(glColorMask) \
|
||||
USE_GL_FUNC(glColorMaterial) \
|
||||
USE_GL_FUNC(glColorPointer) \
|
||||
USE_GL_FUNC(glCopyPixels) \
|
||||
USE_GL_FUNC(glCopyTexImage1D) \
|
||||
USE_GL_FUNC(glCopyTexImage2D) \
|
||||
USE_GL_FUNC(glCopyTexSubImage1D) \
|
||||
USE_GL_FUNC(glCopyTexSubImage2D) \
|
||||
USE_GL_FUNC(glCullFace) \
|
||||
USE_GL_FUNC(glDeleteLists) \
|
||||
USE_GL_FUNC(glDeleteTextures) \
|
||||
USE_GL_FUNC(glDepthFunc) \
|
||||
USE_GL_FUNC(glDepthMask) \
|
||||
USE_GL_FUNC(glDepthRange) \
|
||||
USE_GL_FUNC(glDisable) \
|
||||
USE_GL_FUNC(glDisableClientState) \
|
||||
USE_GL_FUNC(glDrawArrays) \
|
||||
USE_GL_FUNC(glDrawBuffer) \
|
||||
USE_GL_FUNC(glDrawElements) \
|
||||
USE_GL_FUNC(glDrawPixels) \
|
||||
USE_GL_FUNC(glEdgeFlag) \
|
||||
USE_GL_FUNC(glEdgeFlagPointer) \
|
||||
USE_GL_FUNC(glEdgeFlagv) \
|
||||
USE_GL_FUNC(glEnable) \
|
||||
USE_GL_FUNC(glEnableClientState) \
|
||||
USE_GL_FUNC(glEnd) \
|
||||
USE_GL_FUNC(glEndList) \
|
||||
USE_GL_FUNC(glEvalCoord1d) \
|
||||
USE_GL_FUNC(glEvalCoord1dv) \
|
||||
USE_GL_FUNC(glEvalCoord1f) \
|
||||
USE_GL_FUNC(glEvalCoord1fv) \
|
||||
USE_GL_FUNC(glEvalCoord2d) \
|
||||
USE_GL_FUNC(glEvalCoord2dv) \
|
||||
USE_GL_FUNC(glEvalCoord2f) \
|
||||
USE_GL_FUNC(glEvalCoord2fv) \
|
||||
USE_GL_FUNC(glEvalMesh1) \
|
||||
USE_GL_FUNC(glEvalMesh2) \
|
||||
USE_GL_FUNC(glEvalPoint1) \
|
||||
USE_GL_FUNC(glEvalPoint2) \
|
||||
USE_GL_FUNC(glFeedbackBuffer) \
|
||||
USE_GL_FUNC(glFinish) \
|
||||
USE_GL_FUNC(glFlush) \
|
||||
USE_GL_FUNC(glFogf) \
|
||||
USE_GL_FUNC(glFogfv) \
|
||||
USE_GL_FUNC(glFogi) \
|
||||
USE_GL_FUNC(glFogiv) \
|
||||
USE_GL_FUNC(glFrontFace) \
|
||||
USE_GL_FUNC(glFrustum) \
|
||||
USE_GL_FUNC(glGenLists) \
|
||||
USE_GL_FUNC(glGenTextures) \
|
||||
USE_GL_FUNC(glGetBooleanv) \
|
||||
USE_GL_FUNC(glGetClipPlane) \
|
||||
USE_GL_FUNC(glGetDoublev) \
|
||||
USE_GL_FUNC(glGetError) \
|
||||
USE_GL_FUNC(glGetFloatv) \
|
||||
USE_GL_FUNC(glGetIntegerv) \
|
||||
USE_GL_FUNC(glGetLightfv) \
|
||||
USE_GL_FUNC(glGetLightiv) \
|
||||
USE_GL_FUNC(glGetMapdv) \
|
||||
USE_GL_FUNC(glGetMapfv) \
|
||||
USE_GL_FUNC(glGetMapiv) \
|
||||
USE_GL_FUNC(glGetMaterialfv) \
|
||||
USE_GL_FUNC(glGetMaterialiv) \
|
||||
USE_GL_FUNC(glGetPixelMapfv) \
|
||||
USE_GL_FUNC(glGetPixelMapuiv) \
|
||||
USE_GL_FUNC(glGetPixelMapusv) \
|
||||
USE_GL_FUNC(glGetPointerv) \
|
||||
USE_GL_FUNC(glGetPolygonStipple) \
|
||||
USE_GL_FUNC(glGetString) \
|
||||
USE_GL_FUNC(glGetTexEnvfv) \
|
||||
USE_GL_FUNC(glGetTexEnviv) \
|
||||
USE_GL_FUNC(glGetTexGendv) \
|
||||
USE_GL_FUNC(glGetTexGenfv) \
|
||||
USE_GL_FUNC(glGetTexGeniv) \
|
||||
USE_GL_FUNC(glGetTexImage) \
|
||||
USE_GL_FUNC(glGetTexLevelParameterfv) \
|
||||
USE_GL_FUNC(glGetTexLevelParameteriv) \
|
||||
USE_GL_FUNC(glGetTexParameterfv) \
|
||||
USE_GL_FUNC(glGetTexParameteriv) \
|
||||
USE_GL_FUNC(glHint) \
|
||||
USE_GL_FUNC(glIndexMask) \
|
||||
USE_GL_FUNC(glIndexPointer) \
|
||||
USE_GL_FUNC(glIndexd) \
|
||||
USE_GL_FUNC(glIndexdv) \
|
||||
USE_GL_FUNC(glIndexf) \
|
||||
USE_GL_FUNC(glIndexfv) \
|
||||
USE_GL_FUNC(glIndexi) \
|
||||
USE_GL_FUNC(glIndexiv) \
|
||||
USE_GL_FUNC(glIndexs) \
|
||||
USE_GL_FUNC(glIndexsv) \
|
||||
USE_GL_FUNC(glIndexub) \
|
||||
USE_GL_FUNC(glIndexubv) \
|
||||
USE_GL_FUNC(glInitNames) \
|
||||
USE_GL_FUNC(glInterleavedArrays) \
|
||||
USE_GL_FUNC(glIsEnabled) \
|
||||
USE_GL_FUNC(glIsList) \
|
||||
USE_GL_FUNC(glIsTexture) \
|
||||
USE_GL_FUNC(glLightModelf) \
|
||||
USE_GL_FUNC(glLightModelfv) \
|
||||
USE_GL_FUNC(glLightModeli) \
|
||||
USE_GL_FUNC(glLightModeliv) \
|
||||
USE_GL_FUNC(glLightf) \
|
||||
USE_GL_FUNC(glLightfv) \
|
||||
USE_GL_FUNC(glLighti) \
|
||||
USE_GL_FUNC(glLightiv) \
|
||||
USE_GL_FUNC(glLineStipple) \
|
||||
USE_GL_FUNC(glLineWidth) \
|
||||
USE_GL_FUNC(glListBase) \
|
||||
USE_GL_FUNC(glLoadIdentity) \
|
||||
USE_GL_FUNC(glLoadMatrixd) \
|
||||
USE_GL_FUNC(glLoadMatrixf) \
|
||||
USE_GL_FUNC(glLoadName) \
|
||||
USE_GL_FUNC(glLogicOp) \
|
||||
USE_GL_FUNC(glMap1d) \
|
||||
USE_GL_FUNC(glMap1f) \
|
||||
USE_GL_FUNC(glMap2d) \
|
||||
USE_GL_FUNC(glMap2f) \
|
||||
USE_GL_FUNC(glMapGrid1d) \
|
||||
USE_GL_FUNC(glMapGrid1f) \
|
||||
USE_GL_FUNC(glMapGrid2d) \
|
||||
USE_GL_FUNC(glMapGrid2f) \
|
||||
USE_GL_FUNC(glMaterialf) \
|
||||
USE_GL_FUNC(glMaterialfv) \
|
||||
USE_GL_FUNC(glMateriali) \
|
||||
USE_GL_FUNC(glMaterialiv) \
|
||||
USE_GL_FUNC(glMatrixMode) \
|
||||
USE_GL_FUNC(glMultMatrixd) \
|
||||
USE_GL_FUNC(glMultMatrixf) \
|
||||
USE_GL_FUNC(glNewList) \
|
||||
USE_GL_FUNC(glNormal3b) \
|
||||
USE_GL_FUNC(glNormal3bv) \
|
||||
USE_GL_FUNC(glNormal3d) \
|
||||
USE_GL_FUNC(glNormal3dv) \
|
||||
USE_GL_FUNC(glNormal3f) \
|
||||
USE_GL_FUNC(glNormal3fv) \
|
||||
USE_GL_FUNC(glNormal3i) \
|
||||
USE_GL_FUNC(glNormal3iv) \
|
||||
USE_GL_FUNC(glNormal3s) \
|
||||
USE_GL_FUNC(glNormal3sv) \
|
||||
USE_GL_FUNC(glNormalPointer) \
|
||||
USE_GL_FUNC(glOrtho) \
|
||||
USE_GL_FUNC(glPassThrough) \
|
||||
USE_GL_FUNC(glPixelMapfv) \
|
||||
USE_GL_FUNC(glPixelMapuiv) \
|
||||
USE_GL_FUNC(glPixelMapusv) \
|
||||
USE_GL_FUNC(glPixelStoref) \
|
||||
USE_GL_FUNC(glPixelStorei) \
|
||||
USE_GL_FUNC(glPixelTransferf) \
|
||||
USE_GL_FUNC(glPixelTransferi) \
|
||||
USE_GL_FUNC(glPixelZoom) \
|
||||
USE_GL_FUNC(glPointSize) \
|
||||
USE_GL_FUNC(glPolygonMode) \
|
||||
USE_GL_FUNC(glPolygonOffset) \
|
||||
USE_GL_FUNC(glPolygonStipple) \
|
||||
USE_GL_FUNC(glPopAttrib) \
|
||||
USE_GL_FUNC(glPopClientAttrib) \
|
||||
USE_GL_FUNC(glPopMatrix) \
|
||||
USE_GL_FUNC(glPopName) \
|
||||
USE_GL_FUNC(glPrioritizeTextures) \
|
||||
USE_GL_FUNC(glPushAttrib) \
|
||||
USE_GL_FUNC(glPushClientAttrib) \
|
||||
USE_GL_FUNC(glPushMatrix) \
|
||||
USE_GL_FUNC(glPushName) \
|
||||
USE_GL_FUNC(glRasterPos2d) \
|
||||
USE_GL_FUNC(glRasterPos2dv) \
|
||||
USE_GL_FUNC(glRasterPos2f) \
|
||||
USE_GL_FUNC(glRasterPos2fv) \
|
||||
USE_GL_FUNC(glRasterPos2i) \
|
||||
USE_GL_FUNC(glRasterPos2iv) \
|
||||
USE_GL_FUNC(glRasterPos2s) \
|
||||
USE_GL_FUNC(glRasterPos2sv) \
|
||||
USE_GL_FUNC(glRasterPos3d) \
|
||||
USE_GL_FUNC(glRasterPos3dv) \
|
||||
USE_GL_FUNC(glRasterPos3f) \
|
||||
USE_GL_FUNC(glRasterPos3fv) \
|
||||
USE_GL_FUNC(glRasterPos3i) \
|
||||
USE_GL_FUNC(glRasterPos3iv) \
|
||||
USE_GL_FUNC(glRasterPos3s) \
|
||||
USE_GL_FUNC(glRasterPos3sv) \
|
||||
USE_GL_FUNC(glRasterPos4d) \
|
||||
USE_GL_FUNC(glRasterPos4dv) \
|
||||
USE_GL_FUNC(glRasterPos4f) \
|
||||
USE_GL_FUNC(glRasterPos4fv) \
|
||||
USE_GL_FUNC(glRasterPos4i) \
|
||||
USE_GL_FUNC(glRasterPos4iv) \
|
||||
USE_GL_FUNC(glRasterPos4s) \
|
||||
USE_GL_FUNC(glRasterPos4sv) \
|
||||
USE_GL_FUNC(glReadBuffer) \
|
||||
USE_GL_FUNC(glReadPixels) \
|
||||
USE_GL_FUNC(glRectd) \
|
||||
USE_GL_FUNC(glRectdv) \
|
||||
USE_GL_FUNC(glRectf) \
|
||||
USE_GL_FUNC(glRectfv) \
|
||||
USE_GL_FUNC(glRecti) \
|
||||
USE_GL_FUNC(glRectiv) \
|
||||
USE_GL_FUNC(glRects) \
|
||||
USE_GL_FUNC(glRectsv) \
|
||||
USE_GL_FUNC(glRenderMode) \
|
||||
USE_GL_FUNC(glRotated) \
|
||||
USE_GL_FUNC(glRotatef) \
|
||||
USE_GL_FUNC(glScaled) \
|
||||
USE_GL_FUNC(glScalef) \
|
||||
USE_GL_FUNC(glScissor) \
|
||||
USE_GL_FUNC(glSelectBuffer) \
|
||||
USE_GL_FUNC(glShadeModel) \
|
||||
USE_GL_FUNC(glStencilFunc) \
|
||||
USE_GL_FUNC(glStencilMask) \
|
||||
USE_GL_FUNC(glStencilOp) \
|
||||
USE_GL_FUNC(glTexCoord1d) \
|
||||
USE_GL_FUNC(glTexCoord1dv) \
|
||||
USE_GL_FUNC(glTexCoord1f) \
|
||||
USE_GL_FUNC(glTexCoord1fv) \
|
||||
USE_GL_FUNC(glTexCoord1i) \
|
||||
USE_GL_FUNC(glTexCoord1iv) \
|
||||
USE_GL_FUNC(glTexCoord1s) \
|
||||
USE_GL_FUNC(glTexCoord1sv) \
|
||||
USE_GL_FUNC(glTexCoord2d) \
|
||||
USE_GL_FUNC(glTexCoord2dv) \
|
||||
USE_GL_FUNC(glTexCoord2f) \
|
||||
USE_GL_FUNC(glTexCoord2fv) \
|
||||
USE_GL_FUNC(glTexCoord2i) \
|
||||
USE_GL_FUNC(glTexCoord2iv) \
|
||||
USE_GL_FUNC(glTexCoord2s) \
|
||||
USE_GL_FUNC(glTexCoord2sv) \
|
||||
USE_GL_FUNC(glTexCoord3d) \
|
||||
USE_GL_FUNC(glTexCoord3dv) \
|
||||
USE_GL_FUNC(glTexCoord3f) \
|
||||
USE_GL_FUNC(glTexCoord3fv) \
|
||||
USE_GL_FUNC(glTexCoord3i) \
|
||||
USE_GL_FUNC(glTexCoord3iv) \
|
||||
USE_GL_FUNC(glTexCoord3s) \
|
||||
USE_GL_FUNC(glTexCoord3sv) \
|
||||
USE_GL_FUNC(glTexCoord4d) \
|
||||
USE_GL_FUNC(glTexCoord4dv) \
|
||||
USE_GL_FUNC(glTexCoord4f) \
|
||||
USE_GL_FUNC(glTexCoord4fv) \
|
||||
USE_GL_FUNC(glTexCoord4i) \
|
||||
USE_GL_FUNC(glTexCoord4iv) \
|
||||
USE_GL_FUNC(glTexCoord4s) \
|
||||
USE_GL_FUNC(glTexCoord4sv) \
|
||||
USE_GL_FUNC(glTexCoordPointer) \
|
||||
USE_GL_FUNC(glTexEnvf) \
|
||||
USE_GL_FUNC(glTexEnvfv) \
|
||||
USE_GL_FUNC(glTexEnvi) \
|
||||
USE_GL_FUNC(glTexEnviv) \
|
||||
USE_GL_FUNC(glTexGend) \
|
||||
USE_GL_FUNC(glTexGendv) \
|
||||
USE_GL_FUNC(glTexGenf) \
|
||||
USE_GL_FUNC(glTexGenfv) \
|
||||
USE_GL_FUNC(glTexGeni) \
|
||||
USE_GL_FUNC(glTexGeniv) \
|
||||
USE_GL_FUNC(glTexImage1D) \
|
||||
USE_GL_FUNC(glTexImage2D) \
|
||||
USE_GL_FUNC(glTexParameterf) \
|
||||
USE_GL_FUNC(glTexParameterfv) \
|
||||
USE_GL_FUNC(glTexParameteri) \
|
||||
USE_GL_FUNC(glTexParameteriv) \
|
||||
USE_GL_FUNC(glTexSubImage1D) \
|
||||
USE_GL_FUNC(glTexSubImage2D) \
|
||||
USE_GL_FUNC(glTranslated) \
|
||||
USE_GL_FUNC(glTranslatef) \
|
||||
USE_GL_FUNC(glVertex2d) \
|
||||
USE_GL_FUNC(glVertex2dv) \
|
||||
USE_GL_FUNC(glVertex2f) \
|
||||
USE_GL_FUNC(glVertex2fv) \
|
||||
USE_GL_FUNC(glVertex2i) \
|
||||
USE_GL_FUNC(glVertex2iv) \
|
||||
USE_GL_FUNC(glVertex2s) \
|
||||
USE_GL_FUNC(glVertex2sv) \
|
||||
USE_GL_FUNC(glVertex3d) \
|
||||
USE_GL_FUNC(glVertex3dv) \
|
||||
USE_GL_FUNC(glVertex3f) \
|
||||
USE_GL_FUNC(glVertex3fv) \
|
||||
USE_GL_FUNC(glVertex3i) \
|
||||
USE_GL_FUNC(glVertex3iv) \
|
||||
USE_GL_FUNC(glVertex3s) \
|
||||
USE_GL_FUNC(glVertex3sv) \
|
||||
USE_GL_FUNC(glVertex4d) \
|
||||
USE_GL_FUNC(glVertex4dv) \
|
||||
USE_GL_FUNC(glVertex4f) \
|
||||
USE_GL_FUNC(glVertex4fv) \
|
||||
USE_GL_FUNC(glVertex4i) \
|
||||
USE_GL_FUNC(glVertex4iv) \
|
||||
USE_GL_FUNC(glVertex4s) \
|
||||
USE_GL_FUNC(glVertex4sv) \
|
||||
USE_GL_FUNC(glVertexPointer) \
|
||||
USE_GL_FUNC(glViewport) \
|
||||
|
||||
#define WGL_FUNCS_GEN \
|
||||
USE_WGL_FUNC(wglCreateContext) \
|
||||
USE_WGL_FUNC(wglDeleteContext) \
|
||||
|
|
|
@ -834,14 +834,14 @@ extern int num_lock DECLSPEC_HIDDEN;
|
|||
do { \
|
||||
GLint err; \
|
||||
if (!__WINE_IS_DEBUG_ON(_ERR, __wine_dbch___default)) break; \
|
||||
err = glGetError(); \
|
||||
err = gl_info->gl_ops.gl.p_glGetError(); \
|
||||
if (err == GL_NO_ERROR) { \
|
||||
TRACE("%s call ok %s / %d\n", A, __FILE__, __LINE__); \
|
||||
\
|
||||
} else do { \
|
||||
ERR(">>>>>>>>>>>>>>>>> %s (%#x) from %s @ %s / %d\n", \
|
||||
debug_glerror(err), err, A, __FILE__, __LINE__); \
|
||||
err = glGetError(); \
|
||||
err = gl_info->gl_ops.gl.p_glGetError(); \
|
||||
} while (err != GL_NO_ERROR); \
|
||||
} while(0)
|
||||
#else
|
||||
|
@ -2498,8 +2498,9 @@ BOOL is_invalid_op(const struct wined3d_state *state, int stage,
|
|||
void set_tex_op_nvrc(const struct wined3d_gl_info *gl_info, const struct wined3d_state *state,
|
||||
BOOL is_alpha, int stage, enum wined3d_texture_op op, DWORD arg1, DWORD arg2, DWORD arg3,
|
||||
INT texture_idx, DWORD dst) DECLSPEC_HIDDEN;
|
||||
void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords,
|
||||
BOOL transformed, enum wined3d_format_id coordtype, BOOL ffp_can_disable_proj) DECLSPEC_HIDDEN;
|
||||
void set_texture_matrix(const struct wined3d_gl_info *gl_info, const float *smat, DWORD flags,
|
||||
BOOL calculatedCoords, BOOL transformed, enum wined3d_format_id coordtype,
|
||||
BOOL ffp_can_disable_proj) DECLSPEC_HIDDEN;
|
||||
void texture_activate_dimensions(const struct wined3d_texture *texture,
|
||||
const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||
void sampler_texdim(struct wined3d_context *context,
|
||||
|
|
Loading…
Reference in New Issue