VR-Forces Development_Version Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
include
vrvOsg
DtOpenGLCubeMap.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2013 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
9
10
#pragma once
11
12
#include <osg/Texture>
13
#include <osg/Image>
14
#include <
vrvUtil/DtSignalConnectionManager.h
>
15
#include <
vrvOsg/DtTextureUnitInfo.h
>
16
17
// custom texture class that lets us wrap a non-OSG
18
// environmental cube map for reflections (it comes from SilverLining.)
19
namespace
makVrv
20
{
21
class
DtDe;
22
class
DtOsgSkyObject;
23
24
class
DtOpenGLCubeMap
:
public
osg::Texture
25
{
26
public
:
27
DtOpenGLCubeMap
();
28
29
DtOpenGLCubeMap
(
const
makVrv::DtOsgSkyObject
* skyObject);
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
void
connectToSky
(
DtDe
& de );
37
virtual
void
slot_skyAdded
(
DtOsgSkyObject
* sky );
38
virtual
void
slot_skyRemoved
();
39
40
virtual
int
compare
(
const
osg::StateAttribute& sa)
const
;
41
42
virtual
GLenum
getTextureTarget
()
const
;
43
44
virtual
void
setImage
(
unsigned
int
face, osg::Image *image);
45
46
virtual
osg::Image *
getImage
(
unsigned
int
face);
47
48
virtual
const
osg::Image *
getImage
(
unsigned
int
face)
const
;
49
50
virtual
unsigned
int
getNumImages
()
const
;
51
52
virtual
void
computeInternalFormat
()
const
;
53
54
virtual
void
allocateMipmap
(osg::State& state)
const
;
55
56
virtual
void
apply
(osg::State& state)
const
;
57
58
// We stick the environment cube map above the highest "normal"
59
// slot to avoid interference with OSG textures
60
static
int
getEnvMapSlot
(
void
){
return
DtTextureUnitInfo::EnvironmentMapTextureUnit
;}
61
62
protected
:
63
virtual
~DtOpenGLCubeMap
();
64
65
const
makVrv::DtOsgSkyObject
*
_skyObject
;
66
makVrv::DtSignalConnectionManager
myConnections
;
67
};
68
69
70
}
71
Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (
www.mak.com
)