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
9d3cc8b0
Commit
9d3cc8b0
authored
Jun 30, 2011
by
Matteo Bruni
Committed by
Alexandre Julliard
Jul 06, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Make dummy textures black.
parent
8d39a85e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
8 deletions
+7
-8
visual.c
dlls/d3d9/tests/visual.c
+1
-1
device.c
dlls/wined3d/device.c
+6
-7
No files found.
dlls/d3d9/tests/visual.c
View file @
9d3cc8b0
...
...
@@ -12117,7 +12117,7 @@ static void unbound_sampler_test(IDirect3DDevice9 *device)
}
color
=
getPixelColorFromSurface
(
rt
,
32
,
32
);
todo_wine
ok
(
color
==
0xff000000
,
"Unbound sampler color is %#x.
\n
"
,
color
);
ok
(
color
==
0xff000000
,
"Unbound sampler color is %#x.
\n
"
,
color
);
hr
=
IDirect3DDevice9_SetRenderTarget
(
device
,
0
,
old_rt
);
ok
(
SUCCEEDED
(
hr
),
"IDirect3DDevice9_SetRenderTarget failed, hr %#x.
\n
"
,
hr
);
...
...
dlls/wined3d/device.c
View file @
9d3cc8b0
...
...
@@ -958,11 +958,10 @@ static void create_dummy_textures(struct wined3d_device *device)
{
const
struct
wined3d_gl_info
*
gl_info
=
&
device
->
adapter
->
gl_info
;
unsigned
int
i
;
/* Under DirectX you can have texture stage operations even if no texture is
bound, whereas opengl will only do texture operations when a valid texture is
bound. We emulate this by creating dummy textures and binding them to each
texture stage, but disable all stages by default. Hence if a stage is enabled
then the default texture will kick in until replaced by a SetTexture call */
/* Under DirectX you can sample even if no texture is bound, whereas
* OpenGL will only allow that when a valid texture is bound.
* We emulate this by creating dummy textures and binding them
* to each texture stage when the currently set D3D texture is NULL. */
ENTER_GL
();
if
(
gl_info
->
supported
[
APPLE_CLIENT_STORAGE
])
...
...
@@ -974,7 +973,7 @@ static void create_dummy_textures(struct wined3d_device *device)
for
(
i
=
0
;
i
<
gl_info
->
limits
.
textures
;
++
i
)
{
GLubyte
white
=
255
;
DWORD
color
=
0x000000ff
;
/* Make appropriate texture active */
GL_EXTCALL
(
glActiveTextureARB
(
GL_TEXTURE0_ARB
+
i
));
...
...
@@ -990,7 +989,7 @@ static void create_dummy_textures(struct wined3d_device *device)
glBindTexture
(
GL_TEXTURE_2D
,
device
->
dummyTextureName
[
i
]);
checkGLcall
(
"glBindTexture"
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_
LUMINANCE
,
1
,
1
,
0
,
GL_LUMINANCE
,
GL_UNSIGNED_BYTE
,
&
white
);
glTexImage2D
(
GL_TEXTURE_2D
,
0
,
GL_
RGBA8
,
1
,
1
,
0
,
GL_RGBA
,
GL_UNSIGNED_INT_8_8_8_8
,
&
color
);
checkGLcall
(
"glTexImage2D"
);
}
...
...
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