Falco Engine 3.9.0.1 (beta)
RenderTexture.cs
Go to the documentation of this file.
1using System;
2using System.Runtime.CompilerServices;
3
4namespace FalcoEngine
5{
6 public class RenderTexture : Object, IDisposable
7 {
11 public enum TextureType { ColorWithDepth, ColorOnly }
12
13 internal RenderTexture() { }
14
20 public RenderTexture(int w, int h)
21 {
22 INTERNAL_constructor(w, h, (int)TextureType.ColorWithDepth);
23 }
24
31 public RenderTexture(int w, int h, TextureType textureType)
32 {
33 INTERNAL_constructor(w, h, (int)textureType);
34 }
35
41 [MethodImpl(MethodImplOptions.InternalCall)]
42 public extern void Reset(int w, int h);
43
47 public Texture colorTexture { [MethodImpl(MethodImplOptions.InternalCall)] get; }
48
52 public Texture depthTexture { [MethodImpl(MethodImplOptions.InternalCall)] get; }
53
57 int width { [MethodImpl(MethodImplOptions.InternalCall)] get; }
58
62 int height { [MethodImpl(MethodImplOptions.InternalCall)] get; }
63
64 [MethodImpl(MethodImplOptions.InternalCall)]
65 private extern void INTERNAL_constructor(int w, int h, int textureType);
66
70 public void Dispose()
71 {
72 INTERNAL_dispose();
73 }
74
75 [MethodImpl(MethodImplOptions.InternalCall)]
76 private extern void INTERNAL_dispose();
77 }
78}
RenderTexture(int w, int h, TextureType textureType)
Create new render texture
void Dispose()
Delete unmanaged resources for this render texture used by engine
RenderTexture(int w, int h)
Create new render texture
Texture colorTexture
Get texture containing a color data
void Reset(int w, int h)
Recreate this render texture with new width and height
TextureType
Render texture type
Texture depthTexture
Get texture containing a depth data