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
0d6f4d24
Commit
0d6f4d24
authored
Sep 08, 2010
by
Owen Rudge
Committed by
Alexandre Julliard
Sep 09, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
d3dx9/tests: Add D3DXCreateTextureFromResource tests.
parent
78bd619c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
0 deletions
+44
-0
texture.c
dlls/d3dx9_36/tests/texture.c
+44
-0
No files found.
dlls/d3dx9_36/tests/texture.c
View file @
0d6f4d24
...
...
@@ -22,6 +22,7 @@
#define COBJMACROS
#include "wine/test.h"
#include "d3dx9tex.h"
#include "resources.h"
static
void
test_D3DXCheckTextureRequirements
(
IDirect3DDevice9
*
device
)
{
...
...
@@ -313,6 +314,49 @@ static void test_D3DXCreateTexture(IDirect3DDevice9 *device)
IDirect3DTexture9_Release
(
texture
);
}
/* D3DXCreateTextureFromResource */
todo_wine
{
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDB_BITMAP_1x1
),
&
texture
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
&
texture
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
}
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDS_STRING
),
&
texture
);
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3DXERR_INVALIDDATA
);
hr
=
D3DXCreateTextureFromResourceA
(
NULL
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
&
texture
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
NULL
,
&
texture
);
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3DXERR_INVALIDDATA
);
hr
=
D3DXCreateTextureFromResourceA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateTextureFromResource returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
/* D3DXCreateTextureFromResourceEx */
todo_wine
{
hr
=
D3DXCreateTextureFromResourceExA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
&
texture
);
ok
(
hr
==
D3D_OK
,
"D3DXCreateTextureFromResourceEx returned %#x, expected %#x
\n
"
,
hr
,
D3D_OK
);
if
(
SUCCEEDED
(
hr
))
IDirect3DTexture9_Release
(
texture
);
}
hr
=
D3DXCreateTextureFromResourceExA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDS_STRING
),
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
&
texture
);
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"D3DXCreateTextureFromResourceEx returned %#x, expected %#x
\n
"
,
hr
,
D3DXERR_INVALIDDATA
);
hr
=
D3DXCreateTextureFromResourceExA
(
NULL
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
&
texture
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateTextureFromResourceEx returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
hr
=
D3DXCreateTextureFromResourceExA
(
device
,
NULL
,
NULL
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
&
texture
);
ok
(
hr
==
D3DXERR_INVALIDDATA
,
"D3DXCreateTextureFromResourceEx returned %#x, expected %#x
\n
"
,
hr
,
D3DXERR_INVALIDDATA
);
hr
=
D3DXCreateTextureFromResourceExA
(
device
,
NULL
,
MAKEINTRESOURCEA
(
IDD_BITMAPDATA_1x1
),
D3DX_DEFAULT
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
D3DFMT_UNKNOWN
,
D3DPOOL_MANAGED
,
D3DX_DEFAULT
,
D3DX_DEFAULT
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
D3DERR_INVALIDCALL
,
"D3DXCreateTextureFromResourceEx returned %#x, expected %#x
\n
"
,
hr
,
D3DERR_INVALIDCALL
);
}
static
void
test_D3DXFilterTexture
(
IDirect3DDevice9
*
device
)
...
...
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