Ocular Engine
TextureDescriptor.hpp
1 
17 #pragma once
18 #ifndef __H__OCULAR_GRAPHICS_TEXTURE_DESCRIPTOR__H__
19 #define __H__OCULAR_GRAPHICS_TEXTURE_DESCRIPTOR__H__
20 
21 #include <cstdint>
22 #include "TextureEnums.hpp"
23 
24 //------------------------------------------------------------------------------------------
25 
30 namespace Ocular
31 {
36  namespace Graphics
37  {
46  {
47  uint32_t width;
48  uint32_t height;
49  uint32_t mipmaps;
50  uint32_t pixelSize;
51 
52  TextureType type;
53  TextureFormat format;
54  TextureFilterMode filter;
55 
56  TextureAccess gpuAccess;
57  TextureAccess cpuAccess;
58 
60  : width(800),
61  height(600),
62  mipmaps(1),
63  pixelSize(32),
64  type(TextureType::Texture2D),
65  format(TextureFormat::R32G32B32A32Float),
66  filter(TextureFilterMode::Point),
67  gpuAccess(TextureAccess::ReadWrite),
68  cpuAccess(TextureAccess::None)
69  {
70 
71  }
72  };
73  }
77 }
82 //------------------------------------------------------------------------------------------
83 
84 #endif
TextureAccess cpuAccess
The level of access requried by the CPU.
Definition: TextureDescriptor.hpp:57
uint32_t width
Width of the texture in pixels.
Definition: TextureDescriptor.hpp:47
TextureFilterMode filter
Filtering mode to apply to the texture when rendered.
Definition: TextureDescriptor.hpp:54
uint32_t height
Height of the texture in pixels.
Definition: TextureDescriptor.hpp:48
Definition: Texture2D.hpp:45
uint32_t pixelSize
Size of each pixel in bytes.
Definition: TextureDescriptor.hpp:50
uint32_t mipmaps
Levels of mipmaps to create. 0 creates an entire mipmap chain, 1 has the single texture level-of-deta...
Definition: TextureDescriptor.hpp:49
Note: Once this library is made dynamic, this will no longer be needed.
Definition: Common.hpp:70
Definition: TextureDescriptor.hpp:45
TextureType type
The type of texture.
Definition: TextureDescriptor.hpp:52
TextureAccess gpuAccess
The level of access required by the GPU.
Definition: TextureDescriptor.hpp:56
TextureFormat format
The format of this texture.
Definition: TextureDescriptor.hpp:53