mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-17 11:35:08 -04:00
get rid of few warnings when running with direct3d9 debug runtime
This commit is contained in:
parent
2376994210
commit
cec101ba5c
@ -62,6 +62,7 @@ namespace ClassicalSharp {
|
||||
/// <summary> Lava style 'swimming'/'bobbing' interaction when player collides. </summary>
|
||||
public const byte LiquidLava = 6;
|
||||
|
||||
/// <summary> Rope/Ladder style climbing interaction when player collides. </summary>
|
||||
public const byte ClimbRope = 7;
|
||||
}
|
||||
|
||||
|
@ -89,7 +89,7 @@ namespace ClassicalSharp.GraphicsAPI {
|
||||
}
|
||||
|
||||
Compare[] compareFuncs;
|
||||
Compare alphaTestFunc;
|
||||
Compare alphaTestFunc = Compare.Always;
|
||||
int alphaTestRef;
|
||||
public override void AlphaTestFunc(CompareFunc func, float value) {
|
||||
alphaTestFunc = compareFuncs[(int)func];
|
||||
@ -99,7 +99,8 @@ namespace ClassicalSharp.GraphicsAPI {
|
||||
}
|
||||
|
||||
Blend[] blendFuncs;
|
||||
Blend srcBlendFunc, dstBlendFunc;
|
||||
Blend srcBlendFunc = Blend.One;
|
||||
Blend dstBlendFunc = Blend.Zero;
|
||||
public override void AlphaBlendFunc(BlendFunc srcFunc, BlendFunc dstFunc) {
|
||||
srcBlendFunc = blendFuncs[(int)srcFunc];
|
||||
dstBlendFunc = blendFuncs[(int)dstFunc];
|
||||
@ -252,7 +253,7 @@ namespace ClassicalSharp.GraphicsAPI {
|
||||
device.SetRenderState(RenderState.ColorWriteEnable, flags);
|
||||
}
|
||||
|
||||
Compare depthTestFunc;
|
||||
Compare depthTestFunc = Compare.LessEqual;
|
||||
public override void DepthTestFunc(CompareFunc func) {
|
||||
depthTestFunc = compareFuncs[(int)func];
|
||||
device.SetRenderState(RenderState.ZFunc, (int)depthTestFunc);
|
||||
|
@ -355,7 +355,7 @@ void Gfx_SetAlphaTest(bool enabled) {
|
||||
D3D9_SetRenderState((UInt32)enabled, D3DRS_ALPHATESTENABLE, "D3D9_SetAlphaTest");
|
||||
}
|
||||
|
||||
D3DCMPFUNC d3d9_alphaTestFunc = 0;
|
||||
D3DCMPFUNC d3d9_alphaTestFunc = D3DCMP_ALWAYS;
|
||||
Int32 d3d9_alphaTestRef = 0;
|
||||
void Gfx_SetAlphaTestFunc(Int32 compareFunc, Real32 refValue) {
|
||||
d3d9_alphaTestFunc = d3d9_compareFuncs[compareFunc];
|
||||
@ -372,8 +372,8 @@ void Gfx_SetAlphaBlending(bool enabled) {
|
||||
D3D9_SetRenderState((UInt32)enabled, D3DRS_ALPHABLENDENABLE, "D3D9_SetAlphaBlending");
|
||||
}
|
||||
|
||||
D3DBLEND d3d9_srcBlendFunc = 0;
|
||||
D3DBLEND d3d9_dstBlendFunc = 0;
|
||||
D3DBLEND d3d9_srcBlendFunc = D3DBLEND_ONE;
|
||||
D3DBLEND d3d9_dstBlendFunc = D3DBLEND_ZERO;
|
||||
void Gfx_SetAlphaBlendFunc(Int32 srcBlendFunc, Int32 dstBlendFunc) {
|
||||
d3d9_srcBlendFunc = d3d9_blendFuncs[srcBlendFunc];
|
||||
D3D9_SetRenderState(d3d9_srcBlendFunc, D3DRS_SRCBLEND, "D3D9_SetAlphaBlendFunc_Src");
|
||||
@ -405,7 +405,7 @@ void Gfx_SetDepthTest(bool enabled) {
|
||||
D3D9_SetRenderState((UInt32)enabled, D3DRS_ZENABLE, "D3D9_SetDepthTest");
|
||||
}
|
||||
|
||||
D3DCMPFUNC d3d9_depthTestFunc = 0;
|
||||
D3DCMPFUNC d3d9_depthTestFunc = D3DCMP_LESSEQUAL;
|
||||
void Gfx_SetDepthTestFunc(Int32 compareFunc) {
|
||||
d3d9_depthTestFunc = d3d9_compareFuncs[compareFunc];
|
||||
D3D9_SetRenderState(d3d9_alphaTestFunc, D3DRS_ZFUNC, "D3D9_SetDepthTestFunc");
|
||||
@ -528,7 +528,7 @@ void Gfx_DrawVb_IndexedTris_Range(Int32 verticesCount, Int32 startVertex) {
|
||||
}
|
||||
|
||||
void Gfx_DrawIndexedVb_TrisT2fC4b(Int32 verticesCount, Int32 startVertex) {
|
||||
ReturnCode hresult = IDirect3DDevice9_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST,
|
||||
ReturnCode hresult = IDirect3DDevice9_DrawIndexedPrimitive(device, D3DPT_TRIANGLELIST,
|
||||
startVertex, 0, verticesCount, 0, verticesCount >> 1);
|
||||
ErrorHandler_CheckOrFail(hresult, "D3D9_DrawIndexedVb_TrisT2fC4b");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user