VR-Forces Developer's Guide
Home
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrvPostProcessor
DtHdrDrawable.h
Go to the documentation of this file.
1
/******************************************************************************
2
** Copyright (c) 2023 MAK Technologies, Inc.
3
** All rights reserved.
4
******************************************************************************/
5
// This file is derived from the HDR NVIDIA gameworks SDK example
6
//----------------------------------------------------------------------------------
7
// Multiple Files in folder: es3aep-kepler\HDR/
8
// SDK Version: v2.11
9
// Email: gameworks@nvidia.com
10
// Site: http://developer.nvidia.com/
11
//
12
// Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved.
13
//
14
// Redistribution and use in source and binary forms, with or without
15
// modification, are permitted provided that the following conditions
16
// are met:
17
// * Redistributions of source code must retain the above copyright
18
// notice, this list of conditions and the following disclaimer.
19
// * Redistributions in binary form must reproduce the above copyright
20
// notice, this list of conditions and the following disclaimer in the
21
// documentation and/or other materials provided with the distribution.
22
// * Neither the name of NVIDIA CORPORATION nor the names of its
23
// contributors may be used to endorse or promote products derived
24
// from this software without specific prior written permission.
25
//
26
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY
27
// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
29
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
30
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
31
// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
32
// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
33
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
34
// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37
//
38
//----------------------------------------------------------------------------------
39
40
#pragma once
41
46
47
48
// Get proper local export symbol
49
#include <
vrvPostProcessor/vrvPostProcessor.h
>
50
#include <
vrvPostProcessor/DtPostProcessorDrawable.h
>
51
#include <
vrvPostProcessor/DtHdrTypes.h
>
52
53
#include <osg/Drawable>
54
#include <osg/Texture>
55
#include <osg/Texture2D>
56
57
#include <
vrvUtil/DtSignalConnectionManager.h
>
58
59
namespace
osg
60
{
61
class
Object;
62
class
State;
63
class
RenderInfo;
64
class
CopyOp;
65
}
66
67
namespace
makVrv
68
{
69
class
DtDe;
70
class
DtGlTexture;
71
class
DtGlBuffer;
72
class
DtGlProgram;
73
class
DtHdrDrawableRenderData;
74
76
class
DT_DLL_VRVPOSTPROCESSOR
DtHdrDrawable
:
public
DtPostProcessorDrawable
77
{
78
public
:
80
DtHdrDrawable
(
DtDe
& de,
DtHdrOptions
options, osg::Texture* lensFlareTexture,
bool
isFirstChannel);
81
83
virtual
~
DtHdrDrawable
();
84
private
:
86
DtHdrDrawable
() =
delete
;
87
89
DtHdrDrawable
(
const
DtHdrDrawable
&) =
delete
;
90
92
DtHdrDrawable
& operator=(
const
DtHdrDrawable
&) =
delete
;
93
public
:
98
100
virtual
void
drawImplementation(osg::RenderInfo& renderInfo)
const override
;
101
103
virtual
void
setInputTexture(osg::Texture* inputTex);
104
106
virtual
void
setEnabled(
bool
enabled);
107
virtual
bool
enabled();
108
110
virtual
DtHdrOptions
& options();
111
115
virtual
void
setLumOverride(
bool
lumOverride);
116
virtual
bool
lumOverride(
void
)
const
;
117
119
// should just pass through without applying any effects
120
// used by SensorFX to turn off HDR on a per channel basis.
121
virtual
void
setHdrPassthrough(
bool
enable);
122
virtual
bool
hdrPassthrough()
const
;
123
125
virtual
void
cleanupGpuMemory();
126
128
virtual
float
localHdrOutputScale();
129
130
protected
:
131
bool
myEnabled
;
132
133
DtHdrOptions
myOptions
;
134
135
bool
myLumOverride
;
136
bool
myEnableHdrPassthrough
;
137
141
friend
class
DtHdrDrawableRenderData
;
142
DtHdrDrawableRenderData
* myRenderData =
nullptr
;
143
144
const
bool
myIsFirstChannel =
false
;
145
};
146
}
makVrv::DtHdrDrawableRenderData
This class encapsulates all the (lazily) created OpenGL objects that are required for doing hdr...
Definition:
DtHdrDrawableRenderData.h:53
makVrv::DtHdrDrawable::myEnableHdrPassthrough
bool myEnableHdrPassthrough
Definition:
DtHdrDrawable.h:136
makVrv::DtHdrOptions
structure to hold all the HDR settings so they can more easily be passed to the drawable.
Definition:
DtHdrTypes.h:54
makVrv::DtHdrDrawable::myLumOverride
bool myLumOverride
Definition:
DtHdrDrawable.h:135
makVrv::DtPostProcessorDrawable
Definition:
DtPostProcessorDrawable.h:33
makVrv::DtHdrDrawable::myOptions
DtHdrOptions myOptions
Definition:
DtHdrDrawable.h:133
makVrv::DtHdrDrawable::myEnabled
bool myEnabled
Definition:
DtHdrDrawable.h:131
DT_DLL_VRVPOSTPROCESSOR
#define DT_DLL_VRVPOSTPROCESSOR
Definition:
vrvPostProcessor.h:19
DtPostProcessorDrawable.h
This file contains the declaration of the class DtPostProcessorDrawable which is used for rendering p...
vrvPostProcessor.h
Contains DLL export macros.
DtHdrTypes.h
DtSignalConnectionManager.h
Base class to provide boost signal/slot management.
makVrv::DtDe
The DtDe is the core component of any VR-Vantage application. It owns a DtRenderer, DtDeCommunicator, as well as a DtDisplay and other things.
Definition:
DtDe.h:72
makVrv::DtHdrDrawable
class used to render hdr during the post processor camera draw
Definition:
DtHdrDrawable.h:76
Document ID: Generated on Wed Mar 27 22:49:11 EDT 2024 from SVN revision 264633
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (
www.mak.com
)