Skip to content

Commit 4d9fcc0

Browse files
committed
Commented render_bitmap::texture_camera logic
1 parent 5ee2e67 commit 4d9fcc0

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

game/source/interface/c_gui_bitmap_widget.cpp

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,32 @@ void __cdecl render_bitmap(s_gui_bitmap_widget_render_data const* render_data, r
9898

9999
if (render_data->flags.test(s_gui_widget_render_data::_render_texture_camera_bit))
100100
{
101+
//if (s_dynamic_render_target* target = c_dynamic_render_targets::get_target_from_target_type(_dynamic_render_target_type_texture_camera))
102+
//{
103+
// int32 accumulation_surface_width;
104+
// int32 accumulation_surface_height;
105+
// if (target->accumulation_surface.get_width_height(0, &accumulation_surface_width, &accumulation_surface_height))
106+
// {
107+
// real32 ratio = real32(accumulation_surface_width * width) / real32(accumulation_surface_height * height);
108+
// if (render_width > _real_epsilon && render_height > _real_epsilon)
109+
// {
110+
// if (render_width > render_height)
111+
// {
112+
// ratio *= (render_height / render_width);
113+
// left_x += 0.5f * (1.0f - ratio);
114+
// right_x -= 0.5f * (1.0f - ratio);
115+
// }
116+
// else if (render_height > render_width)
117+
// {
118+
// ratio *= (render_width / render_height);
119+
// left_y += 0.5f * (1.0f - ratio);
120+
// right_y -= 0.5f * (1.0f - ratio);
121+
// }
122+
// }
123+
//
124+
// hardware_format_primary = target->accumulation_surface;
125+
// }
126+
//}
101127
}
102128
else if (render_data->flags.test(s_gui_widget_render_data::_render_blurred_back_buffer_bit))
103129
{

0 commit comments

Comments
 (0)