Nebula
Toggle main menu visibility
Loading...
Searching...
No Matches
tbuibitmap.h
Go to the documentation of this file.
1
#pragma once
2
//------------------------------------------------------------------------------
9
//------------------------------------------------------------------------------
10
#include "
coregraphics/texture.h
"
11
#include "tb_renderer.h"
12
13
//------------------------------------------------------------------------------
14
namespace
TBUI
15
{
16
17
class
TBUIRenderer
;
18
19
//------------------------------------------------------------------------------
20
class
TBUIBitmap
:
public
tb::TBBitmap
21
{
22
public
:
23
25
TBUIBitmap
(
TBUIRenderer
*
renderer
);
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
45
CoreGraphics::TextureId
GetTexture
()
const
;
46
47
private
:
48
TBUIRenderer
*
renderer
;
49
int
width
= 0;
50
int
height
= 0;
51
CoreGraphics::TextureId
texture
;
52
};
53
54
//------------------------------------------------------------------------------
55
/*
56
*/
57
inline
CoreGraphics::TextureId
58
TBUIBitmap::GetTexture
()
const
59
{
60
return
this->
texture
;
61
}
62
}
// namespace TBUI
TBUI::TBUIBitmap::height
int height
Definition
tbuibitmap.h:50
TBUI::TBUIBitmap::TBUIBitmap
TBUIBitmap(TBUIRenderer *renderer)
Definition
tbuibitmap.cc:16
TBUI::TBUIBitmap::GetTexture
CoreGraphics::TextureId GetTexture() const
Definition
tbuibitmap.h:58
TBUI::TBUIBitmap::Height
int Height() override
Definition
tbuibitmap.cc:71
TBUI::TBUIBitmap::~TBUIBitmap
~TBUIBitmap() override
Note: Implementations for batched renderers should call TBRenderer::FlushBitmap to make sure any acti...
Definition
tbuibitmap.cc:25
TBUI::TBUIBitmap::Init
bool Init(int width, int height, unsigned int *data)
Definition
tbuibitmap.cc:36
TBUI::TBUIBitmap::renderer
TBUIRenderer * renderer
Definition
tbuibitmap.h:48
TBUI::TBUIBitmap::texture
CoreGraphics::TextureId texture
Definition
tbuibitmap.h:51
TBUI::TBUIBitmap::width
int width
Definition
tbuibitmap.h:49
TBUI::TBUIBitmap::SetData
void SetData(unsigned int *data) override
Update the bitmap with the given data (in BGRA32 format).
Definition
tbuibitmap.cc:80
TBUI::TBUIBitmap::Width
int Width() override
Definition
tbuibitmap.cc:62
TBUI::TBUIRenderer
Definition
tbuirenderer.h:19
TBUI
Turbobadger UI Batch.
Definition
tbuibatch.h:18
CoreGraphics::TextureId
texture type
Definition
texture.h:25
texture.h
code
addons
tbui
backend
tbuibitmap.h
Generated on
for Nebula. Dark theme by
Tilen Majerle
. All rights reserved.