rename GGLContext to just GLContext
This commit is contained in:
parent
db94c017bf
commit
045eec282a
@ -305,10 +305,10 @@ void GRenderWindow::showEvent(QShowEvent* event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<Frontend::GraphicsContext> GRenderWindow::CreateSharedContext() const {
|
std::unique_ptr<Frontend::GraphicsContext> GRenderWindow::CreateSharedContext() const {
|
||||||
return std::make_unique<GGLContext>(QOpenGLContext::globalShareContext());
|
return std::make_unique<GLContext>(QOpenGLContext::globalShareContext());
|
||||||
}
|
}
|
||||||
|
|
||||||
GGLContext::GGLContext(QOpenGLContext* shared_context)
|
GLContext::GLContext(QOpenGLContext* shared_context)
|
||||||
: context(new QOpenGLContext(shared_context->parent())),
|
: context(new QOpenGLContext(shared_context->parent())),
|
||||||
surface(new QOffscreenSurface(nullptr)) {
|
surface(new QOffscreenSurface(nullptr)) {
|
||||||
context->setShareContext(shared_context);
|
context->setShareContext(shared_context);
|
||||||
@ -318,10 +318,10 @@ GGLContext::GGLContext(QOpenGLContext* shared_context)
|
|||||||
surface->create();
|
surface->create();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GGLContext::MakeCurrent() {
|
void GLContext::MakeCurrent() {
|
||||||
context->makeCurrent(surface);
|
context->makeCurrent(surface);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GGLContext::DoneCurrent() {
|
void GLContext::DoneCurrent() {
|
||||||
context->doneCurrent();
|
context->doneCurrent();
|
||||||
}
|
}
|
||||||
|
@ -22,9 +22,9 @@ class QOpenGLContext;
|
|||||||
class GMainWindow;
|
class GMainWindow;
|
||||||
class GRenderWindow;
|
class GRenderWindow;
|
||||||
|
|
||||||
class GGLContext : public Frontend::GraphicsContext {
|
class GLContext : public Frontend::GraphicsContext {
|
||||||
public:
|
public:
|
||||||
explicit GGLContext(QOpenGLContext* shared_context);
|
explicit GLContext(QOpenGLContext* shared_context);
|
||||||
|
|
||||||
void MakeCurrent() override;
|
void MakeCurrent() override;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user