Polyphase Game Engine
Loading...
Searching...
No Matches
C3dUtils.h
Go to the documentation of this file.
1#pragma once
2
3#if API_C3D
4
6
7#include "Assets/Material.h"
9#include "Maths.h"
10
11class StaticMesh;
12class Primitive3D;
13
14void CopyMatrixGlmToC3d(C3D_Mtx* dst, const glm::mat4& src);
15
16void BindVertexShader(ShaderId shaderId);
17void BindStaticMesh(StaticMesh* mesh, const void* instanceColors);
18void BindMaterial(MaterialLite* material, Primitive3D* primitive, bool useVertexColor, bool useBakedLighting);
19void SetupLighting(uint8_t lightingChannels, bool bakedLighting);
20void SetupLightEnv(LightEnv& lightEnv, uint8_t lightingChannels, bool bakedLighting);
21void PrepareForwardRendering();
22void PrepareUiRendering();
23
24void UploadUvOffsetScale(int8_t uniformLoc, MaterialLite* material, uint32_t uvIndex);
25void UploadUvSources(int8_t uniformLoc, MaterialLite* material);
26void UploadWorldMtx(int8_t uniformLoc, const C3D_Mtx& worldMtx);
27
28void ResetTexEnv();
29void ResetLightingEnv();
30
31void QueueLinearFree(void* data);
32void QueueTexFree(C3D_Tex tex);
33void ProcessQueuedFrees();
34
35uint32_t GlmColorToRGBA8(glm::vec4 color);
36uint32_t GlmColorToRGB8(glm::vec4 color);
37
38void ConfigTev(C3D_TexEnv* env, uint32_t slot, TevMode mode, bool vertexColorBlend);
39void ApplyWidgetRotation(C3D_Mtx& mtx, Widget* widget);
40
41#endif
TevMode
Definition EngineTypes.h:132
Definition MaterialLite.h:51
Definition Primitive3d.h:46
Definition StaticMesh.h:18
Definition Widget.h:53