1
0
Fork 0
mirror of https://git.coom.tech/drummyfish/small3dlib.git synced 2024-11-21 20:39:57 +01:00
This commit is contained in:
Miloslav Číž 2019-06-28 17:32:45 +02:00
parent 545ff0d137
commit cd7cf6ef01
4 changed files with 5 additions and 21 deletions

View file

@ -7,9 +7,7 @@
#include <SDL2/SDL.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include <stdlib.h>
#define S3L_FLAT 0
#define S3L_STRICT_NEAR_CULLING 0

View file

@ -6,8 +6,6 @@
*/
#include <stdio.h>
#include <math.h>
#include <time.h>
#define S3L_STRICT_NEAR_CULLING 0

View file

@ -9,7 +9,6 @@
#include <SDL2/SDL.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#define S3L_STRICT_NEAR_CULLING 0
@ -240,15 +239,7 @@ int main()
levelModelInit();
S3L_initScene(&levelModel,1,&scene);
/*
S3L_Unit s = S3L_FRACTIONS_PER_UNIT / 3;
S3L_Vec4 scale;
S3L_setVec4(&scale,s,s,s,S3L_FRACTIONS_PER_UNIT);
scene.models[0].transform.scale = scale;
*/
int running = 1;
while (running) // main loop

View file

@ -1489,9 +1489,8 @@ void S3L_initTransoform3D(S3L_Transform3D *t)
t->scale.w = 0;
}
/**
Performs perspecive division (z-divide). Does NOT check for division by zero.
*/
/** Performs perspecive division (z-divide). Does NOT check for division by
zero. */
static inline void S3L_perspectiveDivide(S3L_Vec4 *vector,
S3L_Unit focalLength)
{
@ -2047,7 +2046,6 @@ void S3L_drawTriangle(
b0FLS.stepScaled = rSideFLS.valueScaled / rowLength;
b1FLS.stepScaled = -1 * lSideFLS.valueScaled / rowLength;
#endif
#endif
@ -2201,7 +2199,7 @@ void S3L_drawTriangle(
S3L_stepFastLerp(depthFLS);
#endif
#else // !S3L_COMPUTE_DEPTH
p.depth = (tPointSS->z + lPointSS->z + rPointSS->z) / 3;
p.depth = (tPointSS->z + lPointSS->z + rPointSS->z) / 3;
#endif
#if S3L_Z_BUFFER
@ -2256,9 +2254,8 @@ void S3L_drawTriangle(
S3L_stepFastLerp(b1FLS);
#endif
#endif
} // inner loop
} // y clipping
} // inner loop
} // y clipping
S3L_stepFastLerp(lSideFLS);
S3L_stepFastLerp(rSideFLS);