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
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
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 Archive
Alchemy Viewer
Commits
57c84c63
Commit
57c84c63
authored
15 years ago
by
Palmer
Browse files
Options
Downloads
Patches
Plain Diff
Davep's LLDrawPoolBump changes from svn/linden/branches/viewer-mesh @ 114046 for deferred rendering
parent
79a3870c
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/lldrawpoolbump.cpp
+40
-21
40 additions, 21 deletions
indra/newview/lldrawpoolbump.cpp
indra/newview/lldrawpoolbump.h
+22
-16
22 additions, 16 deletions
indra/newview/lldrawpoolbump.h
with
62 additions
and
37 deletions
indra/newview/lldrawpoolbump.cpp
+
40
−
21
View file @
57c84c63
...
@@ -2,25 +2,31 @@
...
@@ -2,25 +2,31 @@
* @file lldrawpoolbump.cpp
* @file lldrawpoolbump.cpp
* @brief LLDrawPoolBump class implementation
* @brief LLDrawPoolBump class implementation
*
*
* $LicenseInfo:firstyear=2003&license=viewer
l
gpl$
* $LicenseInfo:firstyear=2003&license=viewergpl$
*
Second Life Viewer Source Code
*
* Copyright (
C
) 20
1
0, Linden Research, Inc.
* Copyright (
c
) 200
3-2009
, Linden Research, Inc.
*
*
* This library is free software; you can redistribute it and/or
* Second Life Viewer Source Code
* modify it under the terms of the GNU Lesser General Public
* The source code in this file ("Source Code") is provided by Linden Lab
* License as published by the Free Software Foundation;
* to you under the terms of the GNU General Public License, version 2.0
* version 2.1 of the License only.
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
*
* This library is distributed in the hope that it will be useful,
* There are special exceptions to the terms and conditions of the GPL as
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* it is applied to this Source Code. View the full text of the exception
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* in the file doc/FLOSS-exception.txt in this software distribution, or
* Lesser General Public License for more details.
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
*
*
You should have received a copy of the GNU Lesser General Public
*
By copying, modifying or distributing this software, you acknowledge
*
License along with this library; if not, write to the Free Software
*
that you have read and understood your obligations described above,
*
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
and agree to abide by those obligations.
*
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
* $/LicenseInfo$
*/
*/
...
@@ -142,8 +148,7 @@ void LLStandardBumpmap::restoreGL()
...
@@ -142,8 +148,7 @@ void LLStandardBumpmap::restoreGL()
LLViewerTexture
::
LOD_TEXTURE
,
LLViewerTexture
::
LOD_TEXTURE
,
0
,
0
,
0
);
0
);
gStandardBumpmapList
[
LLStandardBumpmap
::
sStandardBumpmapCount
].
mImage
->
setBoostLevel
(
LLViewerTexture
::
BOOST_BUMP
)
;
gStandardBumpmapList
[
LLStandardBumpmap
::
sStandardBumpmapCount
].
mImage
->
setLoadedCallback
(
LLBumpImageList
::
onSourceStandardLoaded
,
0
,
TRUE
,
FALSE
,
NULL
);
gStandardBumpmapList
[
LLStandardBumpmap
::
sStandardBumpmapCount
].
mImage
->
setLoadedCallback
(
LLBumpImageList
::
onSourceStandardLoaded
,
0
,
TRUE
,
FALSE
,
NULL
,
NULL
);
LLStandardBumpmap
::
sStandardBumpmapCount
++
;
LLStandardBumpmap
::
sStandardBumpmapCount
++
;
}
}
...
@@ -696,6 +701,18 @@ void LLDrawPoolBump::endBump()
...
@@ -696,6 +701,18 @@ void LLDrawPoolBump::endBump()
gGL
.
setSceneBlendType
(
LLRender
::
BT_ALPHA
);
gGL
.
setSceneBlendType
(
LLRender
::
BT_ALPHA
);
}
}
S32
LLDrawPoolBump
::
getNumDeferredPasses
()
{
if
(
gSavedSettings
.
getBOOL
(
"RenderObjectBump"
))
{
return
1
;
}
else
{
return
0
;
}
}
void
LLDrawPoolBump
::
beginDeferredPass
(
S32
pass
)
void
LLDrawPoolBump
::
beginDeferredPass
(
S32
pass
)
{
{
if
(
!
gPipeline
.
hasRenderBatches
(
LLRenderPass
::
PASS_BUMP
))
if
(
!
gPipeline
.
hasRenderBatches
(
LLRenderPass
::
PASS_BUMP
))
...
@@ -820,6 +837,7 @@ void LLBumpImageList::addTextureStats(U8 bump, const LLUUID& base_image_id, F32
...
@@ -820,6 +837,7 @@ void LLBumpImageList::addTextureStats(U8 bump, const LLUUID& base_image_id, F32
void
LLBumpImageList
::
updateImages
()
void
LLBumpImageList
::
updateImages
()
{
{
llpushcallstacks
;
for
(
bump_image_map_t
::
iterator
iter
=
mBrightnessEntries
.
begin
();
iter
!=
mBrightnessEntries
.
end
();
)
for
(
bump_image_map_t
::
iterator
iter
=
mBrightnessEntries
.
begin
();
iter
!=
mBrightnessEntries
.
end
();
)
{
{
bump_image_map_t
::
iterator
curiter
=
iter
++
;
bump_image_map_t
::
iterator
curiter
=
iter
++
;
...
@@ -846,6 +864,7 @@ void LLBumpImageList::updateImages()
...
@@ -846,6 +864,7 @@ void LLBumpImageList::updateImages()
}
}
}
}
}
}
llpushcallstacks
;
for
(
bump_image_map_t
::
iterator
iter
=
mDarknessEntries
.
begin
();
iter
!=
mDarknessEntries
.
end
();
)
for
(
bump_image_map_t
::
iterator
iter
=
mDarknessEntries
.
begin
();
iter
!=
mDarknessEntries
.
end
();
)
{
{
bump_image_map_t
::
iterator
curiter
=
iter
++
;
bump_image_map_t
::
iterator
curiter
=
iter
++
;
...
@@ -872,6 +891,7 @@ void LLBumpImageList::updateImages()
...
@@ -872,6 +891,7 @@ void LLBumpImageList::updateImages()
}
}
}
}
}
}
llpushcallstacks
;
}
}
...
@@ -916,8 +936,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
...
@@ -916,8 +936,7 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
(
*
entries_list
)[
src_image
->
getID
()]
->
setExplicitFormat
(
GL_ALPHA8
,
GL_ALPHA
);
(
*
entries_list
)[
src_image
->
getID
()]
->
setExplicitFormat
(
GL_ALPHA8
,
GL_ALPHA
);
// Note: this may create an LLImageGL immediately
// Note: this may create an LLImageGL immediately
src_image
->
setBoostLevel
(
LLViewerTexture
::
BOOST_BUMP
)
;
src_image
->
setLoadedCallback
(
callback_func
,
0
,
TRUE
,
FALSE
,
new
LLUUID
(
src_image
->
getID
())
);
src_image
->
setLoadedCallback
(
callback_func
,
0
,
TRUE
,
FALSE
,
new
LLUUID
(
src_image
->
getID
()),
NULL
);
bump
=
(
*
entries_list
)[
src_image
->
getID
()];
// In case callback was called immediately and replaced the image
bump
=
(
*
entries_list
)[
src_image
->
getID
()];
// In case callback was called immediately and replaced the image
// bump_total++;
// bump_total++;
...
...
This diff is collapsed.
Click to expand it.
indra/newview/lldrawpoolbump.h
+
22
−
16
View file @
57c84c63
...
@@ -2,25 +2,31 @@
...
@@ -2,25 +2,31 @@
* @file lldrawpoolbump.h
* @file lldrawpoolbump.h
* @brief LLDrawPoolBump class definition
* @brief LLDrawPoolBump class definition
*
*
* $LicenseInfo:firstyear=2003&license=viewer
l
gpl$
* $LicenseInfo:firstyear=2003&license=viewergpl$
*
Second Life Viewer Source Code
*
* Copyright (
C
) 20
1
0, Linden Research, Inc.
* Copyright (
c
) 200
3-2009
, Linden Research, Inc.
*
*
* This library is free software; you can redistribute it and/or
* Second Life Viewer Source Code
* modify it under the terms of the GNU Lesser General Public
* The source code in this file ("Source Code") is provided by Linden Lab
* License as published by the Free Software Foundation;
* to you under the terms of the GNU General Public License, version 2.0
* version 2.1 of the License only.
* ("GPL"), unless you have obtained a separate licensing agreement
* ("Other License"), formally executed by you and Linden Lab. Terms of
* the GPL can be found in doc/GPL-license.txt in this distribution, or
* online at http://secondlifegrid.net/programs/open_source/licensing/gplv2
*
*
* This library is distributed in the hope that it will be useful,
* There are special exceptions to the terms and conditions of the GPL as
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* it is applied to this Source Code. View the full text of the exception
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* in the file doc/FLOSS-exception.txt in this software distribution, or
* Lesser General Public License for more details.
* online at
* http://secondlifegrid.net/programs/open_source/licensing/flossexception
*
*
*
You should have received a copy of the GNU Lesser General Public
*
By copying, modifying or distributing this software, you acknowledge
*
License along with this library; if not, write to the Free Software
*
that you have read and understood your obligations described above,
*
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
and agree to abide by those obligations.
*
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
* WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
* COMPLETENESS OR PERFORMANCE.
* $/LicenseInfo$
* $/LicenseInfo$
*/
*/
...
@@ -73,7 +79,7 @@ public:
...
@@ -73,7 +79,7 @@ public:
void
renderBump
();
void
renderBump
();
void
endBump
();
void
endBump
();
virtual
S32
getNumDeferredPasses
()
{
return
1
;
}
virtual
S32
getNumDeferredPasses
()
;
/*virtual*/
void
beginDeferredPass
(
S32
pass
);
/*virtual*/
void
beginDeferredPass
(
S32
pass
);
/*virtual*/
void
endDeferredPass
(
S32
pass
);
/*virtual*/
void
endDeferredPass
(
S32
pass
);
/*virtual*/
void
renderDeferred
(
S32
pass
);
/*virtual*/
void
renderDeferred
(
S32
pass
);
...
...
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