light/Engine/src/Platform/GraphicsAPI/OpenGL/glVertexLayout.h
Light 2ab97d3863 Major Maintenance
- Major tidying
- Moved 'RendererProgram' classes out of the 'Renderer' class
- Moved 'RenderCommand' member variable out of 'GraphicsContext' and into
       the 'Renderer' class as a unique_ptr. results in 'Renderer' taking a
       windowHandle for construction
- Defined new macros for max quads in 'Renderer.h'
- Added the 'Stringifier' to 'Base.h'
- Added the 'ResourceManager' to the 'LightEngine.h'
- Application now logs the current file directory
- Fixed the forward declaration in GraphicsContext
- Fixed the debug break in Base.h
- Fixed 'dxShader' not logging compile errors
- 'glVertexLayout' now takes in a shared_ptr for 'VertexBuffer'
- 'glShader' now logs the shader compilation errors properly
- 'dxVertexLayout' now takes in a shared_ptr for 'Shader"
- Modified 'dxSharedContext' members to be private and made getters for them
- 'dxRenderCommand::SwapBuffers' now throws dxException for
       DXGI_ERROR_DEVICE_REMOD error
2021-07-01 19:25:46 +04:30

32 lines
No EOL
608 B
C++

#pragma once
#include "Base.h"
#include "Graphics/VertexLayout.h"
namespace Light {
struct glVertexElementDesc
{
unsigned int type;
unsigned int count;
unsigned int typeSize;
unsigned int offset;
};
class glVertexLayout : public VertexLayout
{
private:
unsigned int m_ArrayID;
public:
glVertexLayout(std::shared_ptr<VertexBuffer> buffer, const std::vector<std::pair<std::string, VertexElementType>>& elements);
~glVertexLayout();
void Bind() override;
void UnBind() override;
private:
glVertexElementDesc GetElementDesc(VertexElementType type, unsigned int offset);
};
}