2 * Copyright 2013 The Android Open Source Project
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 #include <math/mat4.h>
20 #ifndef SF_RENDER_ENGINE_TEXTURE_H
21 #define SF_RENDER_ENGINE_TEXTURE_H
26 uint32_t mTextureName;
27 uint32_t mTextureTarget;
34 enum Target { TEXTURE_2D = 0x0DE1, TEXTURE_EXTERNAL = 0x8D65 };
37 Texture(Target textureTarget, uint32_t textureName);
40 void init(Target textureTarget, uint32_t textureName);
42 void setMatrix(float const* matrix);
43 void setFiltering(bool enabled);
44 void setDimensions(size_t width, size_t height);
46 uint32_t getTextureName() const;
47 uint32_t getTextureTarget() const;
49 const mat4& getMatrix() const;
50 bool getFiltering() const;
51 size_t getWidth() const;
52 size_t getHeight() const;
55 } /* namespace android */
56 #endif /* SF_RENDER_ENGINE_TEXTURE_H */