VR-Forces 4.6.1 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvOsg
DtOpenGLCubeMap.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2018 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <osg/Texture>
13
#include <osg/Image>
14
#include <osg/Camera>
15
#include <
vrvUtil/DtSignalConnectionManager.h
>
16
#include <
vrvOsg/DtTextureUnitInfo.h
>
17
18
// custom texture class that lets us wrap a non-OSG
19
// environmental cube map for reflections (it comes from SilverLining.)
20
namespace
makVrv
21
{
22
class
DtDe;
23
24
class
DtOpenGLCubeMap
:
public
osg::Texture
25
{
26
public
:
27
DtOpenGLCubeMap
();
28
29
DtOpenGLCubeMap
(
DtDe
& de, osg::Camera* camera);
30
31
DtOpenGLCubeMap
(
const
DtOpenGLCubeMap
& copy,
const
osg::CopyOp& copyOp =
32
osg::CopyOp::SHALLOW_COPY);
33
34
META_StateAttribute
(osg,
DtOpenGLCubeMap
, TEXTURE);
35
36
virtual
int
compare
(
const
osg::StateAttribute& sa)
const
;
37
38
virtual
GLenum
getTextureTarget
()
const
;
39
40
virtual
void
setImage
(
unsigned
int
face,
osg::Image
*image);
41
42
virtual
osg::Image
*
getImage
(
unsigned
int
face);
43
44
virtual
const
osg::Image
*
getImage
(
unsigned
int
face)
const
;
45
46
virtual
unsigned
int
getNumImages
()
const
;
47
48
virtual
void
computeInternalFormat
()
const
;
49
50
virtual
void
allocateMipmap
(osg::State& state)
const
;
51
52
virtual
void
apply
(osg::State& state)
const
;
53
54
// We stick the environment cube map above the highest "normal"
55
// slot to avoid interference with OSG textures
56
static
int
getEnvMapSlot
(
void
){
return
DtTextureUnitInfo::EnvironmentMapTextureUnit
;}
57
58
protected
:
59
virtual
~DtOpenGLCubeMap
();
60
61
osg::Camera *
myCamera
;
62
DtDe
*
myDe
;
63
int
myId
;
64
};
65
66
67
}
68
Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (
www.mak.com
)