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
1c9f1f8d
Commit
1c9f1f8d
authored
Apr 23, 2008
by
Stefan Dösinger
Committed by
Alexandre Julliard
Apr 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Support framebuffer reading from texture_rectangle sources.
parent
e3bd5b6d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
8 deletions
+21
-8
device.c
dlls/wined3d/device.c
+1
-1
surface.c
dlls/wined3d/surface.c
+19
-7
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
No files found.
dlls/wined3d/device.c
View file @
1c9f1f8d
...
...
@@ -663,7 +663,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_CreateSurface(IWineD3DDevice *iface, U
object
->
glDescription
.
level
=
Level
;
/* Flags */
object
->
Flags
=
0
;
object
->
Flags
=
SFLAG_NORMCOORD
;
/* Default to normalized coords */
object
->
Flags
|=
Discard
?
SFLAG_DISCARD
:
0
;
object
->
Flags
|=
(
WINED3DFMT_D16_LOCKABLE
==
Format
)
?
SFLAG_LOCKABLE
:
0
;
object
->
Flags
|=
Lockable
?
SFLAG_LOCKABLE
:
0
;
...
...
dlls/wined3d/surface.c
View file @
1c9f1f8d
...
...
@@ -626,6 +626,11 @@ void WINAPI IWineD3DSurfaceImpl_SetGlTextureDesc(IWineD3DSurface *iface, UINT te
IWineD3DSurface_ModifyLocation
(
iface
,
SFLAG_INTEXTURE
,
FALSE
);
IWineD3DSurface_AddDirtyRect
(
iface
,
NULL
);
}
if
(
target
==
GL_TEXTURE_RECTANGLE_ARB
&&
This
->
glDescription
.
target
!=
target
)
{
This
->
Flags
&=
~
SFLAG_NORMCOORD
;
}
else
if
(
This
->
glDescription
.
target
==
GL_TEXTURE_RECTANGLE_ARB
&&
target
!=
GL_TEXTURE_RECTANGLE_ARB
)
{
This
->
Flags
|=
SFLAG_NORMCOORD
;
}
This
->
glDescription
.
textureName
=
textureName
;
This
->
glDescription
.
target
=
target
;
This
->
Flags
&=
~
SFLAG_ALLOCATED
;
...
...
@@ -2845,15 +2850,22 @@ static inline void fb_copy_to_texture_hwstretch(IWineD3DSurfaceImpl *This, IWine
}
checkGLcall
(
"glEnd and previous"
);
left
=
(
float
)
srect
->
x1
/
(
float
)
Src
->
pow2Width
;
right
=
(
float
)
srect
->
x2
/
(
float
)
Src
->
pow2Width
;
left
=
srect
->
x1
;
right
=
srect
->
x2
;
if
(
upsidedown
)
{
top
=
(
float
)
(
Src
->
currentDesc
.
Height
-
srect
->
y1
)
/
(
float
)
Src
->
pow2Height
;
bottom
=
(
float
)
(
Src
->
currentDesc
.
Height
-
srect
->
y2
)
/
(
float
)
Src
->
pow2Height
;
top
=
Src
->
currentDesc
.
Height
-
srect
->
y1
;
bottom
=
Src
->
currentDesc
.
Height
-
srect
->
y2
;
}
else
{
top
=
(
float
)
(
Src
->
currentDesc
.
Height
-
srect
->
y2
)
/
(
float
)
Src
->
pow2Height
;
bottom
=
(
float
)
(
Src
->
currentDesc
.
Height
-
srect
->
y1
)
/
(
float
)
Src
->
pow2Height
;
top
=
Src
->
currentDesc
.
Height
-
srect
->
y2
;
bottom
=
Src
->
currentDesc
.
Height
-
srect
->
y1
;
}
if
(
Src
->
Flags
&
SFLAG_NORMCOORD
)
{
left
/=
Src
->
pow2Width
;
right
/=
Src
->
pow2Width
;
top
/=
Src
->
pow2Height
;
bottom
/=
Src
->
pow2Height
;
}
/* draw the source texture stretched and upside down. The correct surface is bound already */
...
...
@@ -3774,7 +3786,7 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_PrivateSetup(IWineD3DSurface *iface) {
This
->
glDescription
.
target
=
GL_TEXTURE_RECTANGLE_ARB
;
This
->
pow2Width
=
This
->
currentDesc
.
Width
;
This
->
pow2Height
=
This
->
currentDesc
.
Height
;
This
->
Flags
&=
~
SFLAG_NONPOW2
;
This
->
Flags
&=
~
(
SFLAG_NONPOW2
|
SFLAG_NORMCOORD
)
;
}
/* No oversize, gl rect is the full texture size */
...
...
dlls/wined3d/wined3d_private.h
View file @
1c9f1f8d
...
...
@@ -1365,6 +1365,7 @@ void get_drawable_size_fbo(IWineD3DSurfaceImpl *This, UINT *width, UINT *height)
#define SFLAG_CLIENT 0x00010000
/* GL_APPLE_client_storage is used on that texture */
#define SFLAG_ALLOCATED 0x00020000
/* A gl texture is allocated for this surface */
#define SFLAG_PBO 0x00040000
/* Has a PBO attached for speeding up data transfers for dynamically locked surfaces */
#define SFLAG_NORMCOORD 0x00080000
/* Set if the GL texture coords are normalized(non-texture rectangle) */
/* In some conditions the surface memory must not be freed:
* SFLAG_OVERSIZE: Not all data can be kept in GL
...
...
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