LocationIdentity.h
Go to the documentation of this file.
#pragma once
#include <string>
#include <functional>
#include <glbinding/gl/types.h>
#include <globjects/globjects_api.h>
namespace globjects
{
class GLOBJECTS_API LocationIdentity
{
public:
LocationIdentity();
LocationIdentity(gl::GLint location);
LocationIdentity(const std::string & name);
bool isLocation() const;
bool isName() const;
gl::GLint location() const;
const std::string & name() const;
bool operator==(const LocationIdentity & identity) const;
bool operator!=(const LocationIdentity & identity) const;
bool operator<(const LocationIdentity & identity) const;
std::size_t hash() const;
protected:
bool m_invalid;
gl::GLint m_location;
std::string m_name;
bool m_hasName;
};
} // namespace globjects
namespace std
{
template <>
struct hash<globjects::LocationIdentity>
{
std::size_t operator()(const globjects::LocationIdentity & identity) const
{
return identity.hash();
}
};
} // namespace globjects
globjects::LocationIdentity::m_location
gl::GLint m_location
Definition: LocationIdentity.h:39
globjects::LocationIdentity::hash
std::size_t hash() const
std::hash< globjects::LocationIdentity >::operator()
std::size_t operator()(const globjects::LocationIdentity &identity) const
Definition: LocationIdentity.h:54
globjects::LocationIdentity::m_name
std::string m_name
Definition: LocationIdentity.h:41
globjects
Contains all the classes that wrap OpenGL functionality.
globjects::LocationIdentity::m_invalid
bool m_invalid
Definition: LocationIdentity.h:37
std
Definition: LocationIdentity.h:48
globjects::LocationIdentity
Definition: LocationIdentity.h:16
globjects::LocationIdentity::m_hasName
bool m_hasName
Definition: LocationIdentity.h:42