Commit cd7ad09b authored by bitplane's avatar bitplane

Burning's Video now compiles again in fast mode. Reported by puh

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@2615 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 4141b295
...@@ -157,7 +157,7 @@ void CBurningVideoDriver::setCurrentShader() ...@@ -157,7 +157,7 @@ void CBurningVideoDriver::setCurrentShader()
ITexture *texture0 = Material.org.getTexture(0); ITexture *texture0 = Material.org.getTexture(0);
ITexture *texture1 = Material.org.getTexture(1); ITexture *texture1 = Material.org.getTexture(1);
bool zMaterialTest = Material.org.ZBuffer != ECFN_NEVER && bool zMaterialTest = Material.org.ZBuffer != ECFN_NEVER &&
Material.org.ZWriteEnable && Material.org.ZWriteEnable &&
( AllowZWriteOnTransparent || !Material.org.isTransparent() ); ( AllowZWriteOnTransparent || !Material.org.isTransparent() );
...@@ -941,12 +941,12 @@ void CBurningVideoDriver::VertexCache_fill(const u32 sourceIndex, ...@@ -941,12 +941,12 @@ void CBurningVideoDriver::VertexCache_fill(const u32 sourceIndex,
if ( TransformationFlag [ ETS_TEXTURE_0 + t ] & ETF_TEXGEN_CAMERA_REFLECTION ) if ( TransformationFlag [ ETS_TEXTURE_0 + t ] & ETF_TEXGEN_CAMERA_REFLECTION )
{ {
srcT.x = 0.5f * ( 1.f + (n.x * view[0] + n.y * view[4] + n.z * view[8] )); srcT.x = 0.5f * ( 1.f + (n.x * view[0] + n.y * view[4] + n.z * view[8] ));
srcT.y = 0.5f * ( 1.f + (n.x * view[1] + n.y * view[5] + n.z * view[9] )); srcT.y = 0.5f * ( 1.f + (n.x * view[1] + n.y * view[5] + n.z * view[9] ));
} }
else else
{ {
srcT.x = 0.5f * ( 1.f + (n.x * view[0] + n.y * view[1] + n.z * view[2] )); srcT.x = 0.5f * ( 1.f + (n.x * view[0] + n.y * view[1] + n.z * view[2] ));
srcT.y = 0.5f * ( 1.f + (n.x * view[4] + n.y * view[5] + n.z * view[6] )); srcT.y = 0.5f * ( 1.f + (n.x * view[4] + n.y * view[5] + n.z * view[6] ));
} }
} }
...@@ -1315,7 +1315,7 @@ void CBurningVideoDriver::drawVertexPrimitiveList(const void* vertices, u32 vert ...@@ -1315,7 +1315,7 @@ void CBurningVideoDriver::drawVertexPrimitiveList(const void* vertices, u32 vert
/* /*
// TODO: don't stick on 32 Bit Pointer // TODO: don't stick on 32 Bit Pointer
#define PointerAsValue(x) ( (u32) (u32*) (x) ) #define PointerAsValue(x) ( (u32) (u32*) (x) )
// if not complete inside clipping necessary // if not complete inside clipping necessary
if ( ( test & VERTEX4D_INSIDE ) != VERTEX4D_INSIDE ) if ( ( test & VERTEX4D_INSIDE ) != VERTEX4D_INSIDE )
...@@ -1490,17 +1490,6 @@ void CBurningVideoDriver::setMaterial(const SMaterial& material) ...@@ -1490,17 +1490,6 @@ void CBurningVideoDriver::setMaterial(const SMaterial& material)
} }
#ifdef SOFTWARE_DRIVER_2_LIGHTING
//! Sets the fog mode.
void CBurningVideoDriver::setFog(SColor color, E_FOG_TYPE fogType, f32 start,
f32 end, f32 density, bool pixelFog, bool rangeFog)
{
CNullDriver::setFog(color, fogType, start, end, density, pixelFog, rangeFog);
LightSpace.FogColor.setA8R8G8B8 ( color.color );
}
/*! /*!
Camera Position in World Space Camera Position in World Space
*/ */
...@@ -1524,6 +1513,16 @@ void CBurningVideoDriver::getCameraPosWorldSpace () ...@@ -1524,6 +1513,16 @@ void CBurningVideoDriver::getCameraPosWorldSpace ()
LightSpace.campos.w = 1.f; LightSpace.campos.w = 1.f;
} }
#ifdef SOFTWARE_DRIVER_2_LIGHTING
//! Sets the fog mode.
void CBurningVideoDriver::setFog(SColor color, E_FOG_TYPE fogType, f32 start,
f32 end, f32 density, bool pixelFog, bool rangeFog)
{
CNullDriver::setFog(color, fogType, start, end, density, pixelFog, rangeFog);
LightSpace.FogColor.setA8R8G8B8 ( color.color );
}
/*! /*!
applies lighting model applies lighting model
*/ */
...@@ -1676,7 +1675,7 @@ void CBurningVideoDriver::draw2DLine(const core::position2d<s32>& start, ...@@ -1676,7 +1675,7 @@ void CBurningVideoDriver::draw2DLine(const core::position2d<s32>& start,
void CBurningVideoDriver::drawPixel(u32 x, u32 y, const SColor & color) void CBurningVideoDriver::drawPixel(u32 x, u32 y, const SColor & color)
{ {
BackBuffer->setPixel(x, y, color, true); BackBuffer->setPixel(x, y, color, true);
} }
//! draw an 2d rectangle //! draw an 2d rectangle
...@@ -1990,7 +1989,7 @@ IImage* CBurningVideoDriver::createScreenShot() ...@@ -1990,7 +1989,7 @@ IImage* CBurningVideoDriver::createScreenShot()
ITexture* CBurningVideoDriver::createDeviceDependentTexture(IImage* surface, const core::string<c16>& name) ITexture* CBurningVideoDriver::createDeviceDependentTexture(IImage* surface, const core::string<c16>& name)
{ {
return new CSoftwareTexture2( return new CSoftwareTexture2(
surface, name, surface, name,
(getTextureCreationFlag(ETCF_CREATE_MIP_MAPS) ? CSoftwareTexture2::GEN_MIPMAP : 0 ) | (getTextureCreationFlag(ETCF_CREATE_MIP_MAPS) ? CSoftwareTexture2::GEN_MIPMAP : 0 ) |
(getTextureCreationFlag(ETCF_ALLOW_NON_POWER_2) ? 0 : CSoftwareTexture2::NP2_SIZE ) (getTextureCreationFlag(ETCF_ALLOW_NON_POWER_2) ? 0 : CSoftwareTexture2::NP2_SIZE )
); );
......
...@@ -116,7 +116,7 @@ public: ...@@ -116,7 +116,7 @@ public:
//! Returns if the texture has an alpha channel //! Returns if the texture has an alpha channel
virtual bool hasAlpha() const virtual bool hasAlpha() const
{ {
return (Flags & HAS_ALPHA ) != 0; return (Flags & HAS_ALPHA ) != 0;
} }
......
...@@ -82,6 +82,9 @@ ...@@ -82,6 +82,9 @@
#elif defined ( BURNINGVIDEO_RENDERER_CE ) #elif defined ( BURNINGVIDEO_RENDERER_CE )
#define SOFTWARE_DRIVER_2_MIPMAPPING_MAX 4 #define SOFTWARE_DRIVER_2_MIPMAPPING_MAX 4
#define SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS 0 #define SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS 0
#else
#define SOFTWARE_DRIVER_2_MIPMAPPING_MAX 8
#define SOFTWARE_DRIVER_2_MIPMAPPING_LOD_BIAS 0
#endif #endif
#else #else
#define SOFTWARE_DRIVER_2_MIPMAPPING_MAX 1 #define SOFTWARE_DRIVER_2_MIPMAPPING_MAX 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment