Main Page
Namespaces
Classes
Files
File List
File Members
include
Graphics
GL4
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
>
11
#include <
Graphics/GL4/GteGL4Resource.h
>
12
13
namespace
gte
14
{
15
16
class
GTE_IMPEXP
GL4Texture
:
public
GL4Resource
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
:
32
GLenum
mTarget
;
33
GLenum
mTargetBinding
;
34
35
// Properties of overall texture.
36
GLint
mNumLevels
;
37
GLuint
mInternalFormat
;
38
GLuint
mExternalFormat
;
39
GLuint
mExternalType
;
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
52
inline
Texture
*
GL4Texture::GetTexture
()
const
53
{
54
return
static_cast<
Texture
*
>
(mGTObject);
55
}
56
57
inline
GLenum
GL4Texture::GetTarget
()
const
58
{
59
return
mTarget;
60
}
61
62
inline
GLenum
GL4Texture::GetTargetBinding
()
const
63
{
64
return
mTargetBinding;
65
}
66
67
}
GLint
int GLint
Definition:
glcorearb.h:85
GLuint
unsigned int GLuint
Definition:
glcorearb.h:89
GteTexture.h
gte::GL4Texture::mNumLevels
GLint mNumLevels
Definition:
GteGL4Texture.h:36
gte::GL4Texture::GetInternalFormat
static GLuint GetInternalFormat(DFType dataFormat)
Definition:
GteGL4Texture.h:47
gte::GL4Texture::GetTarget
GLenum GetTarget() const
Definition:
GteGL4Texture.h:57
gte::GL4Texture::mExternalType
GLuint mExternalType
Definition:
GteGL4Texture.h:39
gte::GL4Texture::GetTexture
Texture * GetTexture() const
Definition:
GteGL4Texture.h:52
target
GLenum target
Definition:
glcorearb.h:1662
gte::GL4Resource
Definition:
GteGL4Resource.h:17
gte::GL4Texture::mTargetBinding
GLenum mTargetBinding
Definition:
GteGL4Texture.h:33
GLenum
unsigned int GLenum
Definition:
glcorearb.h:83
gte::GL4Texture::mInternalFormat
GLuint mInternalFormat
Definition:
GteGL4Texture.h:37
gte::Texture
Definition:
GteTexture.h:19
gte
Definition:
GLX/GteWICFileIO.h:16
texture
GLuint texture
Definition:
glcorearb.h:410
GteGL4Resource.h
gte::GL4Texture
Definition:
GteGL4Texture.h:16
gte::GL4Texture::mTarget
GLenum mTarget
Definition:
GteGL4Texture.h:32
gte::GL4Texture::mExternalFormat
GLuint mExternalFormat
Definition:
GteGL4Texture.h:38
GTE_IMPEXP
#define GTE_IMPEXP
Definition:
GTEngineDEF.h:63
gte::GL4Texture::GetTargetBinding
GLenum GetTargetBinding() const
Definition:
GteGL4Texture.h:62
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:00