Add floor32, ceil32, round32 compatibility functions for burnings renderer.
To avoid changing burnings now those functions have no IRRLICHT_FAST_MATH anymore, there's a new header irrMathFastCompat.h which has ..._fast functions doing the old behavior. With the troubles they have documented. I changed burnings to use those functions throughout. Or as much as possible... Burnings probably also uses classes like SColor which also have functions using those, but I don't plan to adapt them. Maybe IRRLICHT_FAST_MATH should be a flag exlusive to burnings in the future, I don't think it makes much sense otherwise anymore (it often expects 32-bit asm). git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6012 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@@ -255,8 +255,8 @@ void CTRTextureBlend::fragment_dst_color_src_alpha ()
|
||||
#endif
|
||||
|
||||
// apply top-left fill-convention, left
|
||||
xStart = core::ceil32( line.x[0] );
|
||||
xEnd = core::ceil32( line.x[1] ) - 1;
|
||||
xStart = core::ceil32_fast( line.x[0] );
|
||||
xEnd = core::ceil32_fast( line.x[1] ) - 1;
|
||||
|
||||
dx = xEnd - xStart;
|
||||
|
||||
@@ -439,8 +439,8 @@ void CTRTextureBlend::fragment_src_color_src_alpha ()
|
||||
#endif
|
||||
|
||||
// apply top-left fill-convention, left
|
||||
xStart = core::ceil32( line.x[0] );
|
||||
xEnd = core::ceil32( line.x[1] ) - 1;
|
||||
xStart = core::ceil32_fast( line.x[0] );
|
||||
xEnd = core::ceil32_fast( line.x[1] ) - 1;
|
||||
|
||||
dx = xEnd - xStart;
|
||||
|
||||
@@ -619,8 +619,8 @@ void CTRTextureBlend::fragment_one_one_minus_src_alpha()
|
||||
#endif
|
||||
|
||||
// apply top-left fill-convention, left
|
||||
xStart = core::ceil32( line.x[0] );
|
||||
xEnd = core::ceil32( line.x[1] ) - 1;
|
||||
xStart = core::ceil32_fast( line.x[0] );
|
||||
xEnd = core::ceil32_fast( line.x[1] ) - 1;
|
||||
|
||||
dx = xEnd - xStart;
|
||||
|
||||
@@ -816,8 +816,8 @@ void CTRTextureBlend::fragment_one_minus_dst_alpha_one ()
|
||||
#endif
|
||||
|
||||
// apply top-left fill-convention, left
|
||||
xStart = core::ceil32( line.x[0] );
|
||||
xEnd = core::ceil32( line.x[1] ) - 1;
|
||||
xStart = core::ceil32_fast( line.x[0] );
|
||||
xEnd = core::ceil32_fast( line.x[1] ) - 1;
|
||||
|
||||
dx = xEnd - xStart;
|
||||
|
||||
@@ -1012,8 +1012,8 @@ void CTRTextureBlend::fragment_src_alpha_one ()
|
||||
#endif
|
||||
|
||||
// apply top-left fill-convention, left
|
||||
xStart = core::ceil32( line.x[0] );
|
||||
xEnd = core::ceil32( line.x[1] ) - 1;
|
||||
xStart = core::ceil32_fast( line.x[0] );
|
||||
xEnd = core::ceil32_fast( line.x[1] ) - 1;
|
||||
|
||||
dx = xEnd - xStart;
|
||||
|
||||
@@ -1239,8 +1239,8 @@ void CTRTextureBlend::fragment_dst_color_one_minus_dst_alpha ()
|
||||
#endif
|
||||
|
||||
// apply top-left fill-convention, left
|
||||
xStart = core::ceil32( line.x[0] );
|
||||
xEnd = core::ceil32( line.x[1] ) - 1;
|
||||
xStart = core::ceil32_fast( line.x[0] );
|
||||
xEnd = core::ceil32_fast( line.x[1] ) - 1;
|
||||
|
||||
dx = xEnd - xStart;
|
||||
|
||||
@@ -1435,8 +1435,8 @@ void CTRTextureBlend::fragment_dst_color_zero ()
|
||||
#endif
|
||||
|
||||
// apply top-left fill-convention, left
|
||||
xStart = core::ceil32( line.x[0] );
|
||||
xEnd = core::ceil32( line.x[1] ) - 1;
|
||||
xStart = core::ceil32_fast( line.x[0] );
|
||||
xEnd = core::ceil32_fast( line.x[1] ) - 1;
|
||||
|
||||
dx = xEnd - xStart;
|
||||
|
||||
@@ -1629,8 +1629,8 @@ void CTRTextureBlend::fragment_dst_color_one ()
|
||||
#endif
|
||||
|
||||
// apply top-left fill-convention, left
|
||||
xStart = core::ceil32( line.x[0] );
|
||||
xEnd = core::ceil32( line.x[1] ) - 1;
|
||||
xStart = core::ceil32_fast( line.x[0] );
|
||||
xEnd = core::ceil32_fast( line.x[1] ) - 1;
|
||||
|
||||
dx = xEnd - xStart;
|
||||
|
||||
@@ -1826,8 +1826,8 @@ void CTRTextureBlend::fragment_zero_one_minus_scr_color ()
|
||||
#endif
|
||||
|
||||
// apply top-left fill-convention, left
|
||||
xStart = core::ceil32( line.x[0] );
|
||||
xEnd = core::ceil32( line.x[1] ) - 1;
|
||||
xStart = core::ceil32_fast( line.x[0] );
|
||||
xEnd = core::ceil32_fast( line.x[1] ) - 1;
|
||||
|
||||
dx = xEnd - xStart;
|
||||
|
||||
@@ -2092,8 +2092,8 @@ void CTRTextureBlend::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const
|
||||
#endif
|
||||
|
||||
// apply top-left fill convention, top part
|
||||
yStart = core::ceil32( a->Pos.y );
|
||||
yEnd = core::ceil32( b->Pos.y ) - 1;
|
||||
yStart = core::ceil32_fast( a->Pos.y );
|
||||
yEnd = core::ceil32_fast( b->Pos.y ) - 1;
|
||||
|
||||
#ifdef SUBTEXEL
|
||||
subPixel = ( (f32) yStart ) - a->Pos.y;
|
||||
@@ -2251,8 +2251,8 @@ void CTRTextureBlend::drawTriangle ( const s4DVertex *a,const s4DVertex *b,const
|
||||
#endif
|
||||
|
||||
// apply top-left fill convention, top part
|
||||
yStart = core::ceil32( b->Pos.y );
|
||||
yEnd = core::ceil32( c->Pos.y ) - 1;
|
||||
yStart = core::ceil32_fast( b->Pos.y );
|
||||
yEnd = core::ceil32_fast( c->Pos.y ) - 1;
|
||||
|
||||
#ifdef SUBTEXEL
|
||||
|
||||
|
||||
Reference in New Issue
Block a user