git-svn-id: svn://db.shs.com.ru/libs@51 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -48,10 +48,10 @@ void RendererSimple::resizeFBO(int w, int h) {
|
||||
void RendererSimple::renderScene() {
|
||||
int passes = (view.lightsCount() - 1) / 8 + 1;
|
||||
//QMatrix4x4 pm = getGLMatrix(GL_PROJECTION_MATRIX), mvm = getGLMatrix(GL_MODELVIEW_MATRIX), pmvm = pm * mvm, lpm, lmvm, lpmvm;
|
||||
glSetCapEnabled(GL_MULTISAMPLE, view.isMultisamplingEnabled());
|
||||
glSetCapEnabled(GL_MULTISAMPLE, view.isFeatureEnabled(QGLView::qglMSAA));
|
||||
if (passes < 1) passes = 1;
|
||||
//glEnable(GL_FOG);
|
||||
if (view.isFXAAEnabled()) fbo.bind();
|
||||
if (view.isFeatureEnabled(QGLView::qglFXAA)) fbo.bind();
|
||||
//glEnable(GL_TEXTURE_2D);
|
||||
if (passes > 1) {
|
||||
fbo.bind();
|
||||
@@ -104,7 +104,7 @@ void RendererSimple::renderScene() {
|
||||
glDrawQuad();
|
||||
}
|
||||
}
|
||||
if (view.isFXAAEnabled() || passes > 1) {
|
||||
if (view.isFeatureEnabled(QGLView::qglFXAA) || passes > 1) {
|
||||
fbo.release();
|
||||
//glClearFramebuffer();
|
||||
glActiveTextureChannel(0);
|
||||
@@ -112,7 +112,7 @@ void RendererSimple::renderScene() {
|
||||
glSetLightEnabled(false);
|
||||
glSetCapEnabled(GL_BLEND, false);
|
||||
glDisableDepth();
|
||||
if (view.isFXAAEnabled()) {
|
||||
if (view.isFeatureEnabled(QGLView::qglFXAA)) {
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
shader_fxaa->bind();
|
||||
|
||||
Reference in New Issue
Block a user