diff --git a/include/cross2d/platforms/psp2/psp2_texture.h b/include/cross2d/platforms/psp2/psp2_texture.h index 932e9434..14e87fda 100644 --- a/include/cross2d/platforms/psp2/psp2_texture.h +++ b/include/cross2d/platforms/psp2/psp2_texture.h @@ -14,22 +14,22 @@ namespace c2d { public: - PSP2Texture(const std::string &path); + explicit PSP2Texture(const std::string &path); - PSP2Texture(const Vector2f &size = Vector2f(0, 0), + explicit PSP2Texture(const Vector2f &size = Vector2f(0, 0), Format format = Format::RGBA8); - ~PSP2Texture(); + ~PSP2Texture() override; - int resize(const Vector2f &size, bool copyPixels = true); + int resize(const Vector2f &size, bool copyPixels = true) override; - int lock(FloatRect *rect, void **pixels, int *pitch); + int lock(FloatRect *rect, void **pixels, int *pitch) override; - void setFilter(Filter filter); + void setFilter(Filter filter) override; - void setShader(int shader); + void setShader(int shader) override; - void applyShader(); + void applyShader() override; //private: vita2d_texture *tex = nullptr; diff --git a/source/platforms/psp2/psp2_texture.cpp b/source/platforms/psp2/psp2_texture.cpp index 2b728e6a..9a869a72 100644 --- a/source/platforms/psp2/psp2_texture.cpp +++ b/source/platforms/psp2/psp2_texture.cpp @@ -25,6 +25,7 @@ PSP2Texture::PSP2Texture(const std::string &p) : Texture(p) { return; } + m_vertices.setPrimitiveType(TriangleStrip); setSize(vita2d_texture_get_width(tex), vita2d_texture_get_height(tex)); setTexture(this, true); pitch = vita2d_texture_get_stride(tex); @@ -36,8 +37,6 @@ PSP2Texture::PSP2Texture(const std::string &p) : Texture(p) { PSP2Texture::PSP2Texture(const Vector2f &size, Format fmt) : Texture(size, fmt) { - printf("PSP2Texture(%p): %i x %i\n", this, (int) size.x, (int) size.y); - vita2d_texture_set_alloc_memblock_type(SCE_KERNEL_MEMBLOCK_TYPE_USER_RW); tex = vita2d_create_empty_texture_format( (unsigned int) size.x, (unsigned int) size.y, @@ -49,6 +48,7 @@ PSP2Texture::PSP2Texture(const Vector2f &size, Format fmt) : Texture(size, fmt) return; } + m_vertices.setPrimitiveType(TriangleStrip); setSize(size.x, size.y); setTexture(this, true); pitch = vita2d_texture_get_stride(tex);