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
629d81b1
Commit
629d81b1
authored
Jan 20, 2011
by
Henri Verbeet
Committed by
Alexandre Julliard
Jan 21, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Remove IWineD3DSurface::BindTexture() from the public interface.
parent
4454770c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
53 additions
and
69 deletions
+53
-69
device.c
dlls/wined3d/device.c
+1
-1
surface.c
dlls/wined3d/surface.c
+51
-59
surface_gdi.c
dlls/wined3d/surface_gdi.c
+0
-6
wined3d_private.h
dlls/wined3d/wined3d_private.h
+1
-0
wined3d.idl
include/wine/wined3d.idl
+0
-3
No files found.
dlls/wined3d/device.c
View file @
629d81b1
...
...
@@ -5462,7 +5462,7 @@ static HRESULT WINAPI IWineD3DDeviceImpl_UpdateSurface(IWineD3DDevice *iface,
/* Make sure the surface is loaded and up to date */
surface_internal_preload
(
dst_impl
,
SRGB_RGB
);
IWineD3DSurface_BindTexture
(
dst_surface
,
FALSE
);
surface_bind
(
dst_impl
,
FALSE
);
src_w
=
src_impl
->
currentDesc
.
Width
;
src_h
=
src_impl
->
currentDesc
.
Height
;
...
...
dlls/wined3d/surface.c
View file @
629d81b1
...
...
@@ -510,6 +510,56 @@ void surface_set_texture_target(IWineD3DSurfaceImpl *surface, GLenum target)
}
/* Context activation is done by the caller. */
void
surface_bind
(
IWineD3DSurfaceImpl
*
surface
,
BOOL
srgb
)
{
TRACE
(
"surface %p, srgb %#x.
\n
"
,
surface
,
srgb
);
if
(
surface
->
container
.
type
==
WINED3D_CONTAINER_TEXTURE
)
{
IWineD3DBaseTextureImpl
*
texture
=
surface
->
container
.
u
.
texture
;
TRACE
(
"Passing to container (%p).
\n
"
,
texture
);
texture
->
baseTexture
.
texture_ops
->
texture_bind
(
texture
,
srgb
);
}
else
{
GLuint
*
name
=
srgb
?
&
surface
->
texture_name_srgb
:
&
surface
->
texture_name
;
if
(
surface
->
texture_level
)
{
ERR
(
"Standalone surface %p is non-zero texture level %u.
\n
"
,
surface
,
surface
->
texture_level
);
}
ENTER_GL
();
if
(
!*
name
)
{
glGenTextures
(
1
,
name
);
checkGLcall
(
"glGenTextures"
);
TRACE
(
"Surface %p given name %u.
\n
"
,
surface
,
*
name
);
glBindTexture
(
surface
->
texture_target
,
*
name
);
checkGLcall
(
"glBindTexture"
);
glTexParameteri
(
surface
->
texture_target
,
GL_TEXTURE_WRAP_S
,
GL_CLAMP_TO_EDGE
);
glTexParameteri
(
surface
->
texture_target
,
GL_TEXTURE_WRAP_T
,
GL_CLAMP_TO_EDGE
);
glTexParameteri
(
surface
->
texture_target
,
GL_TEXTURE_WRAP_R
,
GL_CLAMP_TO_EDGE
);
glTexParameteri
(
surface
->
texture_target
,
GL_TEXTURE_MIN_FILTER
,
GL_NEAREST
);
glTexParameteri
(
surface
->
texture_target
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
checkGLcall
(
"glTexParameteri"
);
}
else
{
glBindTexture
(
surface
->
texture_target
,
*
name
);
checkGLcall
(
"glBindTexture"
);
}
LEAVE_GL
();
}
}
/* Context activation is done by the caller. */
static
void
surface_bind_and_dirtify
(
IWineD3DSurfaceImpl
*
This
,
BOOL
srgb
)
{
DWORD
active_sampler
;
...
...
@@ -534,7 +584,7 @@ static void surface_bind_and_dirtify(IWineD3DSurfaceImpl *This, BOOL srgb) {
{
IWineD3DDeviceImpl_MarkStateDirty
(
This
->
resource
.
device
,
STATE_SAMPLER
(
active_sampler
));
}
IWineD3DSurface_BindTexture
((
IWineD3DSurface
*
)
This
,
srgb
);
surface_bind
(
This
,
srgb
);
}
/* This function checks if the primary render target uses the 8bit paletted format. */
...
...
@@ -2494,63 +2544,6 @@ static HRESULT WINAPI IWineD3DSurfaceImpl_LoadTexture(IWineD3DSurface *iface, BO
return
WINED3D_OK
;
}
/* Context activation is done by the caller. */
static
void
WINAPI
IWineD3DSurfaceImpl_BindTexture
(
IWineD3DSurface
*
iface
,
BOOL
srgb
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
TRACE
(
"iface %p, srgb %#x.
\n
"
,
iface
,
srgb
);
if
(
This
->
container
.
type
==
WINED3D_CONTAINER_TEXTURE
)
{
IWineD3DBaseTextureImpl
*
texture
=
This
->
container
.
u
.
texture
;
TRACE
(
"Passing to container (%p).
\n
"
,
texture
);
texture
->
baseTexture
.
texture_ops
->
texture_bind
(
texture
,
srgb
);
}
else
{
GLuint
*
name
;
TRACE
(
"(%p) : Binding surface
\n
"
,
This
);
name
=
srgb
?
&
This
->
texture_name_srgb
:
&
This
->
texture_name
;
ENTER_GL
();
if
(
!
This
->
texture_level
)
{
if
(
!*
name
)
{
glGenTextures
(
1
,
name
);
checkGLcall
(
"glGenTextures"
);
TRACE
(
"Surface %p given name %d
\n
"
,
This
,
*
name
);
glBindTexture
(
This
->
texture_target
,
*
name
);
checkGLcall
(
"glBindTexture"
);
glTexParameteri
(
This
->
texture_target
,
GL_TEXTURE_WRAP_S
,
GL_CLAMP_TO_EDGE
);
checkGLcall
(
"glTexParameteri(dimension, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE)"
);
glTexParameteri
(
This
->
texture_target
,
GL_TEXTURE_WRAP_T
,
GL_CLAMP_TO_EDGE
);
checkGLcall
(
"glTexParameteri(dimension, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE)"
);
glTexParameteri
(
This
->
texture_target
,
GL_TEXTURE_WRAP_R
,
GL_CLAMP_TO_EDGE
);
checkGLcall
(
"glTexParameteri(dimension, GL_TEXTURE_WRAP_R, GL_CLAMP_TO_EDGE)"
);
glTexParameteri
(
This
->
texture_target
,
GL_TEXTURE_MIN_FILTER
,
GL_NEAREST
);
checkGLcall
(
"glTexParameteri(dimension, GL_TEXTURE_MIN_FILTER, GL_NEAREST)"
);
glTexParameteri
(
This
->
texture_target
,
GL_TEXTURE_MAG_FILTER
,
GL_NEAREST
);
checkGLcall
(
"glTexParameteri(dimension, GL_TEXTURE_MAG_FILTER, GL_NEAREST)"
);
}
/* This is where we should be reducing the amount of GLMemoryUsed */
}
else
if
(
*
name
)
{
/* Mipmap surfaces should have a base texture container */
ERR
(
"Mipmap surface has a glTexture bound to it!
\n
"
);
}
glBindTexture
(
This
->
texture_target
,
*
name
);
checkGLcall
(
"glBindTexture"
);
LEAVE_GL
();
}
}
static
HRESULT
WINAPI
IWineD3DSurfaceImpl_SetFormat
(
IWineD3DSurface
*
iface
,
enum
wined3d_format_id
format
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
...
...
@@ -4722,7 +4715,6 @@ const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl =
IWineD3DBaseSurfaceImpl_GetClipper
,
/* Internal use: */
IWineD3DSurfaceImpl_LoadTexture
,
IWineD3DSurfaceImpl_BindTexture
,
IWineD3DBaseSurfaceImpl_GetData
,
IWineD3DSurfaceImpl_SetFormat
,
IWineD3DSurfaceImpl_PrivateSetup
,
...
...
dlls/wined3d/surface_gdi.c
View file @
629d81b1
...
...
@@ -209,11 +209,6 @@ IWineGDISurfaceImpl_LoadTexture(IWineD3DSurface *iface, BOOL srgb_mode)
return
WINED3DERR_INVALIDCALL
;
}
static
void
WINAPI
IWineGDISurfaceImpl_BindTexture
(
IWineD3DSurface
*
iface
,
BOOL
srgb
)
{
ERR
(
"Not supported.
\n
"
);
}
static
HRESULT
WINAPI
IWineGDISurfaceImpl_GetDC
(
IWineD3DSurface
*
iface
,
HDC
*
pHDC
)
{
IWineD3DSurfaceImpl
*
This
=
(
IWineD3DSurfaceImpl
*
)
iface
;
WINED3DLOCKED_RECT
lock
;
...
...
@@ -502,7 +497,6 @@ const IWineD3DSurfaceVtbl IWineGDISurface_Vtbl =
IWineD3DBaseSurfaceImpl_GetClipper
,
/* Internal use: */
IWineGDISurfaceImpl_LoadTexture
,
IWineGDISurfaceImpl_BindTexture
,
IWineD3DBaseSurfaceImpl_GetData
,
IWineD3DBaseSurfaceImpl_SetFormat
,
IWineGDISurfaceImpl_PrivateSetup
,
...
...
dlls/wined3d/wined3d_private.h
View file @
629d81b1
...
...
@@ -2154,6 +2154,7 @@ extern const IWineD3DSurfaceVtbl IWineD3DSurface_Vtbl DECLSPEC_HIDDEN;
extern
const
IWineD3DSurfaceVtbl
IWineGDISurface_Vtbl
DECLSPEC_HIDDEN
;
void
surface_add_dirty_rect
(
IWineD3DSurfaceImpl
*
surface
,
const
RECT
*
dirty_rect
)
DECLSPEC_HIDDEN
;
void
surface_bind
(
IWineD3DSurfaceImpl
*
surface
,
BOOL
srgb
)
DECLSPEC_HIDDEN
;
HRESULT
surface_color_fill
(
IWineD3DSurfaceImpl
*
s
,
const
RECT
*
rect
,
const
WINED3DCOLORVALUE
*
color
)
DECLSPEC_HIDDEN
;
void
surface_gdi_cleanup
(
IWineD3DSurfaceImpl
*
This
)
DECLSPEC_HIDDEN
;
GLenum
surface_get_gl_buffer
(
IWineD3DSurfaceImpl
*
surface
)
DECLSPEC_HIDDEN
;
...
...
include/wine/wined3d.idl
View file @
629d81b1
...
...
@@ -2465,9 +2465,6 @@ interface IWineD3DSurface : IWineD3DResource
HRESULT
LoadTexture
(
[
in
]
BOOL
srgb_mode
)
;
void
BindTexture
(
[
in
]
BOOL
srgb
)
;
const
void
*
GetData
(
)
;
HRESULT
SetFormat
(
...
...
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