feat: Update SketchGrid to use shaders and re-enable drawing
Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
@@ -3,6 +3,10 @@
|
||||
|
||||
#include <QOpenGLFunctions>
|
||||
#include <QMatrix4x4>
|
||||
#include <QOpenGLVertexArrayObject>
|
||||
#include <QOpenGLBuffer>
|
||||
|
||||
class QOpenGLShaderProgram;
|
||||
|
||||
class SketchGrid : protected QOpenGLFunctions
|
||||
{
|
||||
@@ -17,11 +21,14 @@ public:
|
||||
~SketchGrid();
|
||||
|
||||
void initializeGL();
|
||||
void paintGL(SketchPlane plane, const QMatrix4x4& projection, const QMatrix4x4& modelview);
|
||||
void paintGL(SketchPlane plane, QOpenGLShaderProgram* shaderProgram, int colorLoc);
|
||||
|
||||
private:
|
||||
void drawGridLines(SketchPlane plane);
|
||||
void drawAxes(SketchPlane plane);
|
||||
void drawGridLines(SketchPlane plane, QOpenGLShaderProgram* shaderProgram, int colorLoc);
|
||||
void drawAxes(SketchPlane plane, QOpenGLShaderProgram* shaderProgram, int colorLoc);
|
||||
|
||||
QOpenGLVertexArrayObject m_vao;
|
||||
QOpenGLBuffer m_vbo;
|
||||
};
|
||||
|
||||
#endif // SKETCHGRID_H
|
||||
|
||||
Reference in New Issue
Block a user