git-svn-id: svn://db.shs.com.ru/libs@643 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -245,13 +245,14 @@ void Framebuffer::release() {
|
||||
|
||||
|
||||
void Framebuffer::setWriteBuffer(int index) {
|
||||
//QVector<GLenum> buffers; buffers << GL_COLOR_ATTACHMENT0 + index;
|
||||
unsetWriteBuffers();
|
||||
GLenum e = GL_COLOR_ATTACHMENT0 + index;
|
||||
f->glDrawBuffers(1, &e);
|
||||
}
|
||||
|
||||
|
||||
void Framebuffer::setWriteBuffers(int * indeces, int count) {
|
||||
unsetWriteBuffers();
|
||||
QVector<GLenum> buffers;
|
||||
for (int i = 0; i < count; ++i)
|
||||
buffers << GL_COLOR_ATTACHMENT0 + indeces[i];
|
||||
@@ -267,6 +268,12 @@ void Framebuffer::setWriteBuffers() {
|
||||
}
|
||||
|
||||
|
||||
void Framebuffer::unsetWriteBuffers() {
|
||||
QVector<GLenum> buffers(colors.size(), GL_NONE);
|
||||
f->glDrawBuffers(buffers.size(), buffers.constData());
|
||||
}
|
||||
|
||||
|
||||
void Framebuffer::enablePixelBuffer() {
|
||||
pbo.init(f);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user