Commit 783b3236 authored by Lionel Ulmer's avatar Lionel Ulmer Committed by Alexandre Julliard

Support for device surface locking.

parent 9489f8bd
......@@ -244,6 +244,7 @@ struct IDirect3DDeviceImpl
void (*matrices_updated)(IDirect3DDeviceImpl *This, DWORD matrices);
void (*set_matrices)(IDirect3DDeviceImpl *This, DWORD matrices,
D3DMATRIX *world_mat, D3DMATRIX *view_mat, D3DMATRIX *proj_mat);
void (*flush_to_framebuffer)(IDirect3DDeviceImpl *This, LPCRECT pRect);
STATEBLOCK state_block;
......
......@@ -207,6 +207,11 @@ static void execute(IDirect3DExecuteBufferImpl *This,
ENTER_GL();
if (((IDirect3DDeviceGLImpl *) lpDevice)->state == SURFACE_MEMORY) {
lpDevice->flush_to_framebuffer(lpDevice, NULL);
}
((IDirect3DDeviceGLImpl *) lpDevice)->state = SURFACE_GL;
while (1) {
LPD3DINSTRUCTION current = (LPD3DINSTRUCTION) instr;
BYTE size;
......
......@@ -303,6 +303,8 @@ struct IDirectDrawSurfaceImpl
IDirectDrawSurfaceImpl *mip_main;
int mipmap_level;
LPVOID tex_private;
void (*lock_update_prev)(IDirectDrawSurfaceImpl* This, LPCRECT pRect, DWORD dwFlags);
void (*unlock_update_prev)(IDirectDrawSurfaceImpl* This, LPCRECT pRect);
};
/*****************************************************************************
......
......@@ -95,6 +95,11 @@ typedef enum {
GL_TRANSFORM_VERTEXBUFFER
} GL_TRANSFORM_STATE;
typedef enum {
SURFACE_GL,
SURFACE_MEMORY
} SURFACE_STATE;
typedef struct IDirect3DDeviceGLImpl
{
struct IDirect3DDeviceImpl parent;
......@@ -111,6 +116,9 @@ typedef struct IDirect3DDeviceGLImpl
Display *display;
Drawable drawable;
GLuint unlock_tex;
SURFACE_STATE state, front_state;
} IDirect3DDeviceGLImpl;
/* This is for the OpenGL additions... */
......
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