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
9bf04ecd
Commit
9bf04ecd
authored
Nov 17, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Nov 17, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Rename renderUpsideDown to render_offscreen.
parent
459dd11f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
13 deletions
+18
-13
device.c
dlls/wined3d/device.c
+10
-9
drawprim.c
dlls/wined3d/drawprim.c
+7
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-1
No files found.
dlls/wined3d/device.c
View file @
9bf04ecd
...
...
@@ -3484,7 +3484,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case
WINED3DCULL_CW
:
glEnable
(
GL_CULL_FACE
);
checkGLcall
(
"glEnable GL_CULL_FACE"
);
if
(
This
->
render
UpsideDow
n
)
{
if
(
This
->
render
_offscree
n
)
{
glFrontFace
(
GL_CW
);
checkGLcall
(
"glFrontFace GL_CW"
);
}
else
{
...
...
@@ -3496,7 +3496,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_SetRenderState(IWineD3DDevice *iface, W
case
WINED3DCULL_CCW
:
glEnable
(
GL_CULL_FACE
);
checkGLcall
(
"glEnable GL_CULL_FACE"
);
if
(
This
->
render
UpsideDow
n
)
{
if
(
This
->
render
_offscree
n
)
{
glFrontFace
(
GL_CCW
);
checkGLcall
(
"glFrontFace GL_CCW"
);
}
else
{
...
...
@@ -7199,9 +7199,12 @@ static void device_reapply_stateblock(IWineD3DDeviceImpl* This) {
This
->
updateStateBlock
=
oldUpdateStateBlock
;
}
/* Set the device to render to a texture, or not.
* This involves changing renderUpsideDown */
/* Set offscreen rendering. When rendering offscreen the surface will be
* rendered upside down to compensate for the fact that D3D texture coordinates
* are flipped compared to GL texture coordinates. The cullmode is affected by
* this, so it must be updated. To update the cullmode stateblock recording has
* to be temporarily disabled. The new state management code will hopefully
* make this unnecessary */
static
void
device_render_to_texture
(
IWineD3DDeviceImpl
*
This
,
BOOL
isTexture
)
{
DWORD
cullMode
;
...
...
@@ -7214,9 +7217,7 @@ static void device_render_to_texture(IWineD3DDeviceImpl* This, BOOL isTexture) {
This
->
isRecordingState
=
FALSE
;
This
->
updateStateBlock
=
This
->
stateBlock
;
/* Set upside-down rendering, and update the cull mode */
/* The surface must be rendered upside down to cancel the flip produced by glCopyTexImage */
This
->
renderUpsideDown
=
isTexture
;
This
->
render_offscreen
=
isTexture
;
This
->
last_was_rhw
=
FALSE
;
This
->
proj_valid
=
FALSE
;
IWineD3DDevice_GetRenderState
((
IWineD3DDevice
*
)
This
,
WINED3DRS_CULLMODE
,
&
cullMode
);
...
...
@@ -7501,7 +7502,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_ActiveRender(IWineD3DDevice* iface,
implicitSwapchainImpl
->
render_ctx
=
newContext
->
context
;
}
}
else
{
/* Same context, but update render
UpsideDow
n and cull mode */
/* Same context, but update render
_offscree
n and cull mode */
device_render_to_texture
(
This
,
TRUE
);
}
...
...
dlls/wined3d/drawprim.c
View file @
9bf04ecd
...
...
@@ -195,7 +195,9 @@ void d3ddevice_set_ortho(IWineD3DDeviceImpl *This) {
a pixel (See comment above glTranslate below) */
glTranslatef
(
0
.
375
,
0
.
375
,
0
);
checkGLcall
(
"glTranslatef(0.375, 0.375, 0)"
);
if
(
This
->
renderUpsideDown
)
{
/* D3D texture coordinates are flipped compared to OpenGL ones, so
* render everything upside down when rendering offscreen. */
if
(
This
->
render_offscreen
)
{
glMultMatrixf
(
invymat
);
checkGLcall
(
"glMultMatrixf(invymat)"
);
}
...
...
@@ -301,7 +303,9 @@ static void primitiveInitState(
glTranslatef
(
0
.
9
/
This
->
stateBlock
->
viewport
.
Width
,
-
0
.
9
/
This
->
stateBlock
->
viewport
.
Height
,
0
);
checkGLcall
(
"glTranslatef (0.9 / width, -0.9 / height, 0)"
);
if
(
This
->
renderUpsideDown
)
{
/* D3D texture coordinates are flipped compared to OpenGL ones, so
* render everything upside down when rendering offscreen. */
if
(
This
->
render_offscreen
)
{
glMultMatrixf
(
invymat
);
checkGLcall
(
"glMultMatrixf(invymat)"
);
}
...
...
@@ -311,7 +315,7 @@ static void primitiveInitState(
/* Vertex Shader output is already transformed, so set up identity matrices */
if
(
useVS
)
{
This
->
posFixup
[
1
]
=
This
->
render
UpsideDow
n
?
-
1
.
0
:
1
.
0
;
This
->
posFixup
[
1
]
=
This
->
render
_offscree
n
?
-
1
.
0
:
1
.
0
;
This
->
posFixup
[
2
]
=
0
.
9
/
This
->
stateBlock
->
viewport
.
Width
;
This
->
posFixup
[
3
]
=
-
0
.
9
/
This
->
stateBlock
->
viewport
.
Height
;
}
...
...
dlls/wined3d/wined3d_private.h
View file @
9bf04ecd
...
...
@@ -545,7 +545,7 @@ typedef struct IWineD3DDeviceImpl
UINT
currentPalette
;
/* For rendering to a texture using glCopyTexImage */
BOOL
render
UpsideDow
n
;
BOOL
render
_offscree
n
;
/* Cursor management */
BOOL
bCursorVisible
;
...
...
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