Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
小白菜888
Obs Studio
提交
1b3b1775
O
Obs Studio
项目概览
小白菜888
/
Obs Studio
通知
4
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Obs Studio
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
1b3b1775
编写于
10月 10, 2013
作者:
J
jp9000
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add initial GL vertex buffer code
上级
e804a904
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
64 addition
and
25 deletion
+64
-25
libobs-opengl/gl-shader.c
libobs-opengl/gl-shader.c
+1
-1
libobs-opengl/gl-subsystem.c
libobs-opengl/gl-subsystem.c
+7
-17
libobs-opengl/gl-subsystem.h
libobs-opengl/gl-subsystem.h
+21
-7
libobs-opengl/gl-vertexbuffer.c
libobs-opengl/gl-vertexbuffer.c
+35
-0
未找到文件。
libobs-opengl/gl-shader.c
浏览文件 @
1b3b1775
...
...
@@ -96,7 +96,7 @@ static inline bool gl_add_params(struct gs_shader *shader,
static
void
gl_add_sampler
(
struct
gs_shader
*
shader
,
struct
shader_sampler
*
sampler
)
{
struct
gs_sampler
new_sampler
=
{
0
};
struct
gs_sampler
_state
new_sampler
=
{
0
};
struct
gs_sampler_info
info
;
shader_sampler_convert
(
sampler
,
&
info
);
...
...
libobs-opengl/gl-subsystem.c
浏览文件 @
1b3b1775
...
...
@@ -17,7 +17,7 @@
#include "gl-subsystem.h"
void
convert_sampler_info
(
struct
gs_sampler
*
sampler
,
void
convert_sampler_info
(
struct
gs_sampler
_state
*
sampler
,
struct
gs_sampler_info
*
info
)
{
convert_filter
(
info
->
filter
,
&
sampler
->
min_filter
,
...
...
@@ -103,11 +103,13 @@ texture_t device_create_volumetexture(device_t device, uint32_t width,
samplerstate_t
device_create_samplerstate
(
device_t
device
,
struct
gs_sampler_info
*
info
)
{
}
struct
gs_sampler_state
*
sampler
;
vertbuffer_t
device_create_vertexbuffer
(
device_t
device
,
struct
vb_data
*
data
,
uint32_t
flags
)
{
sampler
=
bmalloc
(
sizeof
(
struct
gs_sampler_state
));
memset
(
sampler
,
0
,
sizeof
(
struct
gs_sampler_state
));
convert_sampler_info
(
sampler
,
info
);
return
sampler
;
}
indexbuffer_t
device_create_indexbuffer
(
device_t
device
,
...
...
@@ -357,18 +359,6 @@ void samplerstate_destroy(samplerstate_t samplerstate)
{
}
void
vertexbuffer_destroy
(
vertbuffer_t
vertbuffer
)
{
}
void
vertexbuffer_flush
(
vertbuffer_t
vertbuffer
,
bool
rebuild
)
{
}
struct
vb_data
*
vertexbuffer_getdata
(
vertbuffer_t
vertbuffer
)
{
}
void
indexbuffer_destroy
(
indexbuffer_t
indexbuffer
)
{
}
...
...
libobs-opengl/gl-subsystem.h
浏览文件 @
1b3b1775
...
...
@@ -181,10 +181,10 @@ static inline GLint convert_address_mode(enum gs_address_mode mode)
}
}
extern
void
convert_sampler_info
(
struct
gs_sampler
*
sampler
,
extern
void
convert_sampler_info
(
struct
gs_sampler
_state
*
sampler
,
struct
gs_sampler_info
*
info
);
struct
gs_sampler
{
struct
gs_sampler
_state
{
GLint
min_filter
;
GLint
mag_filter
;
GLint
address_u
;
...
...
@@ -209,15 +209,29 @@ struct shader_param {
};
struct
gs_shader
{
device_t
device
;
enum
shader_type
type
;
GLuint
program
;
device_t
device
;
enum
shader_type
type
;
GLuint
program
;
struct
shader_param
*
viewproj
;
struct
shader_param
*
world
;
DARRAY
(
struct
gs_sampler
)
samplers
;
DARRAY
(
struct
shader_param
)
params
;
DARRAY
(
struct
gs_sampler_state
)
samplers
;
DARRAY
(
struct
shader_param
)
params
;
};
struct
gs_vertex_buffer
{
GLuint
vertex_buffer
;
GLuint
normal_buffer
;
GLuint
tangent_buffer
;
GLuint
color_buffer
;
DARRAY
(
GLuint
)
uv_buffers
;
device_t
device
;
bool
dyanmic
;
struct
vb_data
*
vbd
;
size_t
num_verts
;
DARRAY
(
size_t
)
uv_sizes
;
};
struct
gs_texture
{
...
...
libobs-opengl/gl-vertexbuffer.c
0 → 100644
浏览文件 @
1b3b1775
/******************************************************************************
Copyright (C) 2013 by Hugh Bailey <obs.jim@gmail.com>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
#include "gl-subsystem.h"
vertbuffer_t
device_create_vertexbuffer
(
device_t
device
,
struct
vb_data
*
data
,
uint32_t
flags
)
{
}
void
vertexbuffer_destroy
(
vertbuffer_t
vertbuffer
)
{
}
void
vertexbuffer_flush
(
vertbuffer_t
vertbuffer
,
bool
rebuild
)
{
}
struct
vb_data
*
vertexbuffer_getdata
(
vertbuffer_t
vertbuffer
)
{
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录