]> git.localhorst.tv Git - gworm.git/blobdiff - src/graphics/Canvas.cpp
added texture support
[gworm.git] / src / graphics / Canvas.cpp
index b461ab4f42180e20e8e7058016bd53de26088f28..beabd0164d248e285c5a1a85b95fc2d3e9f84960 100644 (file)
@@ -45,6 +45,16 @@ Vector<int> Canvas::Size() const {
 }
 
 
+Texture Canvas::CreateStaticTexture(Vector<int> size) {
+       return Texture(canv, Color::Format, SDL_TEXTUREACCESS_STATIC, size);
+}
+
+
+void Canvas::Copy(Texture &tex, Vector<int> to) {
+       tex.Copy(canv, to);
+}
+
+
 void Canvas::SetColor(Color c) {
        SDL_SetRenderDrawColor(canv, c.r, c.g, c.b, c.a);
 }