added camera implementation and plenty of other rendering related stuff - splitted out the initialization of the render context
This commit is contained in:
parent
ae37273021
commit
f7043fc0cb
43 changed files with 23280 additions and 15161 deletions
26
src/visual/CMakeLists.txt
Normal file
26
src/visual/CMakeLists.txt
Normal file
|
@ -0,0 +1,26 @@
|
|||
|
||||
set(hdrs
|
||||
include/pw/visual/renderer.hpp
|
||||
include/pw/visual/context.hpp
|
||||
)
|
||||
|
||||
set(srcs
|
||||
src/renderer.cpp
|
||||
src/context.cpp
|
||||
)
|
||||
|
||||
add_library(pwvisual
|
||||
STATIC
|
||||
${hdrs}
|
||||
${srcs}
|
||||
)
|
||||
|
||||
target_include_directories(
|
||||
pwvisual
|
||||
PUBLIC
|
||||
include
|
||||
)
|
||||
|
||||
target_link_libraries(pwvisual pwscene)
|
||||
|
||||
#add_subdirectory(tests)
|
25
src/visual/include/pw/visual/context.hpp
Normal file
25
src/visual/include/pw/visual/context.hpp
Normal file
|
@ -0,0 +1,25 @@
|
|||
#ifndef PW_VISUAL_CONTEXT_HPP
|
||||
#define PW_VISUAL_CONTEXT_HPP
|
||||
|
||||
#include <pw/scene/component.hpp>
|
||||
|
||||
namespace pw {
|
||||
|
||||
class context {
|
||||
public:
|
||||
|
||||
struct size {
|
||||
int width,height;
|
||||
};
|
||||
|
||||
virtual bool make_current() = 0;
|
||||
virtual void resize() = 0;
|
||||
virtual size size() = 0;
|
||||
virtual void flush() = 0;
|
||||
|
||||
virtual ~context() = default;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
19
src/visual/include/pw/visual/renderer.hpp
Normal file
19
src/visual/include/pw/visual/renderer.hpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#ifndef PW_VISUAL_RENDERER_HPP
|
||||
#define PW_VISUAL_RENDERER_HPP
|
||||
|
||||
#include <pw/scene/component.hpp>
|
||||
|
||||
namespace pw {
|
||||
|
||||
class context;
|
||||
|
||||
class renderer {
|
||||
|
||||
void render(context& context);
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
|
||||
#endif
|
0
src/visual/src/context.cpp
Normal file
0
src/visual/src/context.cpp
Normal file
9
src/visual/src/renderer.cpp
Normal file
9
src/visual/src/renderer.cpp
Normal file
|
@ -0,0 +1,9 @@
|
|||
#include "pw/visual/renderer.hpp"
|
||||
|
||||
namespace pw {
|
||||
|
||||
void renderer::render(pw::context &context)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue