JD2022-TU1/main/extern/Camcam/LIBS/Render/NUL_Class.h

96 lines
3.5 KiB
C++

#include "TRACK.H"
class NUL_DI:public DrawInterface
{
float OPTIM_4x4_Persp[16];
float OPTIM_4x4_Model[16];
float OPTIM_4x4_Texture[16];
u32 FrameNumber;
public :
void Begin(RECT *HdcRect);
void End();
void Flush();
void Perspective(float FocaleLenght);
void Holographic(Vector *pUP,float WindowWith);
void Ortho();
void Flip(s32 ShowMe);
void Clear(u32 Color);
void ClearZ();
void Matrix(MATRIX *MatrixToSet);
void RenderMesh(Mesh *pMyMesh,u32 Num, u32 Base);
void ReverseRenderMesh(Mesh *pMyMesh,u32 TextureSource,u32 Num, u32 Base);
void SetRS(RS *RenderMode,u32 TextureIndex);
void DrawQuad(u32 Color,float X, float Y,float Xsize, float Ysize,float TX,float TY,float TW,float TH);
void DrawCenteredQuad(u32 Color,float Xsize, float Ysize,float FX,float FY);
void SetCurrentColor(u32 Color) { CurrentColor = Color; };
u32 GetCurrentColor() { return CurrentColor;};
void ReadFrameBuffer(s32 X,s32 Y,s32 SX,s32 SY, MAP *dest);
/* Texture management */
u32 CreateTexture(MAP *pExternalReferenceRGBA,u32 ColorMode, bool forceCreation = false) ;
void CreateTexture(u32 IndexToCreate,u32 ColorMode) ;
u32 CreateLayerTexture(MAP *pExternalReferenceRGBA,u32 LayerIndex);
void DestroyLayerTexture(u32 TextureIndex);
void SetTextureColorMode(u32 Index,u32 ColorMode) ;
void UpdateTexture_BM_2_HW(u32 TextureIndex, bool isDynamic = true);
void UpdateTexture_HW_2_BM(u32 TextureIndex,u32 UpdateSoftBuffer,s32 SourceX,s32 SourceY);
void UpdateTexture_HW_2_BM(u32 TextureIndex,u32 UpdateSoftBuffer) {UpdateTexture_HW_2_BM(TextureIndex,UpdateSoftBuffer,0,0);};
void DestroyTexture(u32 TextureIndex);
void DrawQuad(u32 TextureIndex,s32 XMin,s32 XMax,s32 YMin,s32 YMax,RS *RenderMode = NULL);
void DrawQuadDistord(u32 TextureIndex,s32 XMin,s32 XMax,s32 YMin,s32 YMax,RS *RenderMode = NULL);
void DrawLine(u32 Color,Vector *A,Vector *B, int Lenght = 0);
void Setexture(u32 TextureIndex,float *UVMatrix = NULL);
void SetFog(u32 OnOff,float Near , float far , u32 Color);
void BeginTextureTarget(u32 TextureIndex,u32 SaveFrontBuffer = 0);
void EndTextureTarget(u32 TextureIndex,u32 bUpdateSoftBuffer);
void SetViewport(s32 X,s32 Y,s32 SX,s32 SY);
void SetClipping(s32 X,s32 Y,s32 SX,s32 SY);
u32 GetTexFreeIndex();
void AfterEffect(u32 ulType,u32 Color,float Factor1,float Factor2,float Factor3 = 0.0f,float Factor4 = 0.0f,float Factor5 = 0.0f);
void LayerOperation(u32 ulType,u32 SlotIndex,u32 Color,float Factor1,float Factor2) ;
void ValidateLayer(u32 Index);
/* Text */
void DrawText(unsigned char *Txt,float X, float Y, float FX, float FY , u32 ColorRGBA , u32 DrawModeShadow = 1);
void GetTextSize(unsigned char *Txt,s32 *DX,s32 *DY, SIZE *CharBounds = NULL);
void DrawTextCentered(unsigned char *pTEXT,u32 Color);
void RenderText(unsigned char *Txt,float X, float Y, float FX, float FY , u32 ColorRGBA, MAP *fontMap, int TextureIdx, SIZE *CharPos, SIZE *CharBounds, u32 optionMask, int blendingMode = -1);
/* Win32 */
void Destroy(); // Destroy
void AdaptTOWindow(HWND hWnd);
void ChangeMode(HWND Mother, bool UseGDI);
void SetResolution(u32 SX,u32 SY);
void Blitte();
/* Particules */
void DrawParticules(void *particuleList, int nbParticules, u32 TextureIndex, SIZE grid,RS *RenderState, MATRIX Orientation);
/* Fur */
void DrawFur(void *fur, u32 TextureIndex,RS *RenderState, MATRIX Orientation, u32 debug);
/* Picking */
/* Matrix Overloadd */
/* 0 = Projection , 1 = Model , 2 = Texture */
void GetMatrix(u32 Mode,float *pDest);
void SetMatrix(u32 Mode,float *pDest);
u32 GetDriverType() {return 2;}; // "opengl" = 0 , 'D3D' = 1
};