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
2128d0c9
Commit
2128d0c9
authored
15 years ago
by
richard
Browse files
Options
Downloads
Plain Diff
merge
parents
1a35fe87
b446f673
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/llviewerdisplay.cpp
+10
-10
10 additions, 10 deletions
indra/newview/llviewerdisplay.cpp
with
10 additions
and
10 deletions
indra/newview/llviewerdisplay.cpp
+
10
−
10
View file @
2128d0c9
...
...
@@ -1011,7 +1011,7 @@ void render_hud_attachments()
LLRect
get_whole_screen_region
()
{
LLRect
whole_screen
=
gViewerWindow
->
getW
indo
wRectScaled
();
LLRect
whole_screen
=
gViewerWindow
->
getW
orldVie
wRectScaled
();
// apply camera zoom transform (for high res screenshots)
F32
zoom_factor
=
LLViewerCamera
::
getInstance
()
->
getZoomFactor
();
...
...
@@ -1019,13 +1019,13 @@ LLRect get_whole_screen_region()
if
(
zoom_factor
>
1.
f
)
{
S32
num_horizontal_tiles
=
llceil
(
zoom_factor
);
S32
tile_width
=
llround
((
F32
)
gViewerWindow
->
getW
indo
wWidthScaled
()
/
zoom_factor
);
S32
tile_height
=
llround
((
F32
)
gViewerWindow
->
getW
indo
wHeightScaled
()
/
zoom_factor
);
S32
tile_width
=
llround
((
F32
)
gViewerWindow
->
getW
orldVie
wWidthScaled
()
/
zoom_factor
);
S32
tile_height
=
llround
((
F32
)
gViewerWindow
->
getW
orldVie
wHeightScaled
()
/
zoom_factor
);
int
tile_y
=
sub_region
/
num_horizontal_tiles
;
int
tile_x
=
sub_region
-
(
tile_y
*
num_horizontal_tiles
);
glh
::
matrix4f
mat
;
whole_screen
.
setLeftTopAndSize
(
tile_x
*
tile_width
,
gViewerWindow
->
getW
indo
wHeightScaled
()
-
(
tile_y
*
tile_height
),
tile_width
,
tile_height
);
whole_screen
.
setLeftTopAndSize
(
tile_x
*
tile_width
,
gViewerWindow
->
getW
orldVie
wHeightScaled
()
-
(
tile_y
*
tile_height
),
tile_width
,
tile_height
);
}
return
whole_screen
;
}
...
...
@@ -1045,12 +1045,12 @@ bool get_hud_matrices(const LLRect& screen_region, glh::matrix4f &proj, glh::mat
F32
aspect_ratio
=
LLViewerCamera
::
getInstance
()
->
getAspect
();
glh
::
matrix4f
mat
;
F32
scale_x
=
(
F32
)
gViewerWindow
->
getW
indo
wWidthScaled
()
/
(
F32
)
screen_region
.
getWidth
();
F32
scale_y
=
(
F32
)
gViewerWindow
->
getW
indo
wHeightScaled
()
/
(
F32
)
screen_region
.
getHeight
();
F32
scale_x
=
(
F32
)
gViewerWindow
->
getW
orldVie
wWidthScaled
()
/
(
F32
)
screen_region
.
getWidth
();
F32
scale_y
=
(
F32
)
gViewerWindow
->
getW
orldVie
wHeightScaled
()
/
(
F32
)
screen_region
.
getHeight
();
mat
.
set_scale
(
glh
::
vec3f
(
scale_x
,
scale_y
,
1.
f
));
mat
.
set_translate
(
glh
::
vec3f
(
clamp_rescale
((
F32
)
screen_region
.
getCenterX
(),
0.
f
,
(
F32
)
gViewerWindow
->
getW
indo
wWidthScaled
(),
0.5
f
*
scale_x
*
aspect_ratio
,
-
0.5
f
*
scale_x
*
aspect_ratio
),
clamp_rescale
((
F32
)
screen_region
.
getCenterY
(),
0.
f
,
(
F32
)
gViewerWindow
->
getW
indo
wHeightScaled
(),
0.5
f
*
scale_y
,
-
0.5
f
*
scale_y
),
glh
::
vec3f
(
clamp_rescale
((
F32
)
screen_region
.
getCenterX
(),
0.
f
,
(
F32
)
gViewerWindow
->
getW
orldVie
wWidthScaled
(),
0.5
f
*
scale_x
*
aspect_ratio
,
-
0.5
f
*
scale_x
*
aspect_ratio
),
clamp_rescale
((
F32
)
screen_region
.
getCenterY
(),
0.
f
,
(
F32
)
gViewerWindow
->
getW
orldVie
wHeightScaled
(),
0.5
f
*
scale_y
,
-
0.5
f
*
scale_y
),
0.
f
));
proj
*=
mat
;
...
...
@@ -1300,8 +1300,8 @@ void render_ui_2d()
if
(
gAgent
.
getAvatarObject
()
&&
gAgent
.
mHUDCurZoom
<
0.98
f
)
{
glPushMatrix
();
S32
half_width
=
(
gViewerWindow
->
getW
indo
wWidthScaled
()
/
2
);
S32
half_height
=
(
gViewerWindow
->
getW
indo
wHeightScaled
()
/
2
);
S32
half_width
=
(
gViewerWindow
->
getW
orldVie
wWidthScaled
()
/
2
);
S32
half_height
=
(
gViewerWindow
->
getW
orldVie
wHeightScaled
()
/
2
);
glScalef
(
LLUI
::
sGLScaleFactor
.
mV
[
0
],
LLUI
::
sGLScaleFactor
.
mV
[
1
],
1.
f
);
glTranslatef
((
F32
)
half_width
,
(
F32
)
half_height
,
0.
f
);
F32
zoom
=
gAgent
.
mHUDCurZoom
;
...
...
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