git-svn-id: svn://db.shs.com.ru/libs@46 a8b55f48-bf90-11e4-a774-851b48703e85

This commit is contained in:
2015-11-24 14:45:54 +00:00
parent 48addec20f
commit 2ace72ff47
20 changed files with 216 additions and 167 deletions

View File

@@ -30,21 +30,17 @@ public:
virtual void renderScene();
protected:
void init(int width, int height) {fbo.resize(width, height);}
void resize(int width, int height) {fbo.resize(width, height);}
void init(int width, int height);
void resize(int width, int height);
void reloadShaders();
void setupShadersTextures(GLObjectBase & object, RenderingParameters & rp);
void setupShadersLights(int lights_count) {cplc = lights_count;}
void setupDSLights(int pass, int lights_per_pass, const QMatrix4x4 & view_matrix);
void setupAmbientLight(const QColor & a, bool first_pass);
void prepareUniform();
void setUniform(QGLShaderProgram * prog);
void drawFB(QGLShaderProgram * prog);
private:
int cplc;
GLFramebuffer fbo;
GLFramebuffer fbo_g, fbo_out;
QGLShaderProgram * shader_fxaa, * shader_ds_0, * shader_ds_1;
QMatrix4x4 pm, mvm, mvpm, pim, mvim, mvpim;