display now only draws chipxels that have changed
This commit is contained in:
@@ -13,12 +13,14 @@ public:
|
||||
~DisplaySDL() override;
|
||||
void clear() override;
|
||||
int blit(const chocochip8::Scanline &scanline, int y) override;
|
||||
void updateWindow() const;
|
||||
void updateWindow(bool forceWindowUpdate = false) const;
|
||||
|
||||
private:
|
||||
using Framebuffer = std::array<chocochip8::Scanline, chocochip8::gcHeight>;
|
||||
std::unique_ptr<Framebuffer> mpFramebuffer;
|
||||
mutable std::unique_ptr<Framebuffer> mpDisplayState;
|
||||
SDL_Window *mpWindow;
|
||||
Uint32 mFgColor;
|
||||
Uint32 mBgColor;
|
||||
mutable bool mDoClear;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user