GteGL4Texture.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>
12 
13 namespace gte
14 {
15 
17 {
18 protected:
19  // Abstract base class.
20  GL4Texture(Texture const* texture, GLenum target, GLenum targetBinding);
21 
22 public:
23  // Member access.
24  inline Texture* GetTexture() const;
25  inline GLenum GetTarget() const;
26  inline GLenum GetTargetBinding() const;
27 
28  // Get the GL4 internal format for the specified Texture data format.
29  inline static GLuint GetInternalFormat(DFType dataFormat);
30 
31 protected:
34 
35  // Properties of overall texture.
40 
41  // Mapping from DFType to GL4 specific types
42  static GLuint const msGLTextureInternalFormat[DF_NUM_FORMATS];
43  static GLuint const msGLTextureExternalFormat[DF_NUM_FORMATS];
44  static GLuint const msGLTextureExternalType[DF_NUM_CHANNEL_TYPES];
45 };
46 
47 inline GLuint GL4Texture::GetInternalFormat(DFType dataFormat)
48 {
49  return msGLTextureInternalFormat[dataFormat];
50 }
51 
53 {
54  return static_cast<Texture*>(mGTObject);
55 }
56 
58 {
59  return mTarget;
60 }
61 
63 {
64  return mTargetBinding;
65 }
66 
67 }
int GLint
Definition: glcorearb.h:85
unsigned int GLuint
Definition: glcorearb.h:89
static GLuint GetInternalFormat(DFType dataFormat)
Definition: GteGL4Texture.h:47
GLenum GetTarget() const
Definition: GteGL4Texture.h:57
GLuint mExternalType
Definition: GteGL4Texture.h:39
Texture * GetTexture() const
Definition: GteGL4Texture.h:52
GLenum target
Definition: glcorearb.h:1662
GLenum mTargetBinding
Definition: GteGL4Texture.h:33
unsigned int GLenum
Definition: glcorearb.h:83
GLuint mInternalFormat
Definition: GteGL4Texture.h:37
GLuint texture
Definition: glcorearb.h:410
GLuint mExternalFormat
Definition: GteGL4Texture.h:38
#define GTE_IMPEXP
Definition: GTEngineDEF.h:63
GLenum GetTargetBinding() const
Definition: GteGL4Texture.h:62


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