Merging r6145 through r6171 from trunk to ogl-es branch
git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/branches/ogl-es@6172 dfc29bdd-3216-0410-991c-e03cc46cb475
This commit is contained in:
@@ -93,10 +93,10 @@ private:
|
||||
void scanline_bilinear2_mag ();
|
||||
void scanline_bilinear2_min ();
|
||||
#else
|
||||
#define scanline_bilinear2_mag scanline_bilinear
|
||||
#define scanline_bilinear2_mag fragmentShader
|
||||
#endif
|
||||
|
||||
void scanline_bilinear ();
|
||||
void fragmentShader();
|
||||
|
||||
};
|
||||
|
||||
@@ -130,7 +130,7 @@ void CTRTextureLightMap2_M4::scanline_bilinear2_mag ()
|
||||
SOFTWARE_DRIVER_2_CLIPCHECK;
|
||||
|
||||
// slopes
|
||||
const f32 invDeltaX = reciprocal_zero2( line.x[1] - line.x[0] );
|
||||
const f32 invDeltaX = fill_step_x( line.x[1] - line.x[0] );
|
||||
|
||||
// search z-buffer for first not occulled pixel
|
||||
i = ( line.y * RenderTarget->getDimension().Width ) + xStart;
|
||||
@@ -202,7 +202,7 @@ void CTRTextureLightMap2_M4::scanline_bilinear2_mag ()
|
||||
#endif
|
||||
|
||||
|
||||
for ( ;i <= dx; i++ )
|
||||
for ( ;i <= dx; i += SOFTWARE_DRIVER_2_STEP_X)
|
||||
{
|
||||
#ifdef IPOL_W
|
||||
if ( line.w[0] >= z[i] )
|
||||
@@ -271,7 +271,7 @@ void CTRTextureLightMap2_M4::scanline_bilinear2_min ()
|
||||
SOFTWARE_DRIVER_2_CLIPCHECK;
|
||||
|
||||
// slopes
|
||||
const f32 invDeltaX = reciprocal_zero2( line.x[1] - line.x[0] );
|
||||
const f32 invDeltaX = fill_step_x( line.x[1] - line.x[0] );
|
||||
|
||||
// search z-buffer for first not occulled pixel
|
||||
z = (fp24*) DepthBuffer->lock() + ( line.y * RenderTarget->getDimension().Width ) + xStart;
|
||||
@@ -334,7 +334,7 @@ void CTRTextureLightMap2_M4::scanline_bilinear2_min ()
|
||||
tFixPoint r1, g1, b1;
|
||||
|
||||
|
||||
for ( ;i <= dx; i++ )
|
||||
for ( ;i <= dx; i += SOFTWARE_DRIVER_2_STEP_X)
|
||||
{
|
||||
#ifdef IPOL_W
|
||||
if ( line.w[0] >= z[i] )
|
||||
@@ -393,9 +393,9 @@ void CTRTextureLightMap2_M4::drawTriangle_Min ( const s4DVertex* burning_restric
|
||||
const f32 ba = b->Pos.y - a->Pos.y;
|
||||
const f32 cb = c->Pos.y - b->Pos.y;
|
||||
// calculate delta y of the edges
|
||||
scan.invDeltaY[0] = reciprocal_zero( ca );
|
||||
scan.invDeltaY[1] = reciprocal_zero( ba );
|
||||
scan.invDeltaY[2] = reciprocal_zero( cb );
|
||||
scan.invDeltaY[0] = fill_step_y( ca );
|
||||
scan.invDeltaY[1] = fill_step_y( ba );
|
||||
scan.invDeltaY[2] = fill_step_y( cb );
|
||||
|
||||
if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) )
|
||||
return;
|
||||
@@ -519,7 +519,7 @@ void CTRTextureLightMap2_M4::drawTriangle_Min ( const s4DVertex* burning_restric
|
||||
#endif
|
||||
|
||||
// rasterize the edge scanlines
|
||||
for( line.y = yStart; line.y <= yEnd; ++line.y)
|
||||
for( line.y = yStart; line.y <= yEnd; line.y += SOFTWARE_DRIVER_2_STEP_Y)
|
||||
{
|
||||
line.x[scan.left] = scan.x[0];
|
||||
line.x[scan.right] = scan.x[1];
|
||||
@@ -550,7 +550,7 @@ void CTRTextureLightMap2_M4::drawTriangle_Min ( const s4DVertex* burning_restric
|
||||
#endif
|
||||
|
||||
// render a scanline
|
||||
scanline_bilinear2_min ();
|
||||
interlace_scanline scanline_bilinear2_min ();
|
||||
|
||||
scan.x[0] += scan.slopeX[0];
|
||||
scan.x[1] += scan.slopeX[1];
|
||||
@@ -680,7 +680,7 @@ void CTRTextureLightMap2_M4::drawTriangle_Min ( const s4DVertex* burning_restric
|
||||
#endif
|
||||
|
||||
// rasterize the edge scanlines
|
||||
for( line.y = yStart; line.y <= yEnd; ++line.y)
|
||||
for( line.y = yStart; line.y <= yEnd; line.y += SOFTWARE_DRIVER_2_STEP_Y)
|
||||
{
|
||||
line.x[scan.left] = scan.x[0];
|
||||
line.x[scan.right] = scan.x[1];
|
||||
@@ -711,7 +711,7 @@ void CTRTextureLightMap2_M4::drawTriangle_Min ( const s4DVertex* burning_restric
|
||||
#endif
|
||||
|
||||
// render a scanline
|
||||
scanline_bilinear2_min ();
|
||||
interlace_scanline scanline_bilinear2_min ();
|
||||
|
||||
scan.x[0] += scan.slopeX[0];
|
||||
scan.x[1] += scan.slopeX[1];
|
||||
@@ -769,9 +769,9 @@ void CTRTextureLightMap2_M4::drawTriangle(const s4DVertex* burning_restrict a, c
|
||||
return;
|
||||
|
||||
// calculate delta y of the edges
|
||||
scan.invDeltaY[0] = reciprocal_zero( ca );
|
||||
scan.invDeltaY[1] = reciprocal_zero( ba );
|
||||
scan.invDeltaY[2] = reciprocal_zero( cb );
|
||||
scan.invDeltaY[0] = fill_step_y( ca );
|
||||
scan.invDeltaY[1] = fill_step_y( ba );
|
||||
scan.invDeltaY[2] = fill_step_y( cb );
|
||||
|
||||
//if ( F32_LOWER_EQUAL_0 ( scan.invDeltaY[0] ) )
|
||||
// return;
|
||||
@@ -896,7 +896,7 @@ void CTRTextureLightMap2_M4::drawTriangle(const s4DVertex* burning_restrict a, c
|
||||
#endif
|
||||
|
||||
// rasterize the edge scanlines
|
||||
for( line.y = yStart; line.y <= yEnd; ++line.y)
|
||||
for( line.y = yStart; line.y <= yEnd; line.y += SOFTWARE_DRIVER_2_STEP_Y)
|
||||
{
|
||||
line.x[scan.left] = scan.x[0];
|
||||
line.x[scan.right] = scan.x[1];
|
||||
@@ -927,7 +927,7 @@ void CTRTextureLightMap2_M4::drawTriangle(const s4DVertex* burning_restrict a, c
|
||||
#endif
|
||||
|
||||
// render a scanline
|
||||
scanline_bilinear2_mag ();
|
||||
interlace_scanline scanline_bilinear2_mag ();
|
||||
|
||||
scan.x[0] += scan.slopeX[0];
|
||||
scan.x[1] += scan.slopeX[1];
|
||||
@@ -1057,7 +1057,7 @@ void CTRTextureLightMap2_M4::drawTriangle(const s4DVertex* burning_restrict a, c
|
||||
#endif
|
||||
|
||||
// rasterize the edge scanlines
|
||||
for( line.y = yStart; line.y <= yEnd; ++line.y)
|
||||
for( line.y = yStart; line.y <= yEnd; line.y += SOFTWARE_DRIVER_2_STEP_Y)
|
||||
{
|
||||
line.x[scan.left] = scan.x[0];
|
||||
line.x[scan.right] = scan.x[1];
|
||||
@@ -1088,7 +1088,7 @@ void CTRTextureLightMap2_M4::drawTriangle(const s4DVertex* burning_restrict a, c
|
||||
#endif
|
||||
|
||||
// render a scanline
|
||||
scanline_bilinear2_mag ();
|
||||
interlace_scanline scanline_bilinear2_mag ();
|
||||
|
||||
scan.x[0] += scan.slopeX[0];
|
||||
scan.x[1] += scan.slopeX[1];
|
||||
|
Reference in New Issue
Block a user