does not link, we are close..
This commit is contained in:
@@ -38,10 +38,13 @@ namespace Render {
|
||||
free(_screenBufferForeground);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
void Mare::addDrawable(T){
|
||||
template <class T, class ... Args>
|
||||
T* Mare::addDrawable(Args&&... args){
|
||||
static size_t lastDrawableIndex(0);
|
||||
auto newD = std::make_shared<T>(lastDrawableIndex++, )
|
||||
static_assert(std::is_base_of_v<Drawable, T>, "Scene::createDrawable<T>() error, type T is not inherited from Drawable.");
|
||||
auto newD = std::make_shared<T>(lastDrawableIndex++, nullptr, this, std::forward<Args>(args)...);
|
||||
_drawables.push_back(newD);
|
||||
return newD.get();
|
||||
}
|
||||
|
||||
|
||||
@@ -54,6 +57,7 @@ namespace Render {
|
||||
printf("Drawable is expired");
|
||||
}
|
||||
}
|
||||
EPD_2IN9_V2_Display_Partial(_screenBufferBackground);
|
||||
}
|
||||
|
||||
void Mare::setPixel(uint8_t* img, uint16_t x, uint16_t y, bool value){
|
||||
|
||||
Reference in New Issue
Block a user