Changelog: - do not forget to set the 'initial_upload_done' flag (to have better performance) - better handling of the 'initial' flag for frame-buffer flushes -- Lionel Ulmer - http://www.bbrox.org/
--- dlls/ddraw_CVS/d3ddevice/mesa.c Sun Jul 13 19:16:50 2003 +++ dlls/ddraw/d3ddevice/mesa.c Sun Jul 13 19:19:58 2003 @@ -107,6 +107,7 @@ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); } else { glBindTexture(GL_TEXTURE_2D, gl_d3d_dev->unlock_tex); + *initial = FALSE; } if (d3d_dev->tex_mat_is_identity[0] == FALSE) { glMatrixMode(GL_TEXTURE); @@ -2821,7 +2822,7 @@ GLenum prev_draw; WINE_GL_BUFFER_TYPE src_buffer_type; IDirect3DDeviceGLImpl *gl_d3d_dev = (IDirect3DDeviceGLImpl *) This->d3ddevice; - BOOLEAN initial = FALSE; + BOOLEAN initial; DWORD opt_bitmap; int x, y; @@ -2941,7 +2942,7 @@ int width, height; GLenum prev_draw; IDirect3DDeviceGLImpl *gl_d3d_dev = (IDirect3DDeviceGLImpl *) This->d3ddevice; - BOOLEAN initial = FALSE; + BOOLEAN initial; DWORD opt_bitmap; int x, y; double x_stretch, y_stretch; @@ -3514,7 +3515,7 @@ RECT loc_rect; IDirect3DDeviceGLImpl* gl_d3d_dev = (IDirect3DDeviceGLImpl*) d3d_dev; int x, y; - BOOLEAN initial = FALSE; + BOOLEAN initial; DWORD opt_bitmap; /* Note : no need here to lock the 'device critical section' as we are already protected by --- dlls/ddraw_CVS/d3dtexture.c Fri Jun 6 21:24:12 2003 +++ dlls/ddraw/d3dtexture.c Sun Jul 13 19:10:54 2003 @@ -270,6 +270,7 @@ upload_surface_to_tex_memory(NULL, 0, 0, &(gl_surf_ptr->surface_ptr)); upload_surface_to_tex_memory_release(); gl_surf_ptr->dirty_flag = SURFACE_MEMORY; + gl_surf_ptr->initial_upload_done = TRUE; } else { ERR("Problem for upload of texture %d (level = %d / initial done = %d).\n", gl_surf_ptr->tex_name, surf_ptr->mipmap_level, gl_surf_ptr->initial_upload_done); @@ -393,6 +394,7 @@ upload_surface_to_tex_memory(NULL, 0, 0, &(gl_surf_ptr->surface_ptr)); upload_surface_to_tex_memory_release(); gl_surf_ptr->dirty_flag = SURFACE_MEMORY; + gl_surf_ptr->initial_upload_done = TRUE; } else { glBindTexture(GL_TEXTURE_2D, cur_tex); LEAVE_GL(); @@ -408,6 +410,7 @@ upload_surface_to_tex_memory(NULL, 0, 0, &(gl_surf_ptr->surface_ptr)); upload_surface_to_tex_memory_release(); gl_surf_ptr->dirty_flag = SURFACE_MEMORY; + gl_surf_ptr->initial_upload_done = TRUE; } else { glBindTexture(GL_TEXTURE_2D, cur_tex); LEAVE_GL();