texture.h
Go to the documentation of this file.
1 /*
2  * Copyright 2014 Google Inc. All Rights Reserved.
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 TANGO_GL_TEXTURE_H_
18 #define TANGO_GL_TEXTURE_H_
19 
20 #include <errno.h>
21 
22 #ifdef __ANDROID__
23 #include <png.h>
24 #endif
25 
26 #include "tango-gl/util.h"
27 
28 namespace tango_gl {
29 class Texture {
30  public:
31  Texture(const char* file_path);
32  Texture(const Texture& other) = delete;
33  Texture& operator=(const Texture&) = delete;
34  ~Texture();
35 
36 #ifdef __ANDROID__
37  bool LoadFromPNG(const char* file_path);
38 #endif
39  GLuint GetTextureID() const;
40 
41  private:
42 #ifdef __ANDROID__
43  png_uint_32 width_, height_;
44 #endif
46  char* byte_data_;
48 };
49 } // namespace tango_gl
50 #endif // TANGO_GL_TEXTURE_H_
Texture & operator=(const Texture &)=delete
unsigned int GLuint
Definition: dummy.cpp:78
GLuint texture_id_
Definition: texture.h:47
char * byte_data_
Definition: texture.h:46
Texture(const char *file_path)
Definition: texture.cpp:36
GLuint GetTextureID() const
Definition: texture.cpp:100


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Jan 23 2023 03:38:57