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
6800d3db
Commit
6800d3db
authored
Dec 03, 2008
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wined3d: Fix some macros definitions to make them proper C statements.
parent
afce6158
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
state.c
dlls/wined3d/state.c
+3
-3
wined3d_private.h
dlls/wined3d/wined3d_private.h
+10
-9
No files found.
dlls/wined3d/state.c
View file @
6800d3db
...
...
@@ -3627,12 +3627,12 @@ static void transform_worldex(DWORD state, IWineD3DStateBlockImpl *stateblock, W
*/
if
(
stateblock
->
wineD3DDevice
->
view_ident
)
{
glLoadMatrixf
(
&
stateblock
->
transforms
[
WINED3DTS_WORLDMATRIX
(
matrix
)].
u
.
m
[
0
][
0
]);
checkGLcall
(
"glLoadMatrixf"
)
checkGLcall
(
"glLoadMatrixf"
)
;
}
else
{
glLoadMatrixf
(
&
stateblock
->
transforms
[
WINED3DTS_VIEW
].
u
.
m
[
0
][
0
]);
checkGLcall
(
"glLoadMatrixf"
)
checkGLcall
(
"glLoadMatrixf"
)
;
glMultMatrixf
(
&
stateblock
->
transforms
[
WINED3DTS_WORLDMATRIX
(
matrix
)].
u
.
m
[
0
][
0
]);
checkGLcall
(
"glMultMatrixf"
)
checkGLcall
(
"glMultMatrixf"
)
;
}
}
...
...
dlls/wined3d/wined3d_private.h
View file @
6800d3db
...
...
@@ -402,11 +402,12 @@ extern int num_lock;
#define D3DCOLOR_B(dw) (((float) (((dw) >> 0) & 0xFF)) / 255.0f)
#define D3DCOLOR_A(dw) (((float) (((dw) >> 24) & 0xFF)) / 255.0f)
#define D3DCOLORTOGLFLOAT4(dw, vec) \
#define D3DCOLORTOGLFLOAT4(dw, vec)
do {
\
(vec)[0] = D3DCOLOR_R(dw); \
(vec)[1] = D3DCOLOR_G(dw); \
(vec)[2] = D3DCOLOR_B(dw); \
(vec)[3] = D3DCOLOR_A(dw);
(vec)[3] = D3DCOLOR_A(dw); \
} while(0)
/* DirectX Device Limits */
/* --------------------- */
...
...
@@ -422,7 +423,7 @@ extern int num_lock;
/* --------------------- */
#ifndef WINE_NO_DEBUG_MSGS
#define checkGLcall(A) \
{
\
do {
\
GLint err = glGetError(); \
if (err == GL_NO_ERROR) { \
TRACE("%s call ok %s / %d\n", A, __FILE__, __LINE__); \
...
...
@@ -432,9 +433,9 @@ extern int num_lock;
debug_glerror(err), err, A, __FILE__, __LINE__); \
err = glGetError(); \
} while (err != GL_NO_ERROR); \
}
}
while(0)
#else
#define checkGLcall(A) do {} while(0)
;
#define checkGLcall(A) do {} while(0)
#endif
/* Trace routines / diagnostics */
...
...
@@ -452,13 +453,13 @@ do {
/* Macro to dump out the current state of the light chain */
#define DUMP_LIGHT_CHAIN() \
{
\
do {
\
PLIGHTINFOEL *el = This->stateBlock->lights;\
while (el) { \
TRACE("Light %p (glIndex %ld, d3dIndex %ld, enabled %d)\n", el, el->glIndex, el->OriginalIndex, el->lightEnabled);\
el = el->next; \
} \
}
}
while(0)
/* Trace vector and strided data information */
#define TRACE_VECTOR(name) TRACE( #name "=(%f, %f, %f, %f)\n", name.x, name.y, name.z, name.w);
...
...
@@ -494,7 +495,7 @@ extern const float identity[16];
/* Checking of per-vertex related GL calls */
/* --------------------- */
#define vcheckGLcall(A) \
{
\
do {
\
GLint err = glGetError(); \
if (err == GL_NO_ERROR) { \
VTRACE(("%s call ok %s / %d\n", A, __FILE__, __LINE__)); \
...
...
@@ -504,7 +505,7 @@ extern const float identity[16];
debug_glerror(err), err, A, __FILE__, __LINE__); \
err = glGetError(); \
} while (err != GL_NO_ERROR); \
}
}
while(0)
/* TODO: Confirm each of these works when wined3d move completed */
#if 0 /* NOTE: Must be 0 in cvs */
...
...
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