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
46b13aaa
Commit
46b13aaa
authored
Mar 22, 2006
by
H. Verbeet
Committed by
Alexandre Julliard
Mar 22, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: glTypeLookup cleanup.
Use a struct instead of an UINT array as entries in the glTypeLookup table.
parent
bce3da3a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
vertexdeclaration.c
dlls/wined3d/vertexdeclaration.c
+1
-1
wined3d_private.h
dlls/wined3d/wined3d_private.h
+14
-6
No files found.
dlls/wined3d/vertexdeclaration.c
View file @
46b13aaa
...
...
@@ -297,7 +297,7 @@ IWineD3DVertexDeclarationImpl *This = (IWineD3DVertexDeclarationImpl *)iface;
convToW
[
nTokens
].
Type
=
type
;
convToW
[
nTokens
].
Offset
=
offset
;
convToW
[
nTokens
].
Reg
=
reg
;
offset
+=
glTypeLookup
[
type
]
[
1
]
*
glTypeLookup
[
type
][
4
]
;
offset
+=
glTypeLookup
[
type
]
.
size
*
glTypeLookup
[
type
].
typesize
;
++
nTokens
;
}
else
if
(
D3DVSD_TOKEN_STREAMDATA
==
tokentype
&&
0x10000000
&
tokentype
)
{
TRACE
(
" 0x%08lx SKIP(%lu)
\n
"
,
tokentype
,
((
tokentype
&
D3DVSD_SKIPCOUNTMASK
)
>>
D3DVSD_SKIPCOUNTSHIFT
));
...
...
dlls/wined3d/wined3d_private.h
View file @
46b13aaa
...
...
@@ -81,8 +81,16 @@ extern DWORD *stateLookup[MAX_LOOKUPS];
extern
DWORD
minMipLookup
[
D3DTEXF_ANISOTROPIC
+
1
][
D3DTEXF_LINEAR
+
1
];
typedef
struct
_WINED3DGLTYPE
{
int
d3dType
;
GLint
size
;
GLenum
glType
;
GLboolean
normalized
;
int
typesize
;
}
WINED3DGLTYPE
;
/* NOTE: Make sure these are in the correct numerical order. (see /include/d3d9types.h typedef enum _D3DDECLTYPE) */
UINT
static
const
glTypeLookup
[
D3DDECLTYPE_UNUSED
][
5
]
=
{
WINED3DGLTYPE
static
const
glTypeLookup
[
D3DDECLTYPE_UNUSED
]
=
{
{
D3DDECLTYPE_FLOAT1
,
1
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
{
D3DDECLTYPE_FLOAT2
,
2
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
{
D3DDECLTYPE_FLOAT3
,
3
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
float
)},
...
...
@@ -101,11 +109,11 @@ UINT static const glTypeLookup[D3DDECLTYPE_UNUSED][5] = {
{
D3DDECLTYPE_FLOAT16_2
,
2
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
short
int
)},
{
D3DDECLTYPE_FLOAT16_4
,
4
,
GL_FLOAT
,
GL_FALSE
,
sizeof
(
short
int
)}};
#define WINED3D_ATR_TYPE(_attribute) glTypeLookup[sd->u.s._attribute.dwType]
[0]
#define WINED3D_ATR_SIZE(_attribute) glTypeLookup[sd->u.s._attribute.dwType]
[1]
#define WINED3D_ATR_GLTYPE(_attribute) glTypeLookup[sd->u.s._attribute.dwType]
[2]
#define WINED3D_ATR_NORMALIZED(_attribute) glTypeLookup[sd->u.s._attribute.dwType]
[3]
#define WINED3D_ATR_TYPESIZE(_attribute) glTypeLookup[sd->u.s._attribute.dwType]
[4]
#define WINED3D_ATR_TYPE(_attribute) glTypeLookup[sd->u.s._attribute.dwType]
.d3dType
#define WINED3D_ATR_SIZE(_attribute) glTypeLookup[sd->u.s._attribute.dwType]
.size
#define WINED3D_ATR_GLTYPE(_attribute) glTypeLookup[sd->u.s._attribute.dwType]
.glType
#define WINED3D_ATR_NORMALIZED(_attribute) glTypeLookup[sd->u.s._attribute.dwType]
.normalized
#define WINED3D_ATR_TYPESIZE(_attribute) glTypeLookup[sd->u.s._attribute.dwType]
.typesize
/**
* Settings
...
...
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