RAMSES Documentation  27.0.130
Information for RAMSES users and developers
TextureEnums.h
Go to the documentation of this file.
1 // -------------------------------------------------------------------------
2 // Copyright (C) 2014 BMW Car IT GmbH
3 // -------------------------------------------------------------------------
4 // This Source Code Form is subject to the terms of the Mozilla Public
5 // License, v. 2.0. If a copy of the MPL was not distributed with this
6 // file, You can obtain one at https://mozilla.org/MPL/2.0/.
7 // -------------------------------------------------------------------------
8 
9 #ifndef RAMSES_TEXTUREENUMS_H
10 #define RAMSES_TEXTUREENUMS_H
11 
14 
15 namespace ramses
16 {
19  {
27  };
28 
31  {
36  };
37 
39  enum class ETextureFormat
40  {
41  Invalid = 0,
42 
43  R8,
44 
45  RG8,
46 
47  RGB8,
48  RGB565,
49 
50  RGBA8,
51  RGBA4,
52  RGBA5551,
53 
54  ETC2RGB,
55  ETC2RGBA,
56 
57  R16F,
58  R32F,
59  RG16F,
60  RG32F,
61  RGB16F,
62  RGB32F,
63  RGBA16F,
64  RGBA32F,
65 
66  SRGB8,
68 
69  // ASTC compressed texture formats - USE WITH CAUTION!
70  // ASTC depends on GL ES 3.0 extensions "GL_KHR_texture_compression_astc_hdr" and "GL_KHR_texture_compression_astc_ldr"
71  // If the drivers don't support these extensions, expect asserts in the renderer (or black screen in release build)
72  // Important note: the "RGBA" in the name only distinguishes between RGBA and sRGBA. The channel count and format are
73  // defined internally by the compression algorithm. Refer to the documentation of ASTC extension from above for more details
102 
104  };
105 
108  {
116  };
117 
120  {
124  };
125 
128  {
132  };
133 
136  {
150 
153  };
154 
156  enum class ETextureChannelColor : uint8_t
157  {
158  Red,
159  Green,
160  Blue,
161  Alpha,
162  One,
163  Zero,
164  };
165 
166 
169  {
172  };
173 
182 
191 
200 
209 
217  {
218  switch (format)
219  {
250  return false;
251  default:
252  return true;
253  }
254  }
255 }
256 
257 #endif
#define RAMSES_API
Definition: APIExport.h:35
The RAMSES namespace contains all client side objects and functions used to implement RAMSES applicat...
Definition: AnimatedProperty.h:15
ERenderBufferFormat
Enum for format of a RenderBuffer.
Definition: TextureEnums.h:136
@ ERenderBufferFormat_Depth24_Stencil8
Definition: TextureEnums.h:152
@ ERenderBufferFormat_RG8
Definition: TextureEnums.h:139
@ ERenderBufferFormat_RGB8
Definition: TextureEnums.h:140
@ ERenderBufferFormat_RGBA8
Definition: TextureEnums.h:141
@ ERenderBufferFormat_RGB32F
Definition: TextureEnums.h:147
@ ERenderBufferFormat_RG16F
Definition: TextureEnums.h:144
@ ERenderBufferFormat_R8
Definition: TextureEnums.h:138
@ ERenderBufferFormat_RGBA32F
Definition: TextureEnums.h:149
@ ERenderBufferFormat_RGBA16F
Definition: TextureEnums.h:148
@ ERenderBufferFormat_RG32F
Definition: TextureEnums.h:145
@ ERenderBufferFormat_RGBA4
Definition: TextureEnums.h:137
@ ERenderBufferFormat_R16F
Definition: TextureEnums.h:142
@ ERenderBufferFormat_Depth24
Definition: TextureEnums.h:151
@ ERenderBufferFormat_RGB16F
Definition: TextureEnums.h:146
@ ERenderBufferFormat_R32F
Definition: TextureEnums.h:143
ETextureFormat
Texture data format.
Definition: TextureEnums.h:40
ETextureSamplingMethod
Texture sampling method.
Definition: TextureEnums.h:19
@ ETextureSamplingMethod_Nearest_MipMapNearest
Definition: TextureEnums.h:22
@ ETextureSamplingMethod_Nearest_MipMapLinear
Definition: TextureEnums.h:23
@ ETextureSamplingMethod_Linear_MipMapNearest
Definition: TextureEnums.h:24
@ ETextureSamplingMethod_Linear
Definition: TextureEnums.h:21
@ ETextureSamplingMethod_NUMBER_OF_ELEMENTS
Definition: TextureEnums.h:26
@ ETextureSamplingMethod_Linear_MipMapLinear
Definition: TextureEnums.h:25
@ ETextureSamplingMethod_Nearest
Definition: TextureEnums.h:20
ETextureAddressMode
Texture address mode.
Definition: TextureEnums.h:31
@ ETextureAddressMode_Repeat
Definition: TextureEnums.h:33
@ ETextureAddressMode_Clamp
Definition: TextureEnums.h:32
@ ETextureAddressMode_NUMBER_OF_ELEMENTS
Definition: TextureEnums.h:35
@ ETextureAddressMode_Mirror
Definition: TextureEnums.h:34
ETextureChannelColor
Enum for color of texture channel.
Definition: TextureEnums.h:157
RAMSES_API const char * getTextureAddressModeString(ETextureAddressMode addressMode)
Returns string representation for address mode.
ERenderTargetDepthBufferType
Enum for type of depth buffer created within a RenderTarget.
Definition: TextureEnums.h:120
@ ERenderTargetDepthBufferType_None
Definition: TextureEnums.h:121
@ ERenderTargetDepthBufferType_Depth
Definition: TextureEnums.h:122
@ ERenderTargetDepthBufferType_DepthStencil
Definition: TextureEnums.h:123
RAMSES_API const char * getTextureFormatString(ETextureFormat format)
Returns string representation for texture format.
RAMSES_API const char * getTextureSamplingMethodString(ETextureSamplingMethod samplingMethod)
Returns string representation for sampling method.
bool FormatSupportsMipChainGeneration(ETextureFormat format)
Definition: TextureEnums.h:216
ETextureCubeFace
Cube texture face identifier.
Definition: TextureEnums.h:108
@ ETextureCubeFace_NegativeY
Definition: TextureEnums.h:112
@ ETextureCubeFace_NUMBER_OF_ELEMENTS
Definition: TextureEnums.h:115
@ ETextureCubeFace_PositiveX
Definition: TextureEnums.h:109
@ ETextureCubeFace_PositiveY
Definition: TextureEnums.h:111
@ ETextureCubeFace_NegativeX
Definition: TextureEnums.h:110
@ ETextureCubeFace_NegativeZ
Definition: TextureEnums.h:114
@ ETextureCubeFace_PositiveZ
Definition: TextureEnums.h:113
ERenderBufferType
Enum for type of a RenderBuffer.
Definition: TextureEnums.h:128
@ ERenderBufferType_DepthStencil
Definition: TextureEnums.h:131
@ ERenderBufferType_Color
Definition: TextureEnums.h:129
@ ERenderBufferType_Depth
Definition: TextureEnums.h:130
RAMSES_API const char * getTextureCubeFaceString(ETextureCubeFace face)
Returns string representation for texture's cube face.
ERenderBufferAccessMode
Enum for access mode of a RenderBuffer.
Definition: TextureEnums.h:169
@ ERenderBufferAccessMode_ReadWrite
RenderBuffer with this access can be used both in RenderTarget and TextureSampler.
Definition: TextureEnums.h:171
@ ERenderBufferAccessMode_WriteOnly
RenderBuffer with this access can only be used in RenderTarget.
Definition: TextureEnums.h:170