Cleanup methods in KRCamera that should be private
--HG-- extra : convert_revision : svn%3A7752d6cf-9f14-4ad2-affc-04f1e67b81a5/trunk%4068
This commit is contained in:
@@ -352,7 +352,7 @@ void KRCamera::renderFrame(KRContext &context, KRScene &scene, KRMat4 &viewMatri
|
||||
}
|
||||
|
||||
|
||||
void KRCamera::createBuffers() {
|
||||
void KRCamera::createBuffers(KRContext &context) {
|
||||
// ===== Create offscreen compositing framebuffer object =====
|
||||
glGenFramebuffers(1, &compositeFramebuffer);
|
||||
glBindFramebuffer(GL_FRAMEBUFFER, compositeFramebuffer);
|
||||
@@ -394,6 +394,7 @@ void KRCamera::createBuffers() {
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, lightAccumulationTexture, 0);
|
||||
|
||||
allocateShadowBuffers();
|
||||
loadShaders(context);
|
||||
}
|
||||
|
||||
void KRCamera::allocateShadowBuffers() {
|
||||
|
||||
@@ -58,9 +58,7 @@ public:
|
||||
void invalidatePostShader();
|
||||
void invalidateShadowBuffers();
|
||||
void allocateShadowBuffers();
|
||||
void createBuffers();
|
||||
|
||||
void loadShaders(KRContext &context);
|
||||
void createBuffers(KRContext &context);
|
||||
|
||||
KRVector3 getPosition() const;
|
||||
void setPosition(const KRVector3 &position);
|
||||
@@ -163,6 +161,8 @@ private:
|
||||
|
||||
void renderFrame(KRContext &context, KRScene &scene, KRMat4 &viewMatrix, KRVector3 &lightDirection, KRVector3 &cameraPosition);
|
||||
|
||||
void loadShaders(KRContext &context);
|
||||
|
||||
// Code using these shader functions will later be refactored to integrate with KRShaderManager
|
||||
static bool ValidateProgram(GLuint prog);
|
||||
static bool LoadShader(KRContext &context, const std::string &name, GLuint *programPointer, const std::string &options);
|
||||
|
||||
@@ -59,8 +59,7 @@ double const PI = 3.141592653589793f;
|
||||
|
||||
m_camera.backingWidth = width;
|
||||
m_camera.backingHeight = height;
|
||||
m_camera.createBuffers();
|
||||
m_camera.loadShaders(m_context);
|
||||
m_camera.createBuffers(m_context);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -201,7 +201,7 @@
|
||||
|
||||
- (KRScene *)getScene;
|
||||
{
|
||||
return renderEngine.context->getSceneManager()->getFirstScene();
|
||||
return renderEngine.context.getSceneManager()->getFirstScene();
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
||||
Reference in New Issue
Block a user