Logo
NativeTextureRenderer.h
1#pragma once
2
3#include "Texture.h"
4
5namespace SharpKmyGfx
6{
7 ref class Texture;
8 ref class RenderTexture;
9 ref class InternalCommandList;
10 ref class Framebuffer;
11
12 class nativeRenderTextureRenderer : public kmyGfx::RenderTexture::Renderer
13 {
14 public:
17 kmyGfx::GameViewDrawCommand* createCommand()override;
18 void* owner = nullptr;
19 };
20
21 public ref class RenderTexture
22 {
23 public:
24
25 ref class Renderer abstract
26 {
27 public:
29 {
30 auto p = (void*)(System::IntPtr)GCHandle::Alloc(this);
31 obj = TRACK_NEW_CLASS nativeRenderTextureRenderer(p);
32 }
33
35 {
36 delete obj;
37 }
38
40
42 };
43
45 int width, int height,
46 TEXTUREFFORMAT color, TEXTUREFFORMAT depth,
47 RenderTexture::Renderer^ renderer
48 );
49
53
54 kmyGfx::RenderTexture* obj = nullptr;
55 };
56}
Definition: InternalCommandBuffer.h:94
Definition: GameView.h:48
Definition: InternalCommandBuffer.h:152
Renderer()
Definition: NativeTextureRenderer.h:28
virtual InternalCommandList createCommand()=0
~Renderer()
Definition: NativeTextureRenderer.h:34
Definition: NativeTextureRenderer.h:22
Texture getTexture()
Definition: NativeTextureRenderer.cpp:37
Framebuffer getFramebuffer()
Definition: NativeTextureRenderer.cpp:41
RenderTexture(GameView^ tgt, int width, int height, TEXTUREFFORMAT color, TEXTUREFFORMAT depth, RenderTexture::Renderer^ renderer)
Definition: NativeTextureRenderer.cpp:18
~RenderTexture()
Definition: NativeTextureRenderer.cpp:32
kmyGfx::RenderTexture * obj
Definition: NativeTextureRenderer.h:54
Definition: Texture.h:72
Definition: NativeTextureRenderer.h:13
void * owner
Definition: NativeTextureRenderer.h:18
kmyGfx::GameViewDrawCommand * createCommand() override
Definition: NativeTextureRenderer.cpp:10
USE_MEMORY_TRACKING
Definition: NativeTextureRenderer.h:15
nativeRenderTextureRenderer(void *r)
Definition: NativeTextureRenderer.cpp:5
Definition: Billboard.cpp:4
TEXTUREFFORMAT
Definition: Texture.h:21