Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine.
GitHub | Vesper Updates | Creator
Loading...
Searching...
No Matches
OpenGLTexture.h
Go to the documentation of this file.
1#pragma once
2#include "Vesper/Renderer/Texture.h"
3
4#include <glad/glad.h>
5
6namespace Vesper {
7
9 {
10 public:
11 OpenGLTexture2D(uint32_t width, uint32_t height);
12 OpenGLTexture2D(const std::string& path);
13 virtual ~OpenGLTexture2D();
14
15 virtual uint32_t GetWidth() const override { return m_Width; }
16 virtual uint32_t GetHeight() const override { return m_Height; }
17 virtual uint32_t GetRendererID() const override { return m_RendererID; }
18
19 virtual void Bind(uint32_t slot) const override;
20
21 virtual void SetData(void* data, uint32_t size) override;
22
23 virtual bool operator==(const Texture2D& other) const override
24 {
26 }
27
28 virtual std::string GetName() const override;
29
30 private:
31 std::string m_Path;
32 uint32_t m_Width, m_Height;
33 uint32_t m_RendererID;
35 };
36
37}
#define VZ_CORE_ASSERT(x,...)
Definition Asserts.h:20
#define VZ_PROFILE_FUNCTION()
Definition Instrumentor.h:240
#define VZ_PROFILE_SCOPE(name)
Definition Instrumentor.h:239
Definition OpenGLTexture.h:9
virtual uint32_t GetWidth() const override
Returns the width of the texture.
Definition OpenGLTexture.h:15
virtual ~OpenGLTexture2D()
Definition OpenGLTexture.cpp:74
virtual void SetData(void *data, uint32_t size) override
Sets the data of the texture.
Definition OpenGLTexture.cpp:86
GLenum m_DataFormat
Definition OpenGLTexture.h:34
uint32_t m_Height
Definition OpenGLTexture.h:32
virtual uint32_t GetHeight() const override
Returns the height of the texture.
Definition OpenGLTexture.h:16
OpenGLTexture2D(const std::string &path)
Definition OpenGLTexture.cpp:26
uint32_t m_RendererID
Definition OpenGLTexture.h:33
OpenGLTexture2D(uint32_t width, uint32_t height)
Definition OpenGLTexture.cpp:9
virtual void Bind(uint32_t slot) const override
Binds the texture to the specified slot for use.
Definition OpenGLTexture.cpp:80
virtual bool operator==(const Texture2D &other) const override
Definition OpenGLTexture.h:23
virtual std::string GetName() const override
Definition OpenGLTexture.cpp:94
virtual uint32_t GetRendererID() const override
Returns the renderer ID of the texture.
Definition OpenGLTexture.h:17
std::string m_Path
Definition OpenGLTexture.h:31
uint32_t m_Width
Definition OpenGLTexture.h:32
GLenum m_InternalFormat
Definition OpenGLTexture.h:34
An abstraction for a 2D texture.
Definition Texture.h:37
TEMPORARY.
Definition WindowsInput.cpp:7