Lugdunum  0.1.0
Texture.inl
Go to the documentation of this file.
1 inline uint32_t Texture::getWidth() const {
2  return _width;
3 }
4 
5 inline uint32_t Texture::getHeight() const {
6  return _height;
7 }
8 
9 inline Render::Texture::Format Texture::getFormat() const {
10  return _format;
11 }
12 
13 inline Render::Texture::Filter Texture::getMagFilter() const {
14  return _magFilter;
15 }
16 
17 inline Render::Texture::Filter Texture::getMinFilter() const {
18  return _minFilter;
19 }
20 
21 inline Render::Texture::Filter Texture::getMipMapFilter() const {
22  return _mipMapFilter;
23 }
24 
25 inline Render::Texture::WrappingMode Texture::getWrapS() const {
26  return _wrapS;
27 }
28 
29 inline Render::Texture::WrappingMode Texture::getWrapT() const {
30  return _wrapT;
31 }
32 
33 inline size_t Texture::formatToSize(Render::Texture::Format format) {
34  switch(format) {
35  case Texture::Format::R8G8B8A8_UNORM:
36  case Texture::Format::R16G16_SFLOAT:
37  return 4;
38  case Texture::Format::R16G16B16_SFLOAT:
39  return 6;
40  case Texture::Format::R32G32B32A32_SFLOAT:
41  return 16;
42  default:
43  return 0;
44  };
45 }