moGL  travis-test-3
Modern OpenGL wrapper, thin C++14 header-only layer on top of the OpenGL 4.5+ core spec
object/sampler.hpp
Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 #ifndef MOGL_SAMPLER_INCLUDED
00012 #define MOGL_SAMPLER_INCLUDED
00013 
00014 #include <mogl/object/handle.hpp>
00015 
00016 namespace mogl
00017 {
00018     class Sampler : public Handle<GLuint>
00019     {
00020     public:
00021         Sampler();
00022         ~Sampler();
00023 
00024         Sampler(const Sampler& other) = delete;
00025         Sampler& operator=(const Sampler& other) = delete;
00026 
00027         Sampler(Sampler&& other) = default;
00028 
00029     public:
00030         void    bind(GLuint unit);
00031         template <class T> void get(GLenum property, T* value); // Direct call to glGetSamplerParameter*v()
00032         template <class T> T    get(GLenum property);
00033         template <class T> void set(GLenum property, T value);
00034         bool    isHandleValid() const override final;
00035     };
00036 }
00037 
00038 #include "sampler.inl"
00039 
00040 #endif // MOGL_SAMPLER_INCLUDED
 All Classes Namespaces Files Functions Variables Defines