cat3d
A tiny OpenGL 3D engine library written in and for C++.
texture.hpp
1 #pragma once
2 
3 #include "cat3d/gl/texture.hpp"
4 #include "cat3d/resource.hpp"
5 #include "cat3d/scene.hpp"
6 
7 namespace cat3d::obj {
8 
12 class texture : public scene::node {
13 public:
19  texture(const std::string& path);
20 
26  texture(color col);
27 
30 
31 protected:
33  void update_self(window& win);
34 
35 private:
37  gl::texture m_tex;
39  size_t m_hook_id;
41  bool m_hooked;
42 };
43 
44 }
cat3d::color
Base color class.
Definition: color.hpp:11
cat3d::window
Manages internal window api / state.
Definition: window.hpp:17
cat3d::obj::texture::~texture
~texture()
disconnects from the bind hook
cat3d::obj::texture::texture
texture(const std::string &path)
Initialize the texture.
cat3d::obj::texture
Scene node to bind a texture to the parent object on render.
Definition: texture.hpp:12
cat3d::obj::texture::texture
texture(color col)
Initialize the texture.
cat3d::scene::node
Basic, semi-abstract scene node class. Can have children which are other scene nodes,...
Definition: node.hpp:28
cat3d::gl::texture
Internal opengl texture representation.
Definition: texture.hpp:29
cat3d::obj::texture::update_self
void update_self(window &win)
self update