2#include <QOpenGLExtraFunctions>
79 template<
typename VertexType,
typename FieldType>
89template<
typename VertexType,
typename FieldType>
Shader program having a default vertex and fragment shader.
Definition ShaderProgram.h:13
Attribute
Enumeration of available shader attributes to map data in the object buffers. Names of the enum type ...
Definition ShaderProgram.h:22
VertexArrayBase(QOpenGLShaderProgram *parent)
Default Qt object constructor. When the shader program is deleted, all vertex arrays referencing it s...
void setAttribPointer(ShaderProgram::Attribute sa, size_t offset)
Makes a call to glVertexAttribPointer() in a smart way.
Definition VertexArray.h:90
void paint() override
Paints the object old style OpenGL.
GLuint handle_type
Type for the handle of the vertex array.
Definition VertexArray.h:20
void draw() override
Draws the vertex array. Specifically called from the paintGL() function of the OpenGL widget.
bool setup() override
Sets up the vertex array for the OpenGL context.
virtual void doDraw()=0
Method to be overridden by a derived class. Called when the handle is valid from the draw() function.
ShaderProgram * shaderProgram()
Gets the associated shader program.
VertexArray(ShaderProgram *sp)
Constructor.
virtual void doPaint()=0
Method to be overridden by a derived class.
~VertexArray() override
Virtual destructor.
virtual bool doCreate()=0
Method to be overridden by a derived class.
Definition DemoRenderer.h:6
void setVertexAttribPointer(QOpenGLShaderProgram *sp, GLuint attr_loc, size_t offset)
Makes a call to glVertexAttribPointer() and to glEnableVertexAttribArray() smartly.
#define _XGL_CLASS
Definition xgl/global.h:35