Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
2f724834
Commit
2f724834
authored
May 13, 2006
by
Stefan Dösinger
Committed by
Alexandre Julliard
May 15, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Implement IWineGDISurface.
parent
9abdac6a
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
1 deletion
+85
-1
Makefile.in
dlls/wined3d/Makefile.in
+1
-0
device.c
dlls/wined3d/device.c
+24
-1
surface_gdi.c
dlls/wined3d/surface_gdi.c
+0
-0
utils.c
dlls/wined3d/utils.c
+13
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+47
-0
No files found.
dlls/wined3d/Makefile.in
View file @
2f724834
...
...
@@ -22,6 +22,7 @@ C_SRCS = \
resource.c
\
stateblock.c
\
surface.c
\
surface_gdi.c
\
swapchain.c
\
texture.c
\
utils.c
\
...
...
dlls/wined3d/device.c
View file @
2f724834
...
...
@@ -761,7 +761,30 @@ HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, UINT Wid
TRACE
(
"(%p) : w(%d) h(%d) fmt(%d,%s) lockable(%d) surf@%p, surfmem@%p, %d bytes
\n
"
,
This
,
Width
,
Height
,
Format
,
debug_d3dformat
(
Format
),
(
WINED3DFMT_D16_LOCKABLE
==
Format
),
*
ppSurface
,
object
->
resource
.
allocatedMemory
,
object
->
resource
.
size
);
return
WINED3D_OK
;
/* Store the DirectDraw primary surface. This is the first rendertarget surface created */
if
(
(
Usage
&
WINED3DUSAGE_RENDERTARGET
)
&&
(
!
This
->
ddraw_primary
)
)
This
->
ddraw_primary
=
(
IWineD3DSurface
*
)
object
;
/* Look at the implementation and set the correct Vtable */
switch
(
Impl
)
{
case
SURFACE_OPENGL
:
/* Nothing to do, it's set already */
break
;
case
SURFACE_GDI
:
object
->
lpVtbl
=
&
IWineGDISurface_Vtbl
;
break
;
default:
/* To be sure to catch this */
ERR
(
"Unknown requested surface implementation %d!
\n
"
,
Impl
);
IWineD3DSurface_Release
((
IWineD3DSurface
*
)
object
);
return
WINED3DERR_INVALIDCALL
;
}
/* Call the private setup routine */
return
IWineD3DSurface_PrivateSetup
(
(
IWineD3DSurface
*
)
object
);
}
...
...
dlls/wined3d/surface_gdi.c
0 → 100644
View file @
2f724834
This diff is collapsed.
Click to expand it.
dlls/wined3d/utils.c
View file @
2f724834
...
...
@@ -2292,3 +2292,16 @@ DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) {
return
size
;
}
BOOL
isFourcc
(
WINED3DFORMAT
fmt
)
{
return
(
fmt
==
WINED3DFMT_UYVY
)
||
(
fmt
==
WINED3DFMT_YUY2
)
||
(
fmt
==
WINED3DFMT_DXT1
)
||
(
fmt
==
WINED3DFMT_DXT2
)
||
(
fmt
==
WINED3DFMT_DXT3
)
||
(
fmt
==
WINED3DFMT_DXT4
)
||
(
fmt
==
WINED3DFMT_DXT5
)
||
(
fmt
==
WINED3DFMT_MULTI2_ARGB
)
||
(
fmt
==
WINED3DFMT_G8R8_G8B8
)
||
(
fmt
==
WINED3DFMT_R8G8_B8G8
);
}
dlls/wined3d/wined3d_private.h
View file @
2f724834
...
...
@@ -508,6 +508,7 @@ typedef struct IWineD3DDeviceImpl
UINT
alphafunc
;
UINT
stencilfunc
;
BOOL
texture_shader_active
;
/* TODO: Confirm use is correct */
BOOL
last_was_notclipped
;
/* State block related */
BOOL
isRecordingState
;
...
...
@@ -564,6 +565,7 @@ typedef struct IWineD3DDeviceImpl
/* DirectDraw stuff */
HWND
ddraw_window
;
IWineD3DSurface
*
ddraw_primary
;
}
IWineD3DDeviceImpl
;
...
...
@@ -588,6 +590,9 @@ typedef struct PrivateData
DWORD
size
;
}
PrivateData
;
/* OpenGL ortho matrix setup */
void
d3ddevice_set_ortho
(
IWineD3DDeviceImpl
*
This
,
BOOL
dontclip
);
/*****************************************************************************
* IWineD3DResource implementation structure
*/
...
...
@@ -862,6 +867,47 @@ struct IWineD3DSurfaceImpl
};
extern
const
IWineD3DSurfaceVtbl
IWineD3DSurface_Vtbl
;
extern
const
IWineD3DSurfaceVtbl
IWineGDISurface_Vtbl
;
/* Predeclare the shared Surface functions */
HRESULT
WINAPI
IWineD3DSurfaceImpl_QueryInterface
(
IWineD3DSurface
*
iface
,
REFIID
riid
,
LPVOID
*
ppobj
);
ULONG
WINAPI
IWineD3DSurfaceImpl_AddRef
(
IWineD3DSurface
*
iface
);
ULONG
WINAPI
IWineD3DSurfaceImpl_Release
(
IWineD3DSurface
*
iface
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetParent
(
IWineD3DSurface
*
iface
,
IUnknown
**
pParent
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetDevice
(
IWineD3DSurface
*
iface
,
IWineD3DDevice
**
ppDevice
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
CONST
void
*
pData
,
DWORD
SizeOfData
,
DWORD
Flags
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetPrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
,
void
*
pData
,
DWORD
*
pSizeOfData
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_FreePrivateData
(
IWineD3DSurface
*
iface
,
REFGUID
refguid
);
DWORD
WINAPI
IWineD3DSurfaceImpl_SetPriority
(
IWineD3DSurface
*
iface
,
DWORD
PriorityNew
);
DWORD
WINAPI
IWineD3DSurfaceImpl_GetPriority
(
IWineD3DSurface
*
iface
);
void
WINAPI
IWineD3DSurfaceImpl_PreLoad
(
IWineD3DSurface
*
iface
);
WINED3DRESOURCETYPE
WINAPI
IWineD3DSurfaceImpl_GetType
(
IWineD3DSurface
*
iface
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetContainerParent
(
IWineD3DSurface
*
iface
,
IUnknown
**
ppContainerParent
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetContainer
(
IWineD3DSurface
*
iface
,
REFIID
riid
,
void
**
ppContainer
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetDesc
(
IWineD3DSurface
*
iface
,
WINED3DSURFACE_DESC
*
pDesc
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetBltStatus
(
IWineD3DSurface
*
iface
,
DWORD
Flags
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetFlipStatus
(
IWineD3DSurface
*
iface
,
DWORD
Flags
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_IsLost
(
IWineD3DSurface
*
iface
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_Restore
(
IWineD3DSurface
*
iface
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetPixelFormat
(
IWineD3DSurface
*
iface
,
WINED3DFORMAT
Format
,
BYTE
*
Surface
,
DWORD
Size
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetPalette
(
IWineD3DSurface
*
iface
,
IWineD3DPalette
**
Pal
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetPalette
(
IWineD3DSurface
*
iface
,
IWineD3DPalette
*
Pal
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetColorKey
(
IWineD3DSurface
*
iface
,
DWORD
Flags
,
DDCOLORKEY
*
CKey
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_CleanDirtyRect
(
IWineD3DSurface
*
iface
);
extern
HRESULT
WINAPI
IWineD3DSurfaceImpl_AddDirtyRect
(
IWineD3DSurface
*
iface
,
CONST
RECT
*
pDirtyRect
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetContainer
(
IWineD3DSurface
*
iface
,
IWineD3DBase
*
container
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetPBufferState
(
IWineD3DSurface
*
iface
,
BOOL
inPBuffer
,
BOOL
inTexture
);
void
WINAPI
IWineD3DSurfaceImpl_SetGlTextureDesc
(
IWineD3DSurface
*
iface
,
UINT
textureName
,
int
target
);
void
WINAPI
IWineD3DSurfaceImpl_GetGlDesc
(
IWineD3DSurface
*
iface
,
glDescriptor
**
glDescription
);
const
void
*
WINAPI
IWineD3DSurfaceImpl_GetData
(
IWineD3DSurface
*
iface
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetFormat
(
IWineD3DSurface
*
iface
,
WINED3DFORMAT
format
);
HRESULT
WINAPI
IWineGDISurfaceImpl_Blt
(
IWineD3DSurface
*
iface
,
RECT
*
DestRect
,
IWineD3DSurface
*
SrcSurface
,
RECT
*
SrcRect
,
DWORD
Flags
,
DDBLTFX
*
DDBltFx
);
HRESULT
WINAPI
IWineGDISurfaceImpl_BltFast
(
IWineD3DSurface
*
iface
,
DWORD
dstx
,
DWORD
dsty
,
IWineD3DSurface
*
Source
,
RECT
*
rsrc
,
DWORD
trans
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetPalette
(
IWineD3DSurface
*
iface
,
IWineD3DPalette
*
Pal
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_GetDC
(
IWineD3DSurface
*
iface
,
HDC
*
pHDC
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_ReleaseDC
(
IWineD3DSurface
*
iface
,
HDC
hDC
);
DWORD
WINAPI
IWineD3DSurfaceImpl_GetPitch
(
IWineD3DSurface
*
iface
);
HRESULT
WINAPI
IWineD3DSurfaceImpl_RealizePalette
(
IWineD3DSurface
*
iface
);
/* Surface flags: */
#define SFLAG_OVERSIZE 0x0001
/* Surface is bigger than gl size, blts only */
...
...
@@ -1421,5 +1467,6 @@ LONG get_bitmask_red(WINED3DFORMAT fmt);
LONG
get_bitmask_green
(
WINED3DFORMAT
fmt
);
LONG
get_bitmask_blue
(
WINED3DFORMAT
fmt
);
LONG
get_bitmask_alpha
(
WINED3DFORMAT
fmt
);
BOOL
isFourcc
(
WINED3DFORMAT
fmt
);
#endif
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment