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
bccf5e6c
Commit
bccf5e6c
authored
13 years ago
by
David Parks
Browse files
Options
Downloads
Plain Diff
merge
parents
e907a2fb
2b2a03b3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
indra/newview/lldrawpoolbump.cpp
+38
-41
38 additions, 41 deletions
indra/newview/lldrawpoolbump.cpp
with
38 additions
and
41 deletions
indra/newview/lldrawpoolbump.cpp
+
38
−
41
View file @
bccf5e6c
...
@@ -1036,51 +1036,48 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
...
@@ -1036,51 +1036,48 @@ LLViewerTexture* LLBumpImageList::getBrightnessDarknessImage(LLViewerFetchedText
llassert
(
(
bump_code
==
BE_BRIGHTNESS
)
||
(
bump_code
==
BE_DARKNESS
)
);
llassert
(
(
bump_code
==
BE_BRIGHTNESS
)
||
(
bump_code
==
BE_DARKNESS
)
);
LLViewerTexture
*
bump
=
NULL
;
LLViewerTexture
*
bump
=
NULL
;
const
F32
BRIGHTNESS_DARKNESS_PIXEL_AREA_THRESHOLD
=
1000
;
if
(
src_image
->
getMaxVirtualSize
()
>
BRIGHTNESS_DARKNESS_PIXEL_AREA_THRESHOLD
)
bump_image_map_t
*
entries_list
=
NULL
;
{
void
(
*
callback_func
)(
BOOL
success
,
LLViewerFetchedTexture
*
src_vi
,
LLImageRaw
*
src
,
LLImageRaw
*
aux_src
,
S32
discard_level
,
BOOL
final
,
void
*
userdata
)
=
NULL
;
bump_image_map_t
*
entries_list
=
NULL
;
void
(
*
callback_func
)(
BOOL
success
,
LLViewerFetchedTexture
*
src_vi
,
LLImageRaw
*
src
,
LLImageRaw
*
aux_src
,
S32
discard_level
,
BOOL
final
,
void
*
userdata
)
=
NULL
;
switch
(
bump_code
)
switch
(
bump_code
)
{
{
case
BE_BRIGHTNESS
:
case
BE_BRIGHTNESS
:
entries_list
=
&
mBrightnessEntries
;
entries_list
=
&
mBrightnessEntries
;
callback_func
=
LLBumpImageList
::
onSourceBrightnessLoaded
;
callback_func
=
LLBumpImageList
::
onSourceBrightnessLoaded
;
break
;
break
;
case
BE_DARKNESS
:
case
BE_DARKNESS
:
entries_list
=
&
mDarknessEntries
;
entries_list
=
&
mDarknessEntries
;
callback_func
=
LLBumpImageList
::
onSourceDarknessLoaded
;
callback_func
=
LLBumpImageList
::
onSourceDarknessLoaded
;
break
;
break
;
default:
default:
llassert
(
0
);
llassert
(
0
);
return
NULL
;
return
NULL
;
}
}
bump_image_map_t
::
iterator
iter
=
entries_list
->
find
(
src_image
->
getID
());
bump_image_map_t
::
iterator
iter
=
entries_list
->
find
(
src_image
->
getID
());
if
(
iter
!=
entries_list
->
end
()
&&
iter
->
second
.
notNull
())
if
(
iter
!=
entries_list
->
end
()
&&
iter
->
second
.
notNull
())
{
{
bump
=
iter
->
second
;
bump
=
iter
->
second
;
}
}
else
else
{
{
LLPointer
<
LLImageRaw
>
raw
=
new
LLImageRaw
(
1
,
1
,
1
);
LLPointer
<
LLImageRaw
>
raw
=
new
LLImageRaw
(
1
,
1
,
1
);
raw
->
clear
(
0x77
,
0x77
,
0xFF
,
0xFF
);
raw
->
clear
(
0x77
,
0x77
,
0xFF
,
0xFF
);
(
*
entries_list
)[
src_image
->
getID
()]
=
LLViewerTextureManager
::
getLocalTexture
(
raw
.
get
(),
TRUE
);
(
*
entries_list
)[
src_image
->
getID
()]
=
LLViewerTextureManager
::
getLocalTexture
(
raw
.
get
(),
TRUE
);
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
}
}
if
(
!
src_image
->
hasCallbacks
())
if
(
!
src_image
->
hasCallbacks
())
{
//if image has no callbacks but resolutions don't match, trigger raw image loaded callback again
{
//if image has no callbacks but resolutions don't match, trigger raw image loaded callback again
if
(
src_image
->
getWidth
()
!=
bump
->
getWidth
()
||
if
(
src_image
->
getWidth
()
!=
bump
->
getWidth
()
||
src_image
->
getHeight
()
!=
bump
->
getHeight
())
// ||
src_image
->
getHeight
()
!=
bump
->
getHeight
())
// ||
//(LLPipeline::sRenderDeferred && bump->getComponents() != 4))
//(LLPipeline::sRenderDeferred && bump->getComponents() != 4))
{
{
src_image
->
setBoostLevel
(
LLViewerTexture
::
BOOST_BUMP
)
;
src_image
->
setBoostLevel
(
LLViewerTexture
::
BOOST_BUMP
)
;
src_image
->
setLoadedCallback
(
callback_func
,
0
,
TRUE
,
FALSE
,
new
LLUUID
(
src_image
->
getID
()),
NULL
);
src_image
->
setLoadedCallback
(
callback_func
,
0
,
TRUE
,
FALSE
,
new
LLUUID
(
src_image
->
getID
()),
NULL
);
src_image
->
forceToSaveRawImage
(
0
)
;
src_image
->
forceToSaveRawImage
(
0
)
;
}
}
}
}
}
...
...
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