WOWCube Docs logo
WOWCube Docs
Mission Control
Section Shortcuts
APIExamplesSourceWOWConnectChangelog
Filters
SDK and language defaults persist in cookies.
SDK version
Navigation Tree
Collapsed by default, focused on the active path.
Made byMcKay Seamons
GitHub
  1. Home
  2. Docs
  3. Source
  4. OffscreenRenderTarget.h
Mission NodeSDK 6.2C++gfx

OffscreenRenderTarget.h

SDK Source File: OffscreenRenderTarget.h

Source / SDK 6.2 / C++ / gfx

OffscreenRenderTarget.h

OffscreenRenderTarget.h
CPP
1/* Copyright Statement:
2 *
3 * (C) 2021-2024 Cubios Inc. All rights reserved.
4 */
5
6#pragma once
7#include "SceneObject.h"
8#include "Screen.h"
9#include <string>
10
11namespace Cubios
12{
13namespace Gfx
14{
15class OffscreenRenderTarget: public Cubios::SceneObject
16{
17public:
18 enum renderLayerOrder_t
19 {
20 BeforeQueue = 0,
21 AfterQueue = 1
22 };
23
24 OffscreenRenderTarget(u32_t width, u32_t height, Cubios::GFX_PixelFormat_t format);
25 virtual ~OffscreenRenderTarget();
26
27 Cubios::SceneObject* Add(Cubios::SceneObject* obj);
28 Cubios::SceneObject* AddCopy(Cubios::SceneObject* obj);
29
30 void Begin(bool overwrite=false);
31 void End();
32
33 void Render() override;
34 virtual void RenderLayer(renderLayerOrder_t order){}
35
36private:
37 void present();
38 int16_t getNextID() {return rtc = (rtc+1) % 0x7f; }
39
40private:
41 uint32_t width;
42 uint32_t height;
43 Cubios::GFX_PixelFormat_t format;
44
45 std::vector<Cubios::SceneObject*> objects;
46 std::vector<Cubios::SceneObject*> copies;
47
48 bool inBegin;
49 bool beforeQueue;
50
51 Cubios::Screen* nullScreen;
52
53 int16_t rtID;
54 static int16_t rtc;
55};
56}
57}
58
Wrapped for easier reading. Turn wrap off to inspect exact line lengths.
Context Rail

Related nodes

AnimatedSprite.cpp
Source / SDK 6.2 / C++ / gfx
AnimatedSprite.h
Source / SDK 6.2 / C++ / gfx
Background.cpp
Source / SDK 6.2 / C++ / gfx
Background.h
Source / SDK 6.2 / C++ / gfx
Previous Node
OffscreenRenderTarget.cpp
Source / SDK 6.2 / C++ / gfx
Next Node
QRCode.cpp
Source / SDK 6.2 / C++ / gfx