mirror of
https://github.com/bailwillharr/engine.git
synced 2024-09-21 04:51:18 +00:00
Add null device
This commit is contained in:
parent
ce12534ad8
commit
6542b7039b
@ -1,6 +1,6 @@
|
|||||||
// The implementation of the graphics layer using Vulkan 1.3.
|
// This implementation of the graphics layer does nothing
|
||||||
// This uses SDL specific code
|
|
||||||
|
|
||||||
|
//#define ENGINE_BUILD_NULLGFX
|
||||||
#ifdef ENGINE_BUILD_NULLGFX
|
#ifdef ENGINE_BUILD_NULLGFX
|
||||||
|
|
||||||
#include "gfx_device.hpp"
|
#include "gfx_device.hpp"
|
||||||
@ -8,12 +8,23 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#include "log.hpp"
|
#include "log.hpp"
|
||||||
|
|
||||||
|
#include <SDL2/SDL.h>
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
|
#include <unordered_set>
|
||||||
|
#include <array>
|
||||||
|
#include <fstream>
|
||||||
|
#include <filesystem>
|
||||||
|
#include <optional>
|
||||||
|
|
||||||
namespace engine {
|
namespace engine {
|
||||||
|
|
||||||
|
// structures and enums
|
||||||
|
|
||||||
// class definitions
|
// class definitions
|
||||||
|
|
||||||
struct GFXDevice::Impl {
|
struct GFXDevice::Impl {
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
GFXDevice::GFXDevice(const char* appName, const char* appVersion, SDL_Window* window)
|
GFXDevice::GFXDevice(const char* appName, const char* appVersion, SDL_Window* window)
|
||||||
@ -26,17 +37,37 @@ namespace engine {
|
|||||||
TRACE("Destroying GFXDevice...");
|
TRACE("Destroying GFXDevice...");
|
||||||
}
|
}
|
||||||
|
|
||||||
void GFXDevice::draw()
|
void GFXDevice::drawBuffer(const gfx::Pipeline* pipeline, const gfx::Buffer* vertexBuffer, uint32_t count)
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
void GFXDevice::createPipeline(const char* vertShaderPath, const char* fragShaderPath)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GFXDevice::createBuffer(const gfx::BufferDesc& desc, const void* data, gfx::BufferHandle* out)
|
void GFXDevice::drawIndexed(const gfx::Pipeline* pipeline, const gfx::Buffer* vertexBuffer, const gfx::Buffer* indexBuffer, uint32_t indexCount)
|
||||||
{
|
{
|
||||||
return true;
|
}
|
||||||
|
|
||||||
|
void GFXDevice::renderFrame()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
gfx::Pipeline* GFXDevice::createPipeline(const char* vertShaderPath, const char* fragShaderPath, const gfx::VertexFormat& vertexFormat)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GFXDevice::destroyPipeline(const gfx::Pipeline* pipeline)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
gfx::Buffer* GFXDevice::createBuffer(gfx::BufferType type, uint64_t size, const void* data)
|
||||||
|
{
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
void GFXDevice::destroyBuffer(const gfx::Buffer* buffer)
|
||||||
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GFXDevice::waitIdle()
|
void GFXDevice::waitIdle()
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// The implementation of the graphics layer using OpenGL 4.5
|
// The implementation of the graphics layer using OpenGL 4.5
|
||||||
// This uses SDL specific code
|
// This uses SDL specific code
|
||||||
|
|
||||||
|
//#undef ENGINE_BUILD_OPENGL
|
||||||
#ifdef ENGINE_BUILD_OPENGL
|
#ifdef ENGINE_BUILD_OPENGL
|
||||||
|
|
||||||
#include "gfx_device.hpp"
|
#include "gfx_device.hpp"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// The implementation of the graphics layer using Vulkan 1.3.
|
// The implementation of the graphics layer using Vulkan 1.3.
|
||||||
// This uses SDL specific code
|
// This uses SDL specific code
|
||||||
|
|
||||||
|
//#undef ENGINE_BUILD_VULKAN
|
||||||
#ifdef ENGINE_BUILD_VULKAN
|
#ifdef ENGINE_BUILD_VULKAN
|
||||||
|
|
||||||
#include "gfx_device.hpp"
|
#include "gfx_device.hpp"
|
||||||
|
Loading…
Reference in New Issue
Block a user