SDLPP: Save texture before rendering
In some cases texture might be changed after render() has been called but before renderer presented the render, causing errors.
This commit is contained in:
@@ -78,11 +78,13 @@ public:
|
||||
bool isStatic();
|
||||
void setStatic( bool stat = true );
|
||||
std::shared_ptr< Renderer > getRenderer() const;
|
||||
void saveCurTexture();
|
||||
|
||||
protected:
|
||||
virtual void copyTo(std::shared_ptr<RenderObject> other);
|
||||
virtual void copyTo( std::shared_ptr< RenderObject > other );
|
||||
std::vector< std::shared_ptr< CollisionPolygon > > collisions;
|
||||
std::shared_ptr< Texture > texture;
|
||||
std::shared_ptr< Texture > cur_texture;
|
||||
std::shared_ptr< Renderer > renderer;
|
||||
std::shared_ptr< CollisionPolygon > polygon;
|
||||
double movementSpeed = 0;
|
||||
|
||||
Reference in New Issue
Block a user