Replace GLFloats with floats.
Refactor KRCamera and KRScene to use width and height from KRSurface rather than stack and members.
This commit is contained in:
@@ -54,7 +54,7 @@ public:
|
||||
KRCamera(KRScene &scene, std::string name);
|
||||
virtual ~KRCamera();
|
||||
|
||||
void renderFrame(VkCommandBuffer& commandBuffer, KRSurface& surface, GLint defaultFBO, GLint renderBufferWidth, GLint renderBufferHeight);
|
||||
void renderFrame(VkCommandBuffer& commandBuffer, KRSurface& surface, GLint defaultFBO);
|
||||
|
||||
KRRenderSettings settings;
|
||||
|
||||
@@ -80,7 +80,6 @@ public:
|
||||
private:
|
||||
void createBuffers(GLint renderBufferWidth, GLint renderBufferHeight);
|
||||
|
||||
GLint m_backingWidth, m_backingHeight;
|
||||
GLint volumetricBufferWidth, volumetricBufferHeight;
|
||||
|
||||
GLuint compositeFramebuffer, compositeDepthTexture, compositeColorTexture;
|
||||
@@ -104,11 +103,11 @@ private:
|
||||
Vector4 m_fade_color;
|
||||
|
||||
typedef struct {
|
||||
GLfloat x;
|
||||
GLfloat y;
|
||||
GLfloat z;
|
||||
GLfloat u;
|
||||
GLfloat v;
|
||||
float x;
|
||||
float y;
|
||||
float z;
|
||||
float u;
|
||||
float v;
|
||||
} DebugTextVertexData;
|
||||
|
||||
KRDataBlock m_debug_text_vertices;
|
||||
|
||||
@@ -54,7 +54,7 @@ KRScene::~KRScene() {
|
||||
m_pRootNode = NULL;
|
||||
}
|
||||
|
||||
void KRScene::renderFrame(VkCommandBuffer& commandBuffer, KRSurface& surface, GLint defaultFBO, float deltaTime, int width, int height) {
|
||||
void KRScene::renderFrame(VkCommandBuffer& commandBuffer, KRSurface& surface, GLint defaultFBO, float deltaTime) {
|
||||
getContext().startFrame(deltaTime);
|
||||
KRCamera *camera = find<KRCamera>("default_camera");
|
||||
if(camera == NULL) {
|
||||
@@ -70,7 +70,7 @@ void KRScene::renderFrame(VkCommandBuffer& commandBuffer, KRSurface& surface, GL
|
||||
getContext().getAudioManager()->setReverbMaxLength(camera->settings.siren_reverb_max_length);
|
||||
getContext().getTextureManager()->setMaxAnisotropy(camera->settings.max_anisotropy);
|
||||
|
||||
camera->renderFrame(commandBuffer, surface, defaultFBO, width, height);
|
||||
camera->renderFrame(commandBuffer, surface, defaultFBO);
|
||||
getContext().endFrame(deltaTime);
|
||||
physicsUpdate(deltaTime);
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
bool rayCast(const Vector3 &v0, const Vector3 &dir, HitInfo &hitinfo, unsigned int layer_mask);
|
||||
bool sphereCast(const Vector3 &v0, const Vector3 &v1, float radius, HitInfo &hitinfo, unsigned int layer_mask);
|
||||
|
||||
void renderFrame(VkCommandBuffer& commandBuffer, KRSurface& surface, GLint defaultFBO, float deltaTime, int width, int height);
|
||||
void renderFrame(VkCommandBuffer& commandBuffer, KRSurface& surface, GLint defaultFBO, float deltaTime);
|
||||
void render(VkCommandBuffer& commandBuffer, KRCamera *pCamera, unordered_map<AABB, int> &visibleBounds, const KRViewport &viewport, KRNode::RenderPass renderPass, bool new_frame);
|
||||
|
||||
void render(VkCommandBuffer& commandBuffer, KROctreeNode *pOctreeNode, unordered_map<AABB, int> &visibleBounds, KRCamera *pCamera, std::vector<KRPointLight *> &point_lights, std::vector<KRDirectionalLight *> &directional_lights, std::vector<KRSpotLight *>&spot_lights, const KRViewport &viewport, KRNode::RenderPass renderPass, std::vector<KROctreeNode *> &remainingOctrees, std::vector<KROctreeNode *> &remainingOctreesTestResults, std::vector<KROctreeNode *> &remainingOctreesTestResultsOnly, bool bOcclusionResultsPass, bool bOcclusionTestResultsOnly);
|
||||
|
||||
Reference in New Issue
Block a user