further development on rewrite
This commit is contained in:
@@ -2,10 +2,17 @@
|
||||
|
||||
#include <QOpenGLContext>
|
||||
#include <QOpenGLFunctions>
|
||||
#include <QOpenGLTexture>
|
||||
|
||||
ViewerGLWidget::ViewerGLWidget()
|
||||
#include "render/gl/glfunc.h"
|
||||
#include "render/gl/shadergenerators.h"
|
||||
|
||||
QImage img;
|
||||
|
||||
ViewerGLWidget::ViewerGLWidget(QWidget *parent) :
|
||||
QOpenGLWidget(parent)
|
||||
{
|
||||
|
||||
img.load("/home/matt/Pictures/heck.png");
|
||||
}
|
||||
|
||||
void ViewerGLWidget::paintGL()
|
||||
@@ -14,4 +21,16 @@ void ViewerGLWidget::paintGL()
|
||||
|
||||
f->glClearColor(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
f->glClear(GL_COLOR_BUFFER_BIT);
|
||||
|
||||
QOpenGLTexture* tex = new QOpenGLTexture(img);
|
||||
|
||||
ShaderPtr pipeline = olive::gl::GetDefaultPipeline();
|
||||
|
||||
tex->bind();
|
||||
|
||||
olive::gl::Blit(pipeline, true);
|
||||
|
||||
tex->release();
|
||||
|
||||
delete tex;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user