GteTextureSingle.h
Go to the documentation of this file.
1 // David Eberly, Geometric Tools, Redmond WA 98052
2 // Copyright (c) 1998-2017
3 // Distributed under the Boost Software License, Version 1.0.
4 // http://www.boost.org/LICENSE_1_0.txt
5 // http://www.geometrictools.com/License/Boost/LICENSE_1_0.txt
6 // File Version: 3.0.0 (2016/06/19)
7 
8 #pragma once
9 
10 #include <Graphics/GteTexture.h>
11 
12 namespace gte
13 {
14 
16 {
17 protected:
18  // Abstract base class.
19  TextureSingle(DFType format, unsigned int numDimensions,
20  unsigned int dim0, unsigned int dim1, unsigned int dim2,
21  bool hasMipmaps, bool createStorage);
22 
23 public:
24  // Mipmap information.
25  inline unsigned int GetOffsetFor(unsigned int level) const;
26  inline char const* GetDataFor(unsigned int level) const;
27  inline char* GetDataFor(unsigned int level);
28  template <typename T> inline T const* GetFor(unsigned int level) const;
29  template <typename T> inline T* GetFor(unsigned int level);
30 
31 public:
32  // For use by the Shader class for storing reflection information.
33  static int const shaderDataLookup = 4;
34 };
35 
36 
37 inline unsigned int TextureSingle::GetOffsetFor(unsigned int level) const
38 {
39  return Texture::GetOffsetFor(0, level);
40 }
41 
42 inline char const* TextureSingle::GetDataFor(unsigned int level) const
43 {
44  return Texture::GetDataFor(0, level);
45 }
46 
47 inline char* TextureSingle::GetDataFor(unsigned int level)
48 {
49  return Texture::GetDataFor(0, level);
50 }
51 
52 template <typename T> inline
53 T const* TextureSingle::GetFor(unsigned int level) const
54 {
55  return Texture::GetFor<T>(0, level);
56 }
57 
58 template <typename T> inline
59 T* TextureSingle::GetFor(unsigned int level)
60 {
61  return Texture::GetFor<T>(0, level);
62 }
63 
64 
65 }
GLint level
Definition: glcorearb.h:103
char const * GetDataFor(unsigned int level) const
char const * GetDataFor(unsigned int item, unsigned int level) const
Definition: GteTexture.h:147
unsigned int GetOffsetFor(unsigned int level) const
T const * GetFor(unsigned int level) const
GLint GLint GLsizei GLint GLenum format
Definition: glcorearb.h:103
unsigned int GetOffsetFor(unsigned int item, unsigned int level) const
Definition: GteTexture.h:141
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63


geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:01