NAP
nap
system_modules
naprender
src
rendertexturecube.h
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5
#pragma once
6
7
// Internal Includes
8
#include "texture.h"
9
#include "irendertarget.h"
10
11
// External Includes
12
#include <color.h>
13
14
namespace
nap
15
{
16
// Forward Declares
17
class
Core;
18
36
class
NAPAPI
RenderTextureCube
:
public
TextureCube
37
{
38
RTTI_ENABLE(
TextureCube
)
39
public
:
43
enum class
EFormat
44
{
45
RGBA8,
46
BGRA8,
47
R8,
48
RGBA16,
49
R16,
50
RGBA32,
51
R32
52
};
53
54
// Constructor
55
RenderTextureCube
(
Core
& core);
56
62
virtual
bool
init(
utility::ErrorState
& errorState)
override
;
63
70
virtual
bool
init(
bool
enableMips,
utility::ErrorState
& errorState);
71
72
int
mWidth = 1024;
73
int
mHeight = 1024;
74
EColorSpace
mColorSpace =
EColorSpace::Linear
;
75
EFormat
mColorFormat = EFormat::RGBA8;
76
RGBAColorFloat
mClearColor = { 0.0f, 0.0f, 0.0f, 0.0f };
77
};
78
79
97
class
NAPAPI
DepthRenderTextureCube
:
public
TextureCube
98
{
99
friend
class
CubeDepthRenderTarget
;
100
RTTI_ENABLE(
TextureCube
)
101
public
:
105
enum class
EDepthFormat
106
{
107
D16,
108
D32
109
};
110
111
DepthRenderTextureCube
(
Core
& core);
112
118
virtual
bool
init(
utility::ErrorState
& errorState)
override
;
119
120
int
mWidth = 1024;
121
int
mHeight = 1024;
122
EColorSpace
mColorSpace =
EColorSpace::Linear
;
123
EDepthFormat
mDepthFormat = EDepthFormat::D16;
124
float
mClearValue = 1.0f;
125
};
126
}
nap::RenderTextureCube::EFormat
EFormat
Definition:
rendertexturecube.h:43
nap::TextureCube
Definition:
texture.h:302
nap::DepthRenderTextureCube::EDepthFormat
EDepthFormat
Definition:
rendertexturecube.h:105
nap::RGBAColor< float >
nap::EColorSpace::Linear
@ Linear
Linear color space.
nap::utility::ErrorState
Definition:
errorstate.h:19
nap::RenderTextureCube
Definition:
rendertexturecube.h:36
nap::Core
Definition:
core.h:82
nap
Definition:
templateapp.h:17
nap::DepthRenderTextureCube
Definition:
rendertexturecube.h:97
nap::EColorSpace
EColorSpace
Definition:
surfacedescriptor.h:37
nap::CubeDepthRenderTarget
Definition:
cubedepthrendertarget.h:40
Generated by doxygen