Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
02661843
O
obs-studio
项目概览
尘离序散
/
obs-studio
与 Fork 源项目一致
从无法访问的项目Fork
通知
30
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
obs-studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
02661843
编写于
3月 30, 2016
作者:
J
jp9000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
UI: Draw cropped scene item edges as green in preview
上级
eb1ee87f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
55 addition
and
3 deletion
+55
-3
obs/window-basic-main.cpp
obs/window-basic-main.cpp
+24
-0
obs/window-basic-main.hpp
obs/window-basic-main.hpp
+4
-0
obs/window-basic-preview.cpp
obs/window-basic-preview.cpp
+27
-3
未找到文件。
obs/window-basic-main.cpp
浏览文件 @
02661843
...
...
@@ -862,6 +862,26 @@ void OBSBasic::InitPrimitives()
gs_vertex2f
(
0.0
f
,
0.0
f
);
box
=
gs_render_save
();
gs_render_start
(
true
);
gs_vertex2f
(
0.0
f
,
0.0
f
);
gs_vertex2f
(
0.0
f
,
1.0
f
);
boxLeft
=
gs_render_save
();
gs_render_start
(
true
);
gs_vertex2f
(
0.0
f
,
0.0
f
);
gs_vertex2f
(
1.0
f
,
0.0
f
);
boxTop
=
gs_render_save
();
gs_render_start
(
true
);
gs_vertex2f
(
1.0
f
,
0.0
f
);
gs_vertex2f
(
1.0
f
,
1.0
f
);
boxRight
=
gs_render_save
();
gs_render_start
(
true
);
gs_vertex2f
(
0.0
f
,
1.0
f
);
gs_vertex2f
(
1.0
f
,
1.0
f
);
boxBottom
=
gs_render_save
();
gs_render_start
(
true
);
for
(
int
i
=
0
;
i
<=
360
;
i
+=
(
360
/
20
))
{
float
pos
=
RAD
(
float
(
i
));
...
...
@@ -1279,6 +1299,10 @@ OBSBasic::~OBSBasic()
obs_enter_graphics
();
gs_vertexbuffer_destroy
(
box
);
gs_vertexbuffer_destroy
(
boxLeft
);
gs_vertexbuffer_destroy
(
boxTop
);
gs_vertexbuffer_destroy
(
boxRight
);
gs_vertexbuffer_destroy
(
boxBottom
);
gs_vertexbuffer_destroy
(
circle
);
obs_leave_graphics
();
...
...
obs/window-basic-main.hpp
浏览文件 @
02661843
...
...
@@ -113,6 +113,10 @@ private:
std
::
unique_ptr
<
BasicOutputHandler
>
outputHandler
;
gs_vertbuffer_t
*
box
=
nullptr
;
gs_vertbuffer_t
*
boxLeft
=
nullptr
;
gs_vertbuffer_t
*
boxTop
=
nullptr
;
gs_vertbuffer_t
*
boxRight
=
nullptr
;
gs_vertbuffer_t
*
boxBottom
=
nullptr
;
gs_vertbuffer_t
*
circle
=
nullptr
;
bool
sceneChanging
=
false
;
...
...
obs/window-basic-preview.cpp
浏览文件 @
02661843
...
...
@@ -747,12 +747,36 @@ bool OBSBasicPreview::DrawSelectedItem(obs_scene_t *scene,
DrawCircleAtPos
(
0.5
f
,
1.0
f
,
boxTransform
,
main
->
previewScale
);
DrawCircleAtPos
(
1.0
f
,
0.5
f
,
boxTransform
,
main
->
previewScale
);
gs_load_vertexbuffer
(
main
->
box
);
gs_matrix_push
();
gs_matrix_scale3f
(
main
->
previewScale
,
main
->
previewScale
,
1.0
f
);
gs_matrix_mul
(
&
boxTransform
);
gs_draw
(
GS_LINESTRIP
,
0
,
0
);
obs_sceneitem_crop
crop
;
obs_sceneitem_get_crop
(
item
,
&
crop
);
if
(
info
.
bounds_type
==
OBS_BOUNDS_NONE
&&
crop_enabled
(
&
crop
))
{
vec4
color
;
gs_effect_t
*
eff
=
gs_get_effect
();
gs_eparam_t
*
param
=
gs_effect_get_param_by_name
(
eff
,
"color"
);
#define DRAW_SIDE(side, vb) \
if (crop.side > 0) \
vec4_set(&color, 0.0f, 1.0f, 0.0f, 1.0f); \
else \
vec4_set(&color, 1.0f, 0.0f, 0.0f, 1.0f); \
gs_effect_set_vec4(param, &color); \
gs_load_vertexbuffer(main->vb); \
gs_draw(GS_LINESTRIP, 0, 0);
DRAW_SIDE
(
left
,
boxLeft
);
DRAW_SIDE
(
top
,
boxTop
);
DRAW_SIDE
(
right
,
boxRight
);
DRAW_SIDE
(
bottom
,
boxBottom
);
#undef DRAW_SIDE
}
else
{
gs_load_vertexbuffer
(
main
->
box
);
gs_draw
(
GS_LINESTRIP
,
0
,
0
);
}
gs_matrix_pop
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录