git-svn-id: svn://db.shs.com.ru/libs@666 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -217,14 +217,10 @@ void Framebuffer::blit(int index_from, GLuint fb_to, int index_to, QRect from, Q
|
||||
void Framebuffer::bind() {
|
||||
if (is_changed) resize(wid, hei);
|
||||
if (fbo == 0) return;
|
||||
//glFlush();
|
||||
f->glGetIntegerv(GL_VIEWPORT, prev_view);
|
||||
//glClearError();
|
||||
f->glBindFramebuffer(GL_FRAMEBUFFER, fbo);
|
||||
//qDebug() << QString::number(glGetError(), 16);
|
||||
setWriteBuffers();
|
||||
f->glReadBuffer(GL_COLOR_ATTACHMENT0);
|
||||
//f->glDrawBuffer(GL_COLOR_ATTACHMENT0);
|
||||
f->glViewport(0, 0, wid, hei);
|
||||
}
|
||||
|
||||
@@ -232,7 +228,6 @@ void Framebuffer::bind() {
|
||||
void Framebuffer::release() {
|
||||
is_changed = false;
|
||||
if (fbo == 0) return;
|
||||
//glFlush();
|
||||
f->glBindFramebuffer(GL_FRAMEBUFFER, 0);
|
||||
f->glViewport(prev_view[0], prev_view[1], prev_view[2], prev_view[3]);
|
||||
}
|
||||
@@ -245,7 +240,7 @@ void Framebuffer::setWriteBuffer(int index) {
|
||||
}
|
||||
|
||||
|
||||
void Framebuffer::setWriteBuffers(int * indeces, int count) {
|
||||
void Framebuffer::setWriteBuffers(const int * indeces, int count) {
|
||||
unsetWriteBuffers();
|
||||
QVector<GLenum> buffers;
|
||||
for (int i = 0; i < count; ++i)
|
||||
|
||||
Reference in New Issue
Block a user