mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-10-17 10:59:20 +02:00
pch migration to modules [wip]
This commit is contained in:
38
gl/object.cppm
Normal file
38
gl/object.cppm
Normal file
@@ -0,0 +1,38 @@
|
||||
module;
|
||||
#include <glad/glad.h>
|
||||
|
||||
export module eu07.gl.object;
|
||||
|
||||
export {
|
||||
|
||||
|
||||
namespace gl
|
||||
{
|
||||
class object
|
||||
{
|
||||
private:
|
||||
GLuint id = 0;
|
||||
|
||||
public:
|
||||
inline operator GLuint() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
inline operator GLuint* const()
|
||||
{
|
||||
return &id;
|
||||
}
|
||||
|
||||
inline operator const GLuint* const() const
|
||||
{
|
||||
return &id;
|
||||
}
|
||||
|
||||
object() = default;
|
||||
object(const object&) = delete;
|
||||
object& operator=(const object&) = delete;
|
||||
};
|
||||
}
|
||||
|
||||
} // export
|
||||
Reference in New Issue
Block a user