Commit 1aa50154 authored by Matteo Bruni's avatar Matteo Bruni Committed by Alexandre Julliard

wined3d: Directly use the core version of glTex[Sub]Image3D.

parent 6bcf9e4b
...@@ -684,7 +684,7 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_ ...@@ -684,7 +684,7 @@ static void create_dummy_textures(struct wined3d_device *device, struct wined3d_
gl_info->gl_ops.gl.p_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"); 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)); GL_EXTCALL(glTexImage3D(GL_TEXTURE_3D, 0, GL_RGBA8, 1, 1, 1, 0, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8, &color));
checkGLcall("glTexImage3D"); checkGLcall("glTexImage3D");
} }
......
...@@ -2920,6 +2920,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) ...@@ -2920,6 +2920,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
USE_GL_FUNC(glShaderSource) /* OpenGL 2.0 */ USE_GL_FUNC(glShaderSource) /* OpenGL 2.0 */
USE_GL_FUNC(glStencilFuncSeparate) /* OpenGL 2.0 */ USE_GL_FUNC(glStencilFuncSeparate) /* OpenGL 2.0 */
USE_GL_FUNC(glStencilOpSeparate) /* OpenGL 2.0 */ USE_GL_FUNC(glStencilOpSeparate) /* OpenGL 2.0 */
USE_GL_FUNC(glTexImage3D) /* OpenGL 1.2 */
USE_GL_FUNC(glTexSubImage3D) /* OpenGL 1.2 */
USE_GL_FUNC(glUniform1f) /* OpenGL 2.0 */ USE_GL_FUNC(glUniform1f) /* OpenGL 2.0 */
USE_GL_FUNC(glUniform1fv) /* OpenGL 2.0 */ USE_GL_FUNC(glUniform1fv) /* OpenGL 2.0 */
USE_GL_FUNC(glUniform1i) /* OpenGL 2.0 */ USE_GL_FUNC(glUniform1i) /* OpenGL 2.0 */
...@@ -3027,6 +3029,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) ...@@ -3027,6 +3029,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info)
MAP_GL_FUNCTION(glLinkProgram, glLinkProgramARB); MAP_GL_FUNCTION(glLinkProgram, glLinkProgramARB);
MAP_GL_FUNCTION(glMapBuffer, glMapBufferARB); MAP_GL_FUNCTION(glMapBuffer, glMapBufferARB);
MAP_GL_FUNCTION_CAST(glShaderSource, glShaderSourceARB); MAP_GL_FUNCTION_CAST(glShaderSource, glShaderSourceARB);
MAP_GL_FUNCTION_CAST(glTexImage3D, glTexImage3DEXT);
MAP_GL_FUNCTION(glTexSubImage3D, glTexSubImage3DEXT);
MAP_GL_FUNCTION(glUniform1f, glUniform1fARB); MAP_GL_FUNCTION(glUniform1f, glUniform1fARB);
MAP_GL_FUNCTION(glUniform1fv, glUniform1fvARB); MAP_GL_FUNCTION(glUniform1fv, glUniform1fvARB);
MAP_GL_FUNCTION(glUniform1i, glUniform1iARB); MAP_GL_FUNCTION(glUniform1i, glUniform1iARB);
...@@ -3384,8 +3388,6 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) ...@@ -3384,8 +3388,6 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter)
if (!gl_info->supported[EXT_TEXTURE3D] && gl_version >= MAKEDWORD_VERSION(1, 2)) if (!gl_info->supported[EXT_TEXTURE3D] && gl_version >= MAKEDWORD_VERSION(1, 2))
{ {
TRACE("GL CORE: GL_EXT_texture3D support.\n"); TRACE("GL CORE: GL_EXT_texture3D support.\n");
gl_info->gl_ops.ext.p_glTexImage3DEXT = (void *)gl_info->gl_ops.ext.p_glTexImage3D;
gl_info->gl_ops.ext.p_glTexSubImage3DEXT = gl_info->gl_ops.ext.p_glTexSubImage3D;
gl_info->supported[EXT_TEXTURE3D] = TRUE; gl_info->supported[EXT_TEXTURE3D] = TRUE;
} }
......
...@@ -1277,7 +1277,7 @@ static void texture3d_prepare_texture(struct wined3d_texture *texture, struct wi ...@@ -1277,7 +1277,7 @@ static void texture3d_prepare_texture(struct wined3d_texture *texture, struct wi
volume->flags |= WINED3D_VFLAG_CLIENT_STORAGE; volume->flags |= WINED3D_VFLAG_CLIENT_STORAGE;
} }
GL_EXTCALL(glTexImage3DEXT(GL_TEXTURE_3D, volume->texture_level, GL_EXTCALL(glTexImage3D(GL_TEXTURE_3D, volume->texture_level,
srgb ? format->glGammaInternal : format->glInternal, srgb ? format->glGammaInternal : format->glInternal,
volume->resource.width, volume->resource.height, volume->resource.depth, volume->resource.width, volume->resource.height, volume->resource.depth,
0, format->glFormat, format->glType, mem)); 0, format->glFormat, format->glType, mem));
......
...@@ -109,7 +109,7 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine ...@@ -109,7 +109,7 @@ void wined3d_volume_upload_data(struct wined3d_volume *volume, const struct wine
checkGLcall("glBindBuffer"); checkGLcall("glBindBuffer");
} }
GL_EXTCALL(glTexSubImage3DEXT(GL_TEXTURE_3D, volume->texture_level, 0, 0, 0, GL_EXTCALL(glTexSubImage3D(GL_TEXTURE_3D, volume->texture_level, 0, 0, 0,
width, height, depth, width, height, depth,
format->glFormat, format->glType, mem)); format->glFormat, format->glType, mem));
checkGLcall("glTexSubImage3D"); checkGLcall("glTexSubImage3D");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment