Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
8238aee5
Commit
8238aee5
authored
4 years ago
by
Kitty Barnett
Browse files
Options
Downloads
Patches
Plain Diff
Add LLVisualEffectParams (and derived LLShaderEffectParams)
parent
099c23ab
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llvisualeffect.cpp
+4
-4
4 additions, 4 deletions
indra/newview/llvisualeffect.cpp
indra/newview/llvisualeffect.h
+25
-3
25 additions, 3 deletions
indra/newview/llvisualeffect.h
with
29 additions
and
7 deletions
indra/newview/llvisualeffect.cpp
+
4
−
4
View file @
8238aee5
...
...
@@ -107,7 +107,7 @@ bool LLVfxManager::removeEffect(const LLUUID& idEffect)
return
true
;
}
void
LLVfxManager
::
runEffect
(
EVisualEffect
eCode
)
void
LLVfxManager
::
runEffect
(
EVisualEffect
eCode
,
const
LLVisualEffectParams
*
pParams
)
{
// *TODO-Catz: once we're done, check whether iterating over the entire list still has negliable impact
auto
pred
=
[
eCode
](
const
LLVisualEffect
*
pEffect
)
{
return
pEffect
->
getCode
()
==
eCode
;
};
...
...
@@ -118,11 +118,11 @@ void LLVfxManager::runEffect(EVisualEffect eCode)
auto
effectRange
=
boost
::
make_iterator_range
(
beginEffect
,
endEffect
);
for
(
LLVisualEffect
*
pEffect
:
effectRange
)
{
pEffect
->
run
();
pEffect
->
run
(
pParams
);
}
}
void
LLVfxManager
::
runEffect
(
EVisualEffectType
eType
)
void
LLVfxManager
::
runEffect
(
EVisualEffectType
eType
,
const
LLVisualEffectParams
*
pParams
)
{
// *TODO-Catz: once we're done, check whether iterating over the entire list still has negliable impact
auto
pred
=
[
eType
](
const
LLVisualEffect
*
pEffect
)
{
return
pEffect
->
getType
()
==
eType
;
};
...
...
@@ -133,7 +133,7 @@ void LLVfxManager::runEffect(EVisualEffectType eType)
auto
effectRange
=
boost
::
make_iterator_range
(
beginEffect
,
endEffect
);
for
(
LLVisualEffect
*
pEffect
:
effectRange
)
{
pEffect
->
run
();
pEffect
->
run
(
pParams
);
}
}
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llvisualeffect.h
+
25
−
3
View file @
8238aee5
...
...
@@ -22,6 +22,12 @@
//
//
class
LLRenderTarget
;
// ============================================================================
//
//
enum
class
EVisualEffect
{
RlvOverlay
,
...
...
@@ -38,6 +44,22 @@ enum class EVisualEffectType
//
//
struct
LLVisualEffectParams
{
};
struct
LLShaderEffectParams
:
LLVisualEffectParams
{
explicit
LLShaderEffectParams
(
LLRenderTarget
*
pSrcBuffer
,
LLRenderTarget
*
pDstBuffer
)
:
m_pSrcBuffer
(
pSrcBuffer
),
m_pDstBuffer
(
pDstBuffer
)
{}
LLRenderTarget
*
m_pSrcBuffer
=
nullptr
;
LLRenderTarget
*
m_pDstBuffer
=
nullptr
;
};
// ============================================================================
//
//
class
LLVisualEffect
{
public:
...
...
@@ -51,7 +73,7 @@ class LLVisualEffect
U32
getPriority
()
const
{
return
m_nPriority
;
}
EVisualEffectType
getType
()
const
{
return
m_eType
;}
virtual
void
run
()
=
0
;
virtual
void
run
(
const
LLVisualEffectParams
*
pParams
)
=
0
;
/*
* Member variables
...
...
@@ -139,8 +161,8 @@ class LLVfxManager : public LLSingleton<LLVfxManager>
LLVisualEffect
*
getEffect
(
EVisualEffect
eCode
)
const
;
template
<
typename
T
>
T
*
getEffect
(
EVisualEffect
eCode
)
const
{
return
dynamic_cast
<
T
*>
(
getEffect
(
eCode
));
}
bool
removeEffect
(
const
LLUUID
&
idEffect
);
void
runEffect
(
EVisualEffect
eCode
);
void
runEffect
(
EVisualEffectType
eType
);
void
runEffect
(
EVisualEffect
eCode
,
const
LLVisualEffectParams
*
pParams
=
nullptr
);
void
runEffect
(
EVisualEffectType
eType
,
const
LLVisualEffectParams
*
pParams
=
nullptr
);
protected
:
/*
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment