33//
44// SPDX-License-Identifier: GPL-3.0-or-later
55
6- #include " glArchivItem_BitmapBase .h"
6+ #include " GlTexture .h"
77#include < glad/glad.h>
88#include < vector>
99
10- glArchivItem_BitmapBase ::~glArchivItem_BitmapBase ()
10+ GlTexture ::~GlTexture ()
1111{
1212 if (texture_)
1313 glDeleteTextures (1 , &texture_);
1414}
1515
16- glArchivItem_BitmapBase::glArchivItem_BitmapBase (glArchivItem_BitmapBase && other) noexcept
16+ GlTexture::GlTexture (GlTexture && other) noexcept
1717 : texture_(other.texture_), width_(other.width_), height_(other.height_)
1818{
1919 other.texture_ = 0 ;
2020 other.width_ = 0 ;
2121 other.height_ = 0 ;
2222}
2323
24- glArchivItem_BitmapBase& glArchivItem_BitmapBase ::operator =(glArchivItem_BitmapBase && other) noexcept
24+ GlTexture& GlTexture ::operator =(GlTexture && other) noexcept
2525{
2626 if (this != &other)
2727 {
@@ -37,7 +37,7 @@ glArchivItem_BitmapBase& glArchivItem_BitmapBase::operator=(glArchivItem_BitmapB
3737 return *this ;
3838}
3939
40- void glArchivItem_BitmapBase ::createTexture (const void * bgraPixels, int w, int h, bool linear)
40+ void GlTexture ::createTexture (const void * bgraPixels, int w, int h, bool linear)
4141{
4242 if (texture_)
4343 glDeleteTextures (1 , &texture_);
@@ -55,7 +55,7 @@ void glArchivItem_BitmapBase::createTexture(const void* bgraPixels, int w, int h
5555 height_ = h;
5656}
5757
58- bool glArchivItem_BitmapBase ::load (SDL_Surface* surface, bool linear)
58+ bool GlTexture ::load (SDL_Surface* surface, bool linear)
5959{
6060 if (!surface)
6161 return false ;
@@ -114,7 +114,7 @@ bool glArchivItem_BitmapBase::load(SDL_Surface* surface, bool linear)
114114 return true ;
115115}
116116
117- void glArchivItem_BitmapBase ::DrawFull (const Rect& destRect) const
117+ void GlTexture ::DrawFull (const Rect& destRect) const
118118{
119119 if (!texture_)
120120 return ;
@@ -132,7 +132,7 @@ void glArchivItem_BitmapBase::DrawFull(const Rect& destRect) const
132132 glEnd ();
133133}
134134
135- void glArchivItem_BitmapBase ::Draw (int x, int y) const
135+ void GlTexture ::Draw (int x, int y) const
136136{
137137 if (!texture_)
138138 return ;
0 commit comments