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 #include <png.h>
22 
23 #include "tango-gl/util.h"
24 
25 namespace tango_gl {
26 class Texture {
27  public:
28  Texture(const char* file_path);
29  Texture(const Texture& other) = delete;
30  Texture& operator=(const Texture&) = delete;
31  ~Texture();
32 
33  bool LoadFromPNG(const char* file_path);
34  GLuint GetTextureID() const;
35 
36  private:
37  png_uint_32 width_, height_;
39  char* byte_data_;
41 };
42 } // namespace tango_gl
43 #endif // TANGO_GL_TEXTURE_H_
Texture & operator=(const Texture &)=delete
GLuint GetTextureID() const
Definition: texture.cpp:98
unsigned int GLuint
Definition: dummy.cpp:78
bool LoadFromPNG(const char *file_path)
Definition: texture.cpp:42
png_uint_32 height_
Definition: texture.h:37
GLuint texture_id_
Definition: texture.h:40
char * byte_data_
Definition: texture.h:39
Texture(const char *file_path)
Definition: texture.cpp:36
png_uint_32 width_
Definition: texture.h:37


rtabmap
Author(s): Mathieu Labbe
autogenerated on Mon Dec 14 2020 03:37:06