Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
4647cbb6
Commit
4647cbb6
authored
Aug 09, 2007
by
Roderick Colenbrander
Committed by
Alexandre Julliard
Aug 09, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Better pixelformat selection code.
parent
dee2fc09
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
0 deletions
+17
-0
context.c
dlls/wined3d/context.c
+13
-0
utils.c
dlls/wined3d/utils.c
+0
-0
wined3d_private.h
dlls/wined3d/wined3d_private.h
+4
-0
No files found.
dlls/wined3d/context.c
View file @
4647cbb6
...
...
@@ -154,6 +154,9 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
}
else
{
PIXELFORMATDESCRIPTOR
pfd
;
int
iPixelFormat
;
short
red
,
green
,
blue
,
alpha
;
short
colorBits
;
short
depthBits
,
stencilBits
;
hdc
=
GetDC
(
win_handle
);
if
(
hdc
==
NULL
)
{
...
...
@@ -173,6 +176,16 @@ WineD3DContext *CreateContext(IWineD3DDeviceImpl *This, IWineD3DSurfaceImpl *tar
pfd
.
cStencilBits
=
8
;
pfd
.
iLayerType
=
PFD_MAIN_PLANE
;
/* Try to match the colorBits of the d3d format */
if
(
getColorBits
(
target
->
resource
.
format
,
&
red
,
&
green
,
&
blue
,
&
alpha
,
&
colorBits
))
pfd
.
cColorBits
=
colorBits
;
/* TODO: get the depth/stencil format from auto depth stencil format */
if
(
getDepthStencilBits
(
WINED3DFMT_D24S8
,
&
depthBits
,
&
stencilBits
))
{
pfd
.
cDepthBits
=
depthBits
;
pfd
.
cStencilBits
=
stencilBits
;
}
iPixelFormat
=
ChoosePixelFormat
(
hdc
,
&
pfd
);
if
(
!
iPixelFormat
)
{
/* If this happens something is very wrong as ChoosePixelFormat barely fails */
...
...
dlls/wined3d/utils.c
View file @
4647cbb6
This diff is collapsed.
Click to expand it.
dlls/wined3d/wined3d_private.h
View file @
4647cbb6
...
...
@@ -1479,6 +1479,9 @@ void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords)
void
surface_set_compatible_renderbuffer
(
IWineD3DSurface
*
iface
,
unsigned
int
width
,
unsigned
int
height
);
GLenum
surface_get_gl_buffer
(
IWineD3DSurface
*
iface
,
IWineD3DSwapChain
*
swapchain
);
BOOL
getColorBits
(
WINED3DFORMAT
fmt
,
short
*
redSize
,
short
*
greenSize
,
short
*
blueSize
,
short
*
alphaSize
,
short
*
totalSize
);
BOOL
getDepthStencilBits
(
WINED3DFORMAT
fmt
,
short
*
depthSize
,
short
*
stencilSize
);
/* Math utils */
void
multiply_matrix
(
WINED3DMATRIX
*
dest
,
const
WINED3DMATRIX
*
src1
,
const
WINED3DMATRIX
*
src2
);
...
...
@@ -2042,6 +2045,7 @@ typedef struct {
WINED3DFORMAT
format
;
DWORD
alphaMask
,
redMask
,
greenMask
,
blueMask
;
UINT
bpp
;
short
depthSize
,
stencilSize
;
BOOL
isFourcc
;
}
StaticPixelFormatDesc
;
...
...
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