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 2021-10-12 at 20:06:42 +0000