Draw first triangle
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
#ifndef __JABYENGINE_GPU_HPP__
|
||||
#define __JABYENGINE_GPU_HPP__
|
||||
#include "../Auxiliary/type_traits.hpp"
|
||||
#include "../System/IOPorts/gpu_io.hpp"
|
||||
#include "gpu_primitives.hpp"
|
||||
|
||||
#if !defined(JABYENGINE_NTSC) && !defined(JABYENGINE_PAL)
|
||||
#error "JABYENGINE_NTSC or JABYENGINE_PAL must be defined"
|
||||
@@ -34,7 +36,16 @@ namespace JabyEngine {
|
||||
static void set_offset(uint16_t x, uint16_t y);
|
||||
};
|
||||
|
||||
uint8_t swap_buffers_vsync(uint8_t syncs);
|
||||
namespace internal {
|
||||
void render(const uint32_t* data, size_t words);
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
static enable_if<T::is_primitive>::type render(const T& primitive) {
|
||||
internal::render(reinterpret_cast<const uint32_t*>(&primitive), sizeof(T)/sizeof(uint32_t));
|
||||
}
|
||||
|
||||
uint8_t swap_buffers_vsync(uint8_t syncs, bool clear_screen = true);
|
||||
}
|
||||
}
|
||||
#endif //!__JABYENGINE_GPU_HPP__
|
Reference in New Issue
Block a user