8 typedef union SDL_Event SDL_Event;
11 #if defined(__clang__) || defined(__GNUC__) 12 #define RENDERER_PRINTFARGS(FMT) __attribute__((format(printf, FMT, (FMT+1)))) 14 #define RENDERER_PRINTFARGS(FMT) 27 bool onSDLEvent(
const SDL_Event *event);
30 void renderStageBegin();
31 void renderStageEnd();
36 static bool getIsRenderingStage()
37 {
return m_instance !=
nullptr && m_instance->m_isRenderingStage; }
38 static bool getIsRenderingUI()
39 {
return m_instance !=
nullptr && m_instance->m_isRenderingUI; }
40 static float getWindowWidth()
41 {
return static_cast<float>(m_instance->m_windowWidth); }
42 static float getWindowHeight()
43 {
return static_cast<float>(m_instance->m_windowHeight); }
44 static float getWindowAspectRatio()
45 {
return static_cast<float>(m_instance->m_windowWidth) / static_cast<float>(m_instance->m_windowHeight); }
47 void setProjectionMatrix(
const glm::mat4 &matrix)
48 { m_projectionMatrix= matrix; }
49 void setCameraViewMatrix(
const glm::mat4 &matrix)
50 { m_cameraViewMatrix= matrix; }
52 static const glm::mat4 &getCurrentProjectionMatrix()
53 {
return m_instance->m_projectionMatrix; }
54 static const glm::mat4 &getCurrentCameraViewMatrix()
55 {
return m_instance->m_cameraViewMatrix; }
58 bool m_sdlapi_initialized;
60 struct SDL_Window *m_window;
61 int m_windowWidth, m_windowHeight;
68 bool m_isRenderingStage;
73 bool m_MousePressed[3];
75 unsigned int m_FontTexture;
82 void drawTextAtWorldPosition(
const glm::mat4 &transform,
const glm::vec3 &position,
const char *format, ...) RENDERER_PRINTFARGS(3);
83 void drawFullscreenTexture(
const unsigned int texture_id);
87 void drawTransformedAxes(
const glm::mat4 &transform,
float xScale,
float yScale,
float zScale);
90 void drawTransformedTexturedCube(
const glm::mat4 &transform,
int textureId,
float scale);
92 void drawPointCloud(
const glm::mat4 &transform,
const glm::vec3 &color,
const float *points,
const int point_count);
96 const int subdiv= 64);
97 void drawLineStrip(
const glm::mat4 &transform,
const glm::vec3 &color,
const float *points,
const int point_count);
98 void drawPoseArrayStrip(
const struct PSMovePose *poses,
const int poseCount,
const glm::vec3 &color);
99 void drawDK2Model(
const glm::mat4 &transform);
101 void drawPSNaviModel(
const glm::mat4 &transform);
103 void drawPS3EyeModel(
const glm::mat4 &transform);
Definition: Renderer.h:18
Definition: ClientGeometry.h:176
Definition: type_mat2x2.hpp:45
A screen location in the space [-frameWidth/2, -frameHeight/2]x[frameWidth/2, frameHeight/2].
Definition: ClientGeometry.h:117
OpenGL Mathematics (glm.g-truc.net)
Definition: ClientGeometry.h:186
Definition: type_mat2x2.hpp:39
Definition: ClientGeometry.h:164
Definition: ClientGeometry.h:214
Definition: type_mat2x2.hpp:49