Main Page
Namespaces
Classes
Files
File List
File Members
src
Graphics
GL4
GteGL4TextureRT.cpp
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
#include <
GTEnginePCH.h
>
9
#include <
LowLevel/GteLogger.h
>
10
#include <
Graphics/GL4/GteGL4TextureRT.h
>
11
using namespace
gte
;
12
13
GL4TextureRT::GL4TextureRT
(
TextureRT
const
*
texture
)
14
:
15
GL4Texture2
(texture)
16
{
17
}
18
19
std::shared_ptr<GEObject>
GL4TextureRT::Create
(
void
*,
GraphicsObject
const
*
object
)
20
{
21
if
(object->
GetType
() ==
GT_TEXTURE_RT
)
22
{
23
return
std::make_shared<GL4TextureRT>(
24
static_cast<
TextureRT
const*
>
(
object
));
25
}
26
27
LogError
(
"Invalid object type."
);
28
return
nullptr
;
29
}
30
31
bool
GL4TextureRT::CanAutoGenerateMipmaps
()
const
32
{
33
auto
texture
=
GetTexture
();
34
35
return
texture
&&
texture
->HasMipmaps() &&
texture
->WantAutogenerateMipmaps();
36
}
gte::GL4Texture2
Definition:
GteGL4Texture2.h:16
GteLogger.h
gte::GL4TextureRT::GL4TextureRT
GL4TextureRT(TextureRT const *texture)
Definition:
GteGL4TextureRT.cpp:13
GTEnginePCH.h
GT_TEXTURE_RT
GT_TEXTURE_RT
Definition:
GteGraphicsObject.h:79
gte::GraphicsObject::GetType
GraphicsObjectType GetType() const
Definition:
GteGraphicsObject.h:165
gte::GL4TextureRT::CanAutoGenerateMipmaps
virtual bool CanAutoGenerateMipmaps() const override
Definition:
GteGL4TextureRT.cpp:31
gte::GraphicsObject
Definition:
GteGraphicsObject.h:115
gte::GL4TextureRT::GetTexture
TextureRT * GetTexture() const
Definition:
GteGL4TextureRT.h:30
LogError
#define LogError(message)
Definition:
GteLogger.h:92
gte
Definition:
GLX/GteWICFileIO.h:16
texture
GLuint texture
Definition:
glcorearb.h:410
gte::TextureRT
Definition:
GteTextureRT.h:15
gte::GL4TextureRT::Create
static std::shared_ptr< GEObject > Create(void *unused, GraphicsObject const *object)
Definition:
GteGL4TextureRT.cpp:19
GteGL4TextureRT.h
object
GLuint object
Definition:
glext.h:6426
geometric_tools_engine
Author(s): Yijiang Huang
autogenerated on Thu Jul 18 2019 04:00:00