VoltAir
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Groups Pages
DirectTexture.h
1 /*
2  * Copyright (C) 2014 Google Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef DIRECTTEXTURE_H
18 #define DIRECTTEXTURE_H
19 
20 #include "RendererCommon.h"
21 #include "Texture.h"
22 
30 class DirectTexture : public Texture {
31 public:
35  DirectTexture();
40  DirectTexture(GLuint id);
45  virtual ~DirectTexture();
46 
47  virtual void bind() override;
48  virtual void unbind() override;
53  virtual int getWidth() const override;
58  virtual int getHeight() const override;
59  virtual GLint getMagnificationFilter() override;
60  virtual void setMagnificationFilter(GLint value) override;
61  virtual GLint getMinificationFilter() override;
62  virtual void setMinificationFilter(GLint value) override;
63  virtual GLint getHorizontalWrapMode() override;
64  virtual void setHorizontalWrapMode(GLint value) override;
65  virtual GLint getVerticalWrapMode() override;
66  virtual void setVerticalWrapMode(GLint value) override;
67 
68 private:
69  GLuint mId = 0;
70  GLint mMagFilter = GL_LINEAR;
71  GLint mMinFilter = GL_NEAREST_MIPMAP_LINEAR;
72  GLint mHorizontalWrapMode = GL_REPEAT;
73  GLint mVerticalWrapMode = GL_REPEAT;
74 };
75 
76 #endif // DIRECTTEXTURE_H
virtual void setMinificationFilter(GLint value) override
Sets the minification filter mode applied to this Texture.
Header declaring and including types common to renderer classes such as Vector2. Also includes GL hea...
A texture which points to a user managed GL texture object.
Definition: DirectTexture.h:30
DirectTexture()
Creates a Texture which references the invalid texture object zero.
virtual void setHorizontalWrapMode(GLint value) override
Sets the wrap mode to apply to the Texture horizontally.
Texture abstract base class.
Definition: Texture.h:32
virtual ~DirectTexture()
Cleans up additional resources owned by this object.
virtual void setMagnificationFilter(GLint value) override
Sets the magnification filter mode applied to this Texture.
virtual void setVerticalWrapMode(GLint value) override
Sets the wrap mode to apply to the Texture vertically.
virtual void bind() override
Binds this Texture to the current active texture stage.
virtual GLint getVerticalWrapMode() override
Returns the wrap mode to apply to the Texture vertically.
virtual GLint getMagnificationFilter() override
Returns the magnification filter mode applied to this Texture.
virtual int getWidth() const override
Current unsupported.
virtual int getHeight() const override
Current unsupported.
virtual GLint getHorizontalWrapMode() override
Returns the wrap mode to apply to the Texture horizontally.
virtual void unbind() override
Unbinds this Texture from the current active texture stage.
virtual GLint getMinificationFilter() override
Returns the minification filter mode applied to this Texture.