ProgramPipeline.h
Go to the documentation of this file.
#pragma once
#include <set>
#include <glbinding/gl/types.h>
#include <globjects/globjects_api.h>
#include <globjects/base/ref_ptr.h>
#include <globjects/base/ChangeListener.h>
#include <globjects/Object.h>
namespace globjects
{
class Program;
class GLOBJECTS_API ProgramPipeline : public Object, protected ChangeListener
{
public:
ProgramPipeline();
virtual ~ProgramPipeline();
virtual void accept(ObjectVisitor & visitor) override;
void use() const;
static void release();
void useStages(Program * program, gl::UseProgramStageMask stages);
void releaseStages(gl::UseProgramStageMask stages);
void releaseProgram(Program * program);
bool isValid() const;
void validate() const;
bool checkUseStatus() const;
std::string infoLog() const;
gl::GLint get(gl::GLenum pname) const;
virtual void notifyChanged(const Changeable * sender) override;
virtual gl::GLenum objectType() const override;
protected:
void invalidate();
protected:
bool m_dirty;
std::set<ref_ptr<Program>> m_programs;
};
} // namespace globjects
ChangeListener.h
globjects
Contains all the classes that wrap OpenGL functionality.
globjects::Object
Superclass of all wrapped OpenGL objects.
Definition: Object.h:26
globjects::ProgramPipeline::m_programs
std::set< ref_ptr< Program > > m_programs
Definition: ProgramPipeline.h:53
globjects::ProgramPipeline
Definition: ProgramPipeline.h:21
globjects::Program
Wraps an OpenGL program.
Definition: Program.h:78
ref_ptr.h
globjects::Changeable
Superclass of all objects that want others to signal that they have changed.
Definition: Changeable.h:22
globjects::ObjectVisitor
Implements a Visitor Pattern to iterate over all tracked globjects objects.
Definition: ObjectVisitor.h:29
Object.h
globjects::ChangeListener
Allows listening to any Changeable.
Definition: ChangeListener.h:22
globjects::ProgramPipeline::m_dirty
bool m_dirty
Definition: ProgramPipeline.h:52