2022-10-24 00:14:08 +00:00
|
|
|
// This implementation of the graphics layer does nothing
|
2022-10-21 11:31:46 +00:00
|
|
|
|
2022-10-24 00:14:08 +00:00
|
|
|
//#define ENGINE_BUILD_NULLGFX
|
2022-10-21 11:31:46 +00:00
|
|
|
#ifdef ENGINE_BUILD_NULLGFX
|
|
|
|
|
|
|
|
#include "gfx_device.hpp"
|
|
|
|
#include "util.hpp"
|
|
|
|
#include "config.h"
|
|
|
|
#include "log.hpp"
|
|
|
|
|
2022-10-24 00:14:08 +00:00
|
|
|
#include <SDL2/SDL.h>
|
|
|
|
|
|
|
|
#include <assert.h>
|
|
|
|
#include <unordered_set>
|
|
|
|
#include <array>
|
|
|
|
#include <fstream>
|
|
|
|
#include <filesystem>
|
|
|
|
#include <optional>
|
|
|
|
|
2022-10-21 11:31:46 +00:00
|
|
|
namespace engine {
|
|
|
|
|
2022-10-24 00:14:08 +00:00
|
|
|
// structures and enums
|
|
|
|
|
2022-10-21 11:31:46 +00:00
|
|
|
// class definitions
|
|
|
|
|
|
|
|
struct GFXDevice::Impl {
|
2022-10-24 00:14:08 +00:00
|
|
|
|
2022-10-21 11:31:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GFXDevice::GFXDevice(const char* appName, const char* appVersion, SDL_Window* window)
|
|
|
|
{
|
|
|
|
pimpl = std::make_unique<Impl>();
|
|
|
|
}
|
|
|
|
|
|
|
|
GFXDevice::~GFXDevice()
|
|
|
|
{
|
|
|
|
TRACE("Destroying GFXDevice...");
|
|
|
|
}
|
|
|
|
|
2022-10-24 00:14:08 +00:00
|
|
|
void GFXDevice::drawBuffer(const gfx::Pipeline* pipeline, const gfx::Buffer* vertexBuffer, uint32_t count)
|
2022-10-21 11:31:46 +00:00
|
|
|
{
|
|
|
|
}
|
2022-10-24 00:14:08 +00:00
|
|
|
|
|
|
|
void GFXDevice::drawIndexed(const gfx::Pipeline* pipeline, const gfx::Buffer* vertexBuffer, const gfx::Buffer* indexBuffer, uint32_t indexCount)
|
2022-10-21 11:31:46 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-10-24 00:14:08 +00:00
|
|
|
void GFXDevice::renderFrame()
|
2022-10-21 11:31:46 +00:00
|
|
|
{
|
2022-10-24 00:14:08 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
|
2022-10-21 11:31:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void GFXDevice::waitIdle()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|