| 7 | #include "Renderer/RenderAPI.h" |
| 8 | |
| 9 | void CSprite::LoadSprite16(int width, int height, uint16_t *pixels, bool skipHitMask) |
| 10 | { |
| 11 | if (Texture == nullptr) |
| 12 | Texture = new CGLTexture; |
| 13 | #ifndef NEW_RENDERER_ENABLED |
| 14 | g_GL.BindTexture16(*Texture, width, height, pixels); |
| 15 | #else |
| 16 | Texture->Width = width; |
| 17 | Texture->Height = height; |
| 18 | Texture->Texture = Render_CreateTexture2D( |
| 19 | width, |
| 20 | height, |
| 21 | TextureGPUFormat::TextureGPUFormat_RGB5_A1, |
| 22 | pixels, |
| 23 | TextureFormat::TextureFormat_Unsigned_A1_BGR5); |
| 24 | assert(Texture->Texture != RENDER_TEXTUREHANDLE_INVALID); |
| 25 | #endif |
| 26 | Init(width, height, pixels, skipHitMask); |
| 27 | } |
| 28 | |
| 29 | void CSprite::LoadSprite32(int width, int height, uint32_t *pixels, bool skipHitMask) |
| 30 | { |
no test coverage detected