summaryrefslogtreecommitdiffstats
path: root/src/plugins/renderers/rhi/graphicshelpers/graphicscontext_p.h
diff options
context:
space:
mode:
authorJean-Michaƫl Celerier <jean-michael.celerier@kdab.com>2020-01-02 14:24:12 +0100
committerPaul Lemire <paul.lemire@kdab.com>2020-01-15 07:03:21 +0100
commit00d90969b270f4ebf9591904827de0fb17368b57 (patch)
tree598a32c8cd8bbbc7d73572c5a4eda0ff59f842a9 /src/plugins/renderers/rhi/graphicshelpers/graphicscontext_p.h
parent2389d9a9cfb0a2eb479574d6394a41a7008b418b (diff)
First triangle
Diffstat (limited to 'src/plugins/renderers/rhi/graphicshelpers/graphicscontext_p.h')
-rw-r--r--src/plugins/renderers/rhi/graphicshelpers/graphicscontext_p.h21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/plugins/renderers/rhi/graphicshelpers/graphicscontext_p.h b/src/plugins/renderers/rhi/graphicshelpers/graphicscontext_p.h
index 0583e3f11..89da47371 100644
--- a/src/plugins/renderers/rhi/graphicshelpers/graphicscontext_p.h
+++ b/src/plugins/renderers/rhi/graphicshelpers/graphicscontext_p.h
@@ -80,6 +80,10 @@ class QOpenGLShaderProgram;
class QAbstractOpenGLFunctions;
class QOpenGLDebugLogger;
+class QRhi;
+class QRhiSwapChain;
+class QRhiResourceUpdateBatch;
+
namespace Qt3DRender {
namespace Render {
@@ -93,7 +97,6 @@ namespace Rhi {
class GraphicsHelperInterface;
class RHIShader;
class RHIShaderManager;
-
typedef QPair<QString, int> NamedUniformLocation;
class Q_AUTOTEST_EXPORT GraphicsContext
@@ -103,7 +106,7 @@ public:
~GraphicsContext();
void setOpenGLContext(QOpenGLContext* ctx);
- QOpenGLContext *openGLContext() { return m_gl; }
+ //QOpenGLContext *openGLContext() { return m_gl; }
bool makeCurrent(QSurface *surface);
void doneCurrent();
bool hasValidGLHelper() const;
@@ -196,16 +199,20 @@ public:
GLint m_maxTextureUnits;
GLint m_maxImageUnits;
GLuint m_defaultFBO;
- QOpenGLContext *m_gl;
- GraphicsHelperInterface *m_glHelper;
+ //* QOpenGLContext *m_gl;
+ //* GraphicsHelperInterface *m_glHelper;
- QHash<QSurface *, GraphicsHelperInterface*> m_glHelpers;
+ //* QHash<QSurface *, GraphicsHelperInterface*> m_glHelpers;
GraphicsApiFilterData m_contextInfo;
QScopedPointer<QOpenGLDebugLogger> m_debugLogger;
friend class RHIVertexArrayObject;
RHIVertexArrayObject *m_currentVAO;
+ QRhi* m_rhi{};
+ QRhiSwapChain* m_sc{};
+ QRhiResourceUpdateBatch *m_currentUpdates{};
+
void applyUniform(const ShaderUniform &description, const UniformValue &v);
template<UniformType>
@@ -223,8 +230,8 @@ void GraphicsContext::applyUniformHelper<UniformTypeEnum>(const ShaderUniform &d
template<> \
void GraphicsContext::applyUniformHelper<UniformTypeEnum>(const ShaderUniform &description, const UniformValue &value) const \
{ \
- const int count = qMin(description.m_size, int(value.byteSize() / description.m_rawByteSize)); \
- m_glHelper->Func(description.m_location, count, value.constData<BaseType>()); \
+ /*/ const int count = qMin(description.m_size, int(value.byteSize() / description.m_rawByteSize)); \
+ m_glHelper->Func(description.m_location, count, value.constData<BaseType>()); */ \
}