Index

zydeco / a4d3636

Experiment in graphics programming, C++, OpenGL, simulation techniques.

Latest Commit

{#}TimeHashSubjectAuthor#(+)(-)GPG?
916 Nov 2023 11:11a4d3636Fractal ViewerJosh Stockin1320G

Blob @ zydeco / include / render / gl / GLTexture.hpp

text/plain619 bytesdownload raw
1#ifndef GLTEXTURE_HPP_
2#define GLTEXTURE_HPP_
3
4
5#include <map>
6#include "ZydecoCommon.hpp"
7
8
9class GLTexture
10{
11public:
12 static GLTexture& GetGLTexture(std::string name);
13
14 GLTexture(std::string texture_name, void *data_source, uint32_t width, uint32_t height);
15 ~GLTexture();
16
17 void Regenerate(int width, int height);
18 void Bind(uint64_t texture_unit);
19
20 uint32_t m_glTextureID;
21private:
22 static std::map<std::string, GLTexture*> s_textures;
23
24 bool m_doRegen = false;
25 std::string m_name;
26 void *m_pDataSource;
27 uint32_t m_width;
28 uint32_t m_height;
29};
30
31
32#endif /* GLTEXTURE_HPP_ */
33