scopes: don't use shared context
OpenGL shared contexts (through Qt at least) seem to be buggy. Scopes have been shifted to a non-shared approach as a result.
This commit is contained in:
@@ -74,6 +74,11 @@ void OpenGLTexture::Create(QOpenGLContext *ctx, int width, int height, const Pix
|
||||
}
|
||||
|
||||
void OpenGLTexture::Create(QOpenGLContext *ctx, FramePtr frame)
|
||||
{
|
||||
Create(ctx, frame.get());
|
||||
}
|
||||
|
||||
void OpenGLTexture::Create(QOpenGLContext *ctx, Frame *frame)
|
||||
{
|
||||
Create(ctx, frame->width(), frame->height(), frame->format(), frame->data(), frame->linesize_pixels());
|
||||
}
|
||||
@@ -120,6 +125,16 @@ const GLuint &OpenGLTexture::texture() const
|
||||
return texture_;
|
||||
}
|
||||
|
||||
void OpenGLTexture::Upload(FramePtr frame)
|
||||
{
|
||||
Upload(frame.get());
|
||||
}
|
||||
|
||||
void OpenGLTexture::Upload(Frame *frame)
|
||||
{
|
||||
Upload(frame->data(), frame->linesize_pixels());
|
||||
}
|
||||
|
||||
void OpenGLTexture::Upload(const void *data, int linesize)
|
||||
{
|
||||
if (!IsCreated()) {
|
||||
|
||||
Reference in New Issue
Block a user