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
4863daf0
Commit
4863daf0
authored
Jan 02, 2008
by
H. Verbeet
Committed by
Alexandre Julliard
Jan 03, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Bind the surface texture in LoadLocation().
parent
6cab4c80
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
surface.c
dlls/wined3d/surface.c
+12
-6
No files found.
dlls/wined3d/surface.c
View file @
4863daf0
...
...
@@ -47,16 +47,14 @@ static void surface_bind_and_dirtify(IWineD3DSurfaceImpl *This) {
IWineD3DSurface_BindTexture
((
IWineD3DSurface
*
)
This
);
}
/* This call just downloads data, the caller is responsible for activating the
* right context and binding the correct texture. */
static
void
surface_download_data
(
IWineD3DSurfaceImpl
*
This
)
{
IWineD3DDeviceImpl
*
myDevice
=
This
->
resource
.
wineD3DDevice
;
if
(
0
==
This
->
glDescription
.
textureName
)
{
ERR
(
"Surface does not have a texture, but SFLAG_INTEXTURE is set
\n
"
);
return
;
}
ActivateContext
(
myDevice
,
myDevice
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
if
(
This
->
Flags
&
SFLAG_CONVERTED
)
{
FIXME
(
"Read back converted textures unsupported, format=%s
\n
"
,
debug_d3dformat
(
This
->
resource
.
format
));
return
;
...
...
@@ -64,8 +62,6 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
ENTER_GL
();
surface_bind_and_dirtify
(
This
);
if
(
This
->
resource
.
format
==
WINED3DFMT_DXT1
||
This
->
resource
.
format
==
WINED3DFMT_DXT2
||
This
->
resource
.
format
==
WINED3DFMT_DXT3
||
This
->
resource
.
format
==
WINED3DFMT_DXT4
||
This
->
resource
.
format
==
WINED3DFMT_DXT5
)
{
...
...
@@ -194,6 +190,8 @@ static void surface_download_data(IWineD3DSurfaceImpl *This) {
This
->
Flags
|=
SFLAG_INSYSMEM
;
}
/* This call just uploads data, the caller is responsible for activating the
* right context and binding the correct texture. */
static
void
surface_upload_data
(
IWineD3DSurfaceImpl
*
This
,
GLenum
internal
,
GLsizei
width
,
GLsizei
height
,
GLenum
format
,
GLenum
type
,
const
GLvoid
*
data
)
{
if
(
This
->
resource
.
format
==
WINED3DFMT_DXT1
||
This
->
resource
.
format
==
WINED3DFMT_DXT2
||
This
->
resource
.
format
==
WINED3DFMT_DXT3
||
...
...
@@ -250,6 +248,8 @@ static void surface_upload_data(IWineD3DSurfaceImpl *This, GLenum internal, GLsi
}
}
/* This call just allocates the texture, the caller is responsible for
* activating the right context and binding the correct texture. */
static
void
surface_allocate_surface
(
IWineD3DSurfaceImpl
*
This
,
GLenum
internal
,
GLsizei
width
,
GLsizei
height
,
GLenum
format
,
GLenum
type
)
{
BOOL
enable_client_storage
=
FALSE
;
BYTE
*
mem
=
NULL
;
...
...
@@ -3792,6 +3792,9 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
/* Download the surface to system memory */
if
(
This
->
Flags
&
SFLAG_INTEXTURE
)
{
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
surface_bind_and_dirtify
(
This
);
surface_download_data
(
This
);
}
else
{
read_from_framebuffer
(
This
,
rect
,
...
...
@@ -3807,6 +3810,9 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadLocation(IWineD3DSurface *iface, D
}
else
/* if(flag == SFLAG_INTEXTURE) */
{
d3dfmt_get_conv
(
This
,
TRUE
/* We need color keying */
,
TRUE
/* We will use textures */
,
&
format
,
&
internal
,
&
type
,
&
convert
,
&
bpp
,
This
->
srgb
);
ActivateContext
(
device
,
device
->
lastActiveRenderTarget
,
CTXUSAGE_RESOURCELOAD
);
surface_bind_and_dirtify
(
This
);
if
(
This
->
Flags
&
SFLAG_INDRAWABLE
)
{
GLint
prevRead
;
...
...
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