git-svn-id: svn://db.shs.com.ru/libs@47 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -53,6 +53,7 @@ void GLFramebuffer::resize(int width, int height) {
|
||||
glTexParameteri(target_, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
glTexParameteri(target_, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(target_, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(target_, GL_TEXTURE_MAX_LEVEL, 4);
|
||||
glTexParameteri(target_, GL_GENERATE_MIPMAP_SGIS, GL_FALSE);
|
||||
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0 + i, target_, colors[i], 0);
|
||||
}
|
||||
@@ -76,6 +77,13 @@ void GLFramebuffer::resize(int width, int height) {
|
||||
}
|
||||
|
||||
|
||||
QImage GLFramebuffer::grab() const {
|
||||
//glReadPixels(0, 0, wid, hei, GL_RGBA, );
|
||||
//QImage ret();
|
||||
return QImage();
|
||||
}
|
||||
|
||||
|
||||
void GLFramebuffer::bind() {
|
||||
if (is_changed) resize(wid, hei);
|
||||
if (fbo == 0) return;
|
||||
|
||||
Reference in New Issue
Block a user