]> git.tdb.fi Git - libs/gl.git/blobdiff - source/core/sampler.h
Move all OpenGL-specific code to a separate directory
[libs/gl.git] / source / core / sampler.h
index 524a8fc5f95f01fbee29faa87a7f731c50b0e55d..bd8db31fdc8f9601f5ac2ac55e9762cead38fef4 100644 (file)
@@ -3,8 +3,8 @@
 
 #include <msp/datafile/objectloader.h>
 #include "color.h"
-#include "gl.h"
 #include "predicate.h"
+#include "sampler_backend.h"
 
 namespace Msp {
 namespace GL {
@@ -61,8 +61,10 @@ for magnification and NEAREST_MIPMAP_LINEAR for minification.
 If texture coordinates fall outside of the principal range of the texture,
 wrapping is applied.  The default for all directions is REPEAT.
 */
-class Sampler
+class Sampler: public SamplerBackend
 {
+       friend SamplerBackend;
+
 public:
        class Loader: public DataFile::ObjectLoader<Sampler>
        {
@@ -96,7 +98,6 @@ private:
                COMPARE = 128
        };
 
-       unsigned id;
        TextureFilter min_filter;
        TextureFilter mag_filter;
        float max_anisotropy;
@@ -152,15 +153,11 @@ public:
 
        void refresh() const { if(dirty_params) update(); }
 
-       unsigned get_id() const { return id; }
-
-       void set_debug_name(const std::string &);
+       using SamplerBackend::set_debug_name;
 };
 
 
 bool is_mipmapped(TextureFilter);
-GLenum get_gl_filter(TextureFilter);
-GLenum get_gl_wrap(TextureWrap);
 
 void operator>>(const LexicalConverter &, TextureFilter &);
 void operator>>(const LexicalConverter &, TextureWrap &);