Nebula
Loading...
Searching...
No Matches
tbuibitmap.h
Go to the documentation of this file.
1#pragma once
2//------------------------------------------------------------------------------
9//------------------------------------------------------------------------------
11#include "tb_renderer.h"
12
13//------------------------------------------------------------------------------
14namespace TBUI
15{
16
17class TBUIRenderer;
18
19//------------------------------------------------------------------------------
20class TBUIBitmap : public tb::TBBitmap
21{
22public:
23
26
29 ~TBUIBitmap() override;
30
32 bool Init(int width, int height, unsigned int* data);
33
35 int Width() override;
37 int Height() override;
38
42 void SetData(unsigned int* data) override;
43
46
47private:
49 int width = 0;
50 int height = 0;
52};
53
54//------------------------------------------------------------------------------
55/*
56*/
59{
60 return this->texture;
61}
62} // namespace TBUI
int height
Definition tbuibitmap.h:50
TBUIBitmap(TBUIRenderer *renderer)
Definition tbuibitmap.cc:16
CoreGraphics::TextureId GetTexture() const
Definition tbuibitmap.h:58
int Height() override
Definition tbuibitmap.cc:71
~TBUIBitmap() override
Note: Implementations for batched renderers should call TBRenderer::FlushBitmap to make sure any acti...
Definition tbuibitmap.cc:25
bool Init(int width, int height, unsigned int *data)
Definition tbuibitmap.cc:36
TBUIRenderer * renderer
Definition tbuibitmap.h:48
CoreGraphics::TextureId texture
Definition tbuibitmap.h:51
int width
Definition tbuibitmap.h:49
void SetData(unsigned int *data) override
Update the bitmap with the given data (in BGRA32 format).
Definition tbuibitmap.cc:80
int Width() override
Definition tbuibitmap.cc:62
Definition tbuirenderer.h:19
Turbobadger UI Batch.
Definition tbuibatch.h:18
texture type
Definition texture.h:25