mirror of
https://github.com/bailwillharr/engine.git
synced 2024-09-21 04:51:18 +00:00
Start work on vulkan renderer; misc engine changes
This commit is contained in:
parent
5cb810b4b0
commit
7ae447b392
@ -5,8 +5,11 @@
|
||||
#include "gfx.hpp"
|
||||
|
||||
namespace gfx {
|
||||
|
||||
struct GFX_API Device {
|
||||
|
||||
// Do not use a pointer to this class, always cast to the proper implementation to avoid V-Table overhead
|
||||
struct GFX_API IDevice {
|
||||
|
||||
|
||||
|
||||
virtual void setViewport(uint32_t top_left_x, uint32_t top_left_y, uint32_t width, uint32_t height) = 0;
|
||||
|
||||
@ -17,7 +20,7 @@ namespace gfx {
|
||||
virtual void bufferData(const void* data, Buffer buffer) = 0;
|
||||
virtual void bufferSubData(uint32_t offset, uint32_t size, const void* data, Buffer buffer) = 0;
|
||||
|
||||
virtual void drawElements(Primitive primitive, IndexBufferFormat format, uint32_t count, uint32_t offset);
|
||||
virtual void drawElements(Primitive primitive, IndexBufferFormat format, uint32_t count, uint32_t offset) = 0;
|
||||
virtual void drawArrays() = 0;
|
||||
|
||||
};
|
||||
|
@ -14,8 +14,7 @@ namespace components {
|
||||
CustomComponent(Object* parent);
|
||||
virtual ~CustomComponent() = 0;
|
||||
|
||||
virtual void onInit();
|
||||
virtual void onUpdate(glm::mat4 t);
|
||||
virtual void onUpdate(glm::mat4 t) {}
|
||||
|
||||
};
|
||||
|
||||
|
@ -77,7 +77,7 @@ static glm::vec2 getViewportSize()
|
||||
void Camera::usePerspective(float fovDeg)
|
||||
{
|
||||
constexpr float NEAR = 0.1f;
|
||||
constexpr float FAR = 1000.0f;
|
||||
constexpr float FAR = 100000.0f;
|
||||
|
||||
m_mode = Modes::PERSPECTIVE;
|
||||
m_fovDeg = fovDeg;
|
||||
|
@ -4,6 +4,7 @@ namespace components {
|
||||
|
||||
CustomComponent::CustomComponent(Object* parent) : Component(parent, TypeEnum::CUSTOM)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CustomComponent::~CustomComponent()
|
||||
@ -11,14 +12,4 @@ namespace components {
|
||||
|
||||
}
|
||||
|
||||
void CustomComponent::onInit()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CustomComponent::onUpdate(glm::mat4 t)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user