3#ifdef TRENDERINTERFACE_GL
14enum FRUSTUMPLANE_ : FRUSTUMPLANE
31 using Frustum = TPlane[ FRUSTUMPLANE_NUMOF ];
45 TMatrix44& GetProjectionMatrix() {
return m_matProjection; }
46 const TMatrix44& GetProjectionMatrix()
const {
return m_matProjection; }
48 TBOOL SetShaderProgram(
const T2Shader& a_rcShaderProgram );
50 GLuint GetTexture2D(
TINT a_iTextureIndex );
51 void SetTexture2D(
TINT a_iTextureIndex, GLuint a_uiTexture );
52 void SetTexture2D(
TINT a_iTextureIndex,
const T2GLTexture& a_rcTexture );
53 void ResetTexture2D(
TINT a_iTextureIndex );
55 void EnableDepthTest(
TBOOL a_bEnable );
56 void EnableBlend(
TBOOL a_bEnable );
59 static void ComputePerspectiveProjection( TMatrix44& a_rOutProjection,
const T2Viewport& a_rViewportParams,
const Projection& a_rProjParams );
60 static void ComputeOrthographicProjection( TMatrix44& a_rOutProjection,
const T2Viewport& a_rViewportParams,
const Projection& a_rProjParams );
62 static void ComputePerspectiveFrustum( Frustum& a_rcFrustum,
const T2Viewport& a_rViewportParams,
const Projection& a_rProjParams );
63 static void ComputeOrthographicFrustum( Frustum& a_rcFrustum,
const T2Viewport& a_rViewportParams,
const Projection& a_rProjParams );
65 static TBOOL CullSphereToFrustumSimple(
const TSphere& a_rSphere,
const TPlane* a_pPlanes,
TINT a_iNumPlanes );
66 static TINT CullSphereToFrustum(
const TSphere& a_rSphere,
const TPlane* a_pPlanes,
TINT a_iClipFlags,
TINT a_iClipFlagsMask );
69 TMatrix44 m_matProjection;
70 GLuint m_uiCurrentShaderProgram = -1;
71 TINT m_iCurrentTextureUnit = 0;
72 GLuint m_aCurrentTextures[ 8 ];
74 TBOOL m_bDepthTest : 1;
4x4 matrix implementation for the Toshi engine
#define TOSHI_NAMESPACE_START
#define TOSHI_NAMESPACE_END