Skip to content

src/Graphics/Handle.hpp

Namespaces

Name
Engine
This namespace contains all of the necessary engine components.
Engine::Graphics

Classes

Name
class Engine::Graphics::Handle

Source code

#pragma once

namespace Engine {
    namespace Graphics {
        class Handle {
          public:
            Handle() = default;
            virtual ~Handle() = default;

            int getHandle() const {
                return handle;
            }

          protected:
            // OpenGL handle
            int handle;
        };

        inline int getHandle(Handle& handle) {
            return handle.getHandle();
        }
    } // namespace Graphics
} // namespace Engine

Updated on 2022-10-19 at 22:22:00 +0000