Some defines
This commit is contained in:
parent
debc5b219b
commit
ecaccfd0e0
@ -3,7 +3,8 @@
|
||||
#include "../World/DbgCube.hpp"
|
||||
#include "../World/Tank.hpp"
|
||||
|
||||
//#define DISABLE_INVISIBLE_VERTICES
|
||||
//#define DISABLE_AABB_CLIPPING
|
||||
//#define DISABLE_TRIANGLE_CLIPPING
|
||||
|
||||
|
||||
// Rendering pipeline:
|
||||
@ -113,7 +114,7 @@ void Graphic3DRenderer::Draw(sf::RenderTexture& context) {
|
||||
// Object outside frustrum clipping
|
||||
projAABB.Transform(projAABB, oTMat);
|
||||
M3D_ContainmentType objInFrustrum = camFrustrum.Contains(projAABB);
|
||||
#ifndef DISABLE_INVISIBLE_VERTICES
|
||||
#ifndef DISABLE_AABB_CLIPPING
|
||||
if (objInFrustrum != DISJOINT)
|
||||
#endif
|
||||
{
|
||||
@ -140,10 +141,12 @@ void Graphic3DRenderer::Draw(sf::RenderTexture& context) {
|
||||
break;
|
||||
|
||||
// Triangle clipping
|
||||
//TODO: scissor/clipping depending of how many vertices are outside/inside the clipspace, implement complete Cohen-Sutherland algo or similar
|
||||
#ifndef DISABLE_TRIANGLE_CLIPPING
|
||||
//TODO: scissor/clipping depending of how many vertices are outside/inside the clipspace, implement complete Cohen-Sutherland algo or Cyrus–Beck one
|
||||
if (VertexClipTest(projVertices[indicePtr[i]], mRTSize, 2.5f) &&
|
||||
VertexClipTest(projVertices[indicePtr[i+1]], mRTSize, 2.5f) &&
|
||||
VertexClipTest(projVertices[indicePtr[i+2]], mRTSize, 2.5f))
|
||||
#endif
|
||||
{
|
||||
|
||||
M3D_VECTOR V1 = M3D_V4LoadF4(&projVertices[indicePtr[i]]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user