Skip to content
Try edited this page Dec 26, 2020 · 3 revisions

Welcome to the Tempest wiki!

Tempest is an open-source, simple, cross-platform graphics engine written in modern C++14.
Main idea behind this engine is to provide a low-level GPU-programming concepts, like Ubo, Vbo, Ssbo, in convenient C++ packaging, with RAII, types and templates.

Features

  • Multiplatform (Windows, Linux, 32bit and 64bit)
  • Multibackend (Vulkan 1.0, DirectX12)
  • Multithreaded command buffers and thread safety
  • Build-in 2d graphics support
  • Build-in UI library

Examples

// offscreen render
VulkanApi api;
Device    device(api);

static const Vertex   vboData[3] = {{-1,-1},{1,-1},{1,1}};
static const uint16_t iboData[3] = {0,1,2};

auto vbo  = device.vbo(vboData,3);
auto ibo  = device.ibo(iboData,3);

auto vert = device.loadShader("shader/simple_test.vert.sprv");
auto frag = device.loadShader("shader/simple_test.frag.sprv");
auto pso  = device.pipeline<Vertex>(Topology::Triangles,RenderState(),vert,frag);

auto tex  = device.attachment(format,128,128);
auto fbo  = device.frameBuffer(tex);
auto rp   = device.pass(FboMode(FboMode::PreserveOut,Color(0.f,0.f,1.f)));

auto cmd  = device.commandBuffer();
{
  auto enc = cmd.startEncoding(device);
  enc.setFramebuffer(fbo,rp);
  enc.setUniforms(pso);
  enc.draw(vbo,ibo);
}

auto sync = device.fence();
device.submit(cmd,sync);
sync.wait();

// save image to file
auto pm = device.readPixels(tex);
pm.save(outImg);
Clone this wiki locally