Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PoroCYon
Bonzomatic
Commits
7c927ba8
Commit
7c927ba8
authored
Oct 04, 2018
by
Chris White
Committed by
Gargaj
Oct 05, 2018
Browse files
Build successfully on DX9 mingw i686
- Add a few missing constants - Don't take the address of a temporary
parent
1afcf852
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/platform_w32_dx9/Renderer.cpp
View file @
7c927ba8
...
...
@@ -11,6 +11,15 @@
#define DEVTYPE D3DDEVTYPE_HAL
#if defined(__MINGW32__) && !defined(D3D9b_SDK_VERSION)
#define D3D9b_SDK_VERSION 31
// From https://docs.rs/winapi/0.2.8/i686-pc-windows-gnu/winapi/d3d9/constant.D3D9b_SDK_VERSION.html
#endif
#ifndef WM_MOUSEHWHEEL
#define WM_MOUSEHWHEEL (0x020E)
#endif
const
char
*
shaderKeyword
=
" register packoffset static const"
" break continue discard do for if else switch while case default return true false"
...
...
@@ -597,9 +606,14 @@ namespace Renderer
pConstantTable
->
SetFloat
(
pDevice
,
szConstName
,
x
);
}
static
D3DXVECTOR4
SetShaderConstant_VEC4
;
void
SetShaderConstant
(
const
char
*
szConstName
,
float
x
,
float
y
)
{
pConstantTable
->
SetVector
(
pDevice
,
szConstName
,
&
D3DXVECTOR4
(
x
,
y
,
0
,
0
)
);
SetShaderConstant_VEC4
.
x
=
x
;
SetShaderConstant_VEC4
.
y
=
y
;
SetShaderConstant_VEC4
.
z
=
0
;
SetShaderConstant_VEC4
.
w
=
0
;
pConstantTable
->
SetVector
(
pDevice
,
szConstName
,
&
SetShaderConstant_VEC4
);
}
struct
DX9Texture
:
public
Texture
...
...
Write
Preview
Supports
Markdown
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