Loading...
Searching...
No Matches
ProgramBinary.h
Go to the documentation of this file.
#pragma once
#include <vector>
#include <glbinding/gl/types.h>
#include <globjects/globjects_api.h>
#include <globjects/base/Referenced.h>
#include <globjects/base/ChangeListener.h>
#include <globjects/base/Changeable.h>
#include <globjects/base/ref_ptr.h>
namespace globjects
{
class AbstractStringSource;
class GLOBJECTS_API ProgramBinary : public Referenced, public Changeable, protected ChangeListener
{
public:
ProgramBinary(gl::GLenum binaryFormat, const std::vector<char> & binaryData);
ProgramBinary(gl::GLenum binaryFormat, AbstractStringSource * dataSource);
gl::GLenum format() const;
const void * data() const;
gl::GLsizei length() const;
virtual void notifyChanged(const Changeable* sender) override;
protected:
virtual ~ProgramBinary();
void validate() const;
protected:
gl::GLenum m_binaryFormat;
ref_ptr<AbstractStringSource> m_dataSource;
mutable bool m_valid;
mutable std::vector<unsigned char> m_binaryData;
};
} // namespace globjects
ChangeListener.h
Changeable.h
Referenced.h
globjects::AbstractStringSource
Superclass for all types of static and dynamic strings, e.g. for the use as Shader code.
Definition AbstractStringSource.h:26
globjects::ChangeListener
Allows listening to any Changeable.
Definition ChangeListener.h:23
globjects::Changeable
Superclass of all objects that want others to signal that they have changed.
Definition Changeable.h:23
globjects::ProgramBinary
The ProgramBinary class is used for directly setting binary sources for a Program.
Definition ProgramBinary.h:28
globjects::ProgramBinary::m_binaryFormat
gl::GLenum m_binaryFormat
Definition ProgramBinary.h:45
globjects::ProgramBinary::data
const void * data() const
globjects::ProgramBinary::ProgramBinary
ProgramBinary(gl::GLenum binaryFormat, const std::vector< char > &binaryData)
globjects::ProgramBinary::validate
void validate() const
globjects::ProgramBinary::notifyChanged
virtual void notifyChanged(const Changeable *sender) override
globjects::ProgramBinary::~ProgramBinary
virtual ~ProgramBinary()
globjects::ProgramBinary::m_binaryData
std::vector< unsigned char > m_binaryData
Definition ProgramBinary.h:49
globjects::ProgramBinary::m_valid
bool m_valid
Definition ProgramBinary.h:48
globjects::ProgramBinary::length
gl::GLsizei length() const
globjects::ProgramBinary::ProgramBinary
ProgramBinary(gl::GLenum binaryFormat, AbstractStringSource *dataSource)
globjects::ProgramBinary::m_dataSource
ref_ptr< AbstractStringSource > m_dataSource
Definition ProgramBinary.h:46
globjects::ProgramBinary::format
gl::GLenum format() const
globjects::Referenced
Superclass for all classes that use reference counting in globjects.
Definition Referenced.h:23
globjects::ref_ptr
The ref_ptr class provides the interface for a reference pointer.
Definition ref_ptr.h:33
globjects
Contains all the classes that wrap OpenGL functionality.
ref_ptr.h