Skip to content
Snippets Groups Projects
Commit c47d9ebe authored by Philip Trettner's avatar Philip Trettner
Browse files

working on backend

parent a0f573fa
No related branches found
No related tags found
No related merge requests found
......@@ -31,3 +31,8 @@ if (TARGET aion)
target_link_libraries(typed-graphics PUBLIC aion)
target_compile_definitions(typed-graphics PUBLIC TG_PROFILE_AION)
endif()
if (TARGET volk)
target_link_libraries(typed-graphics PRIVATE volk)
target_compile_definitions(typed-graphics PUBLIC TG_BACKEND_VULKAN)
endif()
......@@ -17,23 +17,48 @@ Graphics library with strongly typed interfaces.
`typed-graphics` expects dependencies as CMake targets.
### Quickstart
Vulkan example (with some recommended dependencies):
```
mkdir extern
cd extern
git submodule add https://github.com/zeux/volk.git
git submodule add https://www.graphics.rwth-aachen.de:9000/ptrettner/typed-geometry.git
git submodule add https://www.graphics.rwth-aachen.de:9000/ptrettner/typed-graphics.git
git submodule add https://www.graphics.rwth-aachen.de:9000/ptrettner/polymesh.git
git submodule add https://www.graphics.rwth-aachen.de:9000/ptrettner/imgui-lean.git
git submodule add https://github.com/glfw/glfw.git
```
Optionals:
```
git submodule add https://github.com/g-truc/glm.git
git submodule add https://github.com/google/googletest.git
git submodule add https://github.com/emil-e/rapidcheck.git
```
### Required
* ???
* `typed-geometry` math library
### Backend Dependencies
* TODO: vanilla vulkan
(Don't forget to install the vulkan SDK)
* `volk` Vulkan loader
* `lava` Vulkan library
* `glow` OpenGL library
### Optional
* `typed-geometry` math library
* `glm` math library
* `polymesh` mesh library
* `imgui` UI library
* `aion` profiling library
* `glfw` window library
## CMake Usage
......
#pragma once
#include <tg/typed-graphics-lean.hh>
namespace tg
{
namespace backend
{
SharedBackend vulkan();
// SharedBackend glow();
// SharedBackend lava();
// SharedBackend opengl();
}
class Backend
{
virtual ~Backend() {}
......
#include "VulkanBackend.hh"
#if TG_BACKEND_VULKAN
// vulkan loader
#include <volk.h>
#endif
\ No newline at end of file
#pragma once
#if TG_BACKEND_VULKAN
#include "../Backend.hh"
namespace tg
{
namespace backend
{
class VulkanBackend : public Backend
{
};
}
} // namespace tg
#endif
// TODO
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment