Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
尘离序散
obs-studio
提交
1dd39177
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,发现更多精彩内容 >>
提交
1dd39177
编写于
4月 05, 2014
作者:
Z
Zachary Lund
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added GLX_NV_copy_image extension, updated tools
上级
4250f6ae
变更
6
展开全部
显示空白变更内容
内联
并排
Showing
6 changed file
with
443 addition
and
425 deletion
+443
-425
libobs-opengl/GL/gl_obs.c
libobs-opengl/GL/gl_obs.c
+335
-338
libobs-opengl/GL/gl_obs.h
libobs-opengl/GL/gl_obs.h
+50
-47
libobs-opengl/GL/glx_obs.c
libobs-opengl/GL/glx_obs.c
+27
-17
libobs-opengl/GL/glx_obs.h
libobs-opengl/GL/glx_obs.h
+12
-3
libobs-opengl/GL/wgl_obs.c
libobs-opengl/GL/wgl_obs.c
+14
-17
libobs-opengl/GL/wgl_obs.h
libobs-opengl/GL/wgl_obs.h
+5
-3
未找到文件。
libobs-opengl/GL/gl_obs.c
浏览文件 @
1dd39177
此差异已折叠。
点击以展开。
libobs-opengl/GL/gl_obs.h
浏览文件 @
1dd39177
此差异已折叠。
点击以展开。
libobs-opengl/GL/glx_obs.c
浏览文件 @
1dd39177
/* AUTOGENERATED BY glLoadGen, DO NOT EDIT */
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
...
...
@@ -44,17 +45,14 @@ static PROC WinGetProcAddress(const char *name)
/* Linux, FreeBSD, other */
#ifndef IntGetProcAddress
#ifndef GLX_ARB_get_proc_address
#define GLX_ARB_get_proc_address 1
typedef
void
(
*
__GLXextFuncPtr
)(
void
);
extern
__GLXextFuncPtr
glXGetProcAddressARB
(
const
GLubyte
*
);
#endif
/* GLX_ARB_get_proc_address */
extern
void
(
*
glXGetProcAddressARB
(
const
GLubyte
*
procName
))
(
void
);
#define IntGetProcAddress(name) (*glXGetProcAddressARB)((const GLubyte*)name)
#endif
/* TODO: Need to eventually use eglGetProcAddress */
int
glx_ext_NV_copy_image
=
glx_LOAD_FAILED
;
int
glx_ext_ARB_create_context
=
glx_LOAD_FAILED
;
int
glx_ext_ARB_create_context_profile
=
glx_LOAD_FAILED
;
int
glx_ext_ARB_create_context_robustness
=
glx_LOAD_FAILED
;
...
...
@@ -68,9 +66,19 @@ int glx_ext_EXT_import_context = glx_LOAD_FAILED;
int
glx_ext_EXT_swap_control
=
glx_LOAD_FAILED
;
int
glx_ext_EXT_swap_control_tear
=
glx_LOAD_FAILED
;
void
(
CODEGEN_FUNCPTR
*
_ptrc_glXCopyImageSubDataNV
)(
Display
*
,
GLXContext
,
GLuint
,
GLenum
,
GLint
,
GLint
,
GLint
,
GLint
,
GLXContext
,
GLuint
,
GLenum
,
GLint
,
GLint
,
GLint
,
GLint
,
GLsizei
,
GLsizei
,
GLsizei
)
=
NULL
;
static
int
Load_NV_copy_image
(
void
)
{
int
numFailed
=
0
;
_ptrc_glXCopyImageSubDataNV
=
(
void
(
CODEGEN_FUNCPTR
*
)(
Display
*
,
GLXContext
,
GLuint
,
GLenum
,
GLint
,
GLint
,
GLint
,
GLint
,
GLXContext
,
GLuint
,
GLenum
,
GLint
,
GLint
,
GLint
,
GLint
,
GLsizei
,
GLsizei
,
GLsizei
))
IntGetProcAddress
(
"glXCopyImageSubDataNV"
);
if
(
!
_ptrc_glXCopyImageSubDataNV
)
numFailed
++
;
return
numFailed
;
}
GLXContext
(
CODEGEN_FUNCPTR
*
_ptrc_glXCreateContextAttribsARB
)(
Display
*
,
GLXFBConfig
,
GLXContext
,
Bool
,
const
int
*
)
=
NULL
;
static
int
Load_ARB_create_context
()
static
int
Load_ARB_create_context
(
void
)
{
int
numFailed
=
0
;
_ptrc_glXCreateContextAttribsARB
=
(
GLXContext
(
CODEGEN_FUNCPTR
*
)(
Display
*
,
GLXFBConfig
,
GLXContext
,
Bool
,
const
int
*
))
IntGetProcAddress
(
"glXCreateContextAttribsARB"
);
...
...
@@ -80,18 +88,18 @@ static int Load_ARB_create_context()
void
(
CODEGEN_FUNCPTR
*
_ptrc_glXFreeContextEXT
)(
Display
*
,
GLXContext
)
=
NULL
;
GLXContextID
(
CODEGEN_FUNCPTR
*
_ptrc_glXGetContextIDEXT
)(
const
GLXContext
)
=
NULL
;
Display
*
(
CODEGEN_FUNCPTR
*
_ptrc_glXGetCurrentDisplayEXT
)()
=
NULL
;
Display
*
(
CODEGEN_FUNCPTR
*
_ptrc_glXGetCurrentDisplayEXT
)(
void
)
=
NULL
;
GLXContext
(
CODEGEN_FUNCPTR
*
_ptrc_glXImportContextEXT
)(
Display
*
,
GLXContextID
)
=
NULL
;
int
(
CODEGEN_FUNCPTR
*
_ptrc_glXQueryContextInfoEXT
)(
Display
*
,
GLXContext
,
int
,
int
*
)
=
NULL
;
static
int
Load_EXT_import_context
()
static
int
Load_EXT_import_context
(
void
)
{
int
numFailed
=
0
;
_ptrc_glXFreeContextEXT
=
(
void
(
CODEGEN_FUNCPTR
*
)(
Display
*
,
GLXContext
))
IntGetProcAddress
(
"glXFreeContextEXT"
);
if
(
!
_ptrc_glXFreeContextEXT
)
numFailed
++
;
_ptrc_glXGetContextIDEXT
=
(
GLXContextID
(
CODEGEN_FUNCPTR
*
)(
const
GLXContext
))
IntGetProcAddress
(
"glXGetContextIDEXT"
);
if
(
!
_ptrc_glXGetContextIDEXT
)
numFailed
++
;
_ptrc_glXGetCurrentDisplayEXT
=
(
Display
*
(
CODEGEN_FUNCPTR
*
)())
IntGetProcAddress
(
"glXGetCurrentDisplayEXT"
);
_ptrc_glXGetCurrentDisplayEXT
=
(
Display
*
(
CODEGEN_FUNCPTR
*
)(
void
))
IntGetProcAddress
(
"glXGetCurrentDisplayEXT"
);
if
(
!
_ptrc_glXGetCurrentDisplayEXT
)
numFailed
++
;
_ptrc_glXImportContextEXT
=
(
GLXContext
(
CODEGEN_FUNCPTR
*
)(
Display
*
,
GLXContextID
))
IntGetProcAddress
(
"glXImportContextEXT"
);
if
(
!
_ptrc_glXImportContextEXT
)
numFailed
++
;
...
...
@@ -102,7 +110,7 @@ static int Load_EXT_import_context()
void
(
CODEGEN_FUNCPTR
*
_ptrc_glXSwapIntervalEXT
)(
Display
*
,
GLXDrawable
,
int
)
=
NULL
;
static
int
Load_EXT_swap_control
()
static
int
Load_EXT_swap_control
(
void
)
{
int
numFailed
=
0
;
_ptrc_glXSwapIntervalEXT
=
(
void
(
CODEGEN_FUNCPTR
*
)(
Display
*
,
GLXDrawable
,
int
))
IntGetProcAddress
(
"glXSwapIntervalEXT"
);
...
...
@@ -110,15 +118,16 @@ static int Load_EXT_swap_control()
return
numFailed
;
}
typedef
int
(
*
PFN_LOADFUNCPOINTERS
)();
typedef
int
(
*
PFN_LOADFUNCPOINTERS
)(
void
);
typedef
struct
glx_StrToExtMap_s
{
char
*
extensionName
;
c
onst
c
har
*
extensionName
;
int
*
extensionVariable
;
PFN_LOADFUNCPOINTERS
LoadExtension
;
}
glx_StrToExtMap
;
static
glx_StrToExtMap
ExtensionMap
[
12
]
=
{
static
glx_StrToExtMap
ExtensionMap
[
13
]
=
{
{
"GLX_NV_copy_image"
,
&
glx_ext_NV_copy_image
,
Load_NV_copy_image
},
{
"GLX_ARB_create_context"
,
&
glx_ext_ARB_create_context
,
Load_ARB_create_context
},
{
"GLX_ARB_create_context_profile"
,
&
glx_ext_ARB_create_context_profile
,
NULL
},
{
"GLX_ARB_create_context_robustness"
,
&
glx_ext_ARB_create_context_robustness
,
NULL
},
...
...
@@ -133,7 +142,7 @@ static glx_StrToExtMap ExtensionMap[12] = {
{
"GLX_EXT_swap_control_tear"
,
&
glx_ext_EXT_swap_control_tear
,
NULL
},
};
static
int
g_extensionMapSize
=
1
2
;
static
int
g_extensionMapSize
=
1
3
;
static
glx_StrToExtMap
*
FindExtEntry
(
const
char
*
extensionName
)
{
...
...
@@ -148,8 +157,9 @@ static glx_StrToExtMap *FindExtEntry(const char *extensionName)
return
NULL
;
}
static
void
ClearExtensionVars
()
static
void
ClearExtensionVars
(
void
)
{
glx_ext_NV_copy_image
=
glx_LOAD_FAILED
;
glx_ext_ARB_create_context
=
glx_LOAD_FAILED
;
glx_ext_ARB_create_context_profile
=
glx_LOAD_FAILED
;
glx_ext_ARB_create_context_robustness
=
glx_LOAD_FAILED
;
...
...
libobs-opengl/GL/glx_obs.h
浏览文件 @
1dd39177
/* AUTOGENERATED BY glLoadGen, DO NOT EDIT */
#ifndef POINTER_C_GENERATED_HEADER_GLXWIN_H
#define POINTER_C_GENERATED_HEADER_GLXWIN_H
...
...
@@ -37,6 +38,7 @@ typedef double GLclampd;
#endif
/*GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS*/
#ifndef GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
#define GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
...
...
@@ -117,6 +119,7 @@ typedef unsigned __int64 uint64_t;
extern
"C"
{
#endif
/*__cplusplus*/
extern
int
glx_ext_NV_copy_image
;
extern
int
glx_ext_ARB_create_context
;
extern
int
glx_ext_ARB_create_context_profile
;
extern
int
glx_ext_ARB_create_context_robustness
;
...
...
@@ -169,6 +172,12 @@ extern int glx_ext_EXT_swap_control_tear;
#define GLX_LATE_SWAPS_TEAR_EXT 0x20F3
#ifndef GLX_NV_copy_image
#define GLX_NV_copy_image 1
extern
void
(
CODEGEN_FUNCPTR
*
_ptrc_glXCopyImageSubDataNV
)(
Display
*
,
GLXContext
,
GLuint
,
GLenum
,
GLint
,
GLint
,
GLint
,
GLint
,
GLXContext
,
GLuint
,
GLenum
,
GLint
,
GLint
,
GLint
,
GLint
,
GLsizei
,
GLsizei
,
GLsizei
);
#define glXCopyImageSubDataNV _ptrc_glXCopyImageSubDataNV
#endif
/*GLX_NV_copy_image*/
#ifndef GLX_ARB_create_context
#define GLX_ARB_create_context 1
extern
GLXContext
(
CODEGEN_FUNCPTR
*
_ptrc_glXCreateContextAttribsARB
)(
Display
*
,
GLXFBConfig
,
GLXContext
,
Bool
,
const
int
*
);
...
...
@@ -189,7 +198,7 @@ extern void (CODEGEN_FUNCPTR *_ptrc_glXFreeContextEXT)(Display *, GLXContext);
#define glXFreeContextEXT _ptrc_glXFreeContextEXT
extern
GLXContextID
(
CODEGEN_FUNCPTR
*
_ptrc_glXGetContextIDEXT
)(
const
GLXContext
);
#define glXGetContextIDEXT _ptrc_glXGetContextIDEXT
extern
Display
*
(
CODEGEN_FUNCPTR
*
_ptrc_glXGetCurrentDisplayEXT
)();
extern
Display
*
(
CODEGEN_FUNCPTR
*
_ptrc_glXGetCurrentDisplayEXT
)(
void
);
#define glXGetCurrentDisplayEXT _ptrc_glXGetCurrentDisplayEXT
extern
GLXContext
(
CODEGEN_FUNCPTR
*
_ptrc_glXImportContextEXT
)(
Display
*
,
GLXContextID
);
#define glXImportContextEXT _ptrc_glXImportContextEXT
...
...
@@ -207,7 +216,7 @@ extern void (CODEGEN_FUNCPTR *_ptrc_glXSwapIntervalEXT)(Display *, GLXDrawable,
enum
glx_LoadStatus
{
glx_LOAD_FAILED
=
0
,
glx_LOAD_SUCCEEDED
=
1
,
glx_LOAD_SUCCEEDED
=
1
};
int
glx_LoadFunctions
(
Display
*
display
,
int
screen
);
...
...
@@ -217,4 +226,4 @@ int glx_LoadFunctions(Display *display, int screen);
}
#endif
/*__cplusplus*/
#endif /
/POINTER_C_GENERATED_HEADER_GLXWIN_H
#endif
/
* POINTER_C_GENERATED_HEADER_GLXWIN_H */
libobs-opengl/GL/wgl_obs.c
浏览文件 @
1dd39177
/* AUTOGENERATED BY glLoadGen, DO NOT EDIT */
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
...
...
@@ -44,17 +45,13 @@ static PROC WinGetProcAddress(const char *name)
/* Linux, FreeBSD, other */
#ifndef IntGetProcAddress
#ifndef GLX_ARB_get_proc_address
#define GLX_ARB_get_proc_address 1
typedef
void
(
*
__GLXextFuncPtr
)(
void
);
extern
__GLXextFuncPtr
glXGetProcAddressARB
(
const
GLubyte
*
);
#endif
/* GLX_ARB_get_proc_address */
extern
void
(
*
glXGetProcAddressARB
(
const
GLubyte
*
procName
))
(
void
);
#define IntGetProcAddress(name) (*glXGetProcAddressARB)((const GLubyte*)name)
#endif
/* TODO: Need to eventually use eglGetProcAddress */
int
wgl_ext_ARB_multisample
=
wgl_LOAD_FAILED
;
int
wgl_ext_ARB_extensions_string
=
wgl_LOAD_FAILED
;
int
wgl_ext_ARB_pixel_format
=
wgl_LOAD_FAILED
;
...
...
@@ -71,7 +68,7 @@ int wgl_ext_NV_swap_group = wgl_LOAD_FAILED;
const
char
*
(
CODEGEN_FUNCPTR
*
_ptrc_wglGetExtensionsStringARB
)(
HDC
)
=
NULL
;
static
int
Load_ARB_extensions_string
()
static
int
Load_ARB_extensions_string
(
void
)
{
int
numFailed
=
0
;
_ptrc_wglGetExtensionsStringARB
=
(
const
char
*
(
CODEGEN_FUNCPTR
*
)(
HDC
))
IntGetProcAddress
(
"wglGetExtensionsStringARB"
);
...
...
@@ -83,7 +80,7 @@ BOOL (CODEGEN_FUNCPTR *_ptrc_wglChoosePixelFormatARB)(HDC, const int *, const FL
BOOL
(
CODEGEN_FUNCPTR
*
_ptrc_wglGetPixelFormatAttribfvARB
)(
HDC
,
int
,
int
,
UINT
,
const
int
*
,
FLOAT
*
)
=
NULL
;
BOOL
(
CODEGEN_FUNCPTR
*
_ptrc_wglGetPixelFormatAttribivARB
)(
HDC
,
int
,
int
,
UINT
,
const
int
*
,
int
*
)
=
NULL
;
static
int
Load_ARB_pixel_format
()
static
int
Load_ARB_pixel_format
(
void
)
{
int
numFailed
=
0
;
_ptrc_wglChoosePixelFormatARB
=
(
BOOL
(
CODEGEN_FUNCPTR
*
)(
HDC
,
const
int
*
,
const
FLOAT
*
,
UINT
,
int
*
,
UINT
*
))
IntGetProcAddress
(
"wglChoosePixelFormatARB"
);
...
...
@@ -97,7 +94,7 @@ static int Load_ARB_pixel_format()
HGLRC
(
CODEGEN_FUNCPTR
*
_ptrc_wglCreateContextAttribsARB
)(
HDC
,
HGLRC
,
const
int
*
)
=
NULL
;
static
int
Load_ARB_create_context
()
static
int
Load_ARB_create_context
(
void
)
{
int
numFailed
=
0
;
_ptrc_wglCreateContextAttribsARB
=
(
HGLRC
(
CODEGEN_FUNCPTR
*
)(
HDC
,
HGLRC
,
const
int
*
))
IntGetProcAddress
(
"wglCreateContextAttribsARB"
);
...
...
@@ -105,13 +102,13 @@ static int Load_ARB_create_context()
return
numFailed
;
}
int
(
CODEGEN_FUNCPTR
*
_ptrc_wglGetSwapIntervalEXT
)()
=
NULL
;
int
(
CODEGEN_FUNCPTR
*
_ptrc_wglGetSwapIntervalEXT
)(
void
)
=
NULL
;
BOOL
(
CODEGEN_FUNCPTR
*
_ptrc_wglSwapIntervalEXT
)(
int
)
=
NULL
;
static
int
Load_EXT_swap_control
()
static
int
Load_EXT_swap_control
(
void
)
{
int
numFailed
=
0
;
_ptrc_wglGetSwapIntervalEXT
=
(
int
(
CODEGEN_FUNCPTR
*
)())
IntGetProcAddress
(
"wglGetSwapIntervalEXT"
);
_ptrc_wglGetSwapIntervalEXT
=
(
int
(
CODEGEN_FUNCPTR
*
)(
void
))
IntGetProcAddress
(
"wglGetSwapIntervalEXT"
);
if
(
!
_ptrc_wglGetSwapIntervalEXT
)
numFailed
++
;
_ptrc_wglSwapIntervalEXT
=
(
BOOL
(
CODEGEN_FUNCPTR
*
)(
int
))
IntGetProcAddress
(
"wglSwapIntervalEXT"
);
if
(
!
_ptrc_wglSwapIntervalEXT
)
numFailed
++
;
...
...
@@ -125,7 +122,7 @@ BOOL (CODEGEN_FUNCPTR *_ptrc_wglQueryMaxSwapGroupsNV)(HDC, GLuint *, GLuint *) =
BOOL
(
CODEGEN_FUNCPTR
*
_ptrc_wglQuerySwapGroupNV
)(
HDC
,
GLuint
*
,
GLuint
*
)
=
NULL
;
BOOL
(
CODEGEN_FUNCPTR
*
_ptrc_wglResetFrameCountNV
)(
HDC
)
=
NULL
;
static
int
Load_NV_swap_group
()
static
int
Load_NV_swap_group
(
void
)
{
int
numFailed
=
0
;
_ptrc_wglBindSwapBarrierNV
=
(
BOOL
(
CODEGEN_FUNCPTR
*
)(
GLuint
,
GLuint
))
IntGetProcAddress
(
"wglBindSwapBarrierNV"
);
...
...
@@ -143,10 +140,10 @@ static int Load_NV_swap_group()
return
numFailed
;
}
typedef
int
(
*
PFN_LOADFUNCPOINTERS
)();
typedef
int
(
*
PFN_LOADFUNCPOINTERS
)(
void
);
typedef
struct
wgl_StrToExtMap_s
{
char
*
extensionName
;
c
onst
c
har
*
extensionName
;
int
*
extensionVariable
;
PFN_LOADFUNCPOINTERS
LoadExtension
;
}
wgl_StrToExtMap
;
...
...
@@ -182,7 +179,7 @@ static wgl_StrToExtMap *FindExtEntry(const char *extensionName)
return
NULL
;
}
static
void
ClearExtensionVars
()
static
void
ClearExtensionVars
(
void
)
{
wgl_ext_ARB_multisample
=
wgl_LOAD_FAILED
;
wgl_ext_ARB_extensions_string
=
wgl_LOAD_FAILED
;
...
...
libobs-opengl/GL/wgl_obs.h
浏览文件 @
1dd39177
/* AUTOGENERATED BY glLoadGen, DO NOT EDIT */
#ifndef POINTER_C_GENERATED_HEADER_WINDOWSGL_H
#define POINTER_C_GENERATED_HEADER_WINDOWSGL_H
...
...
@@ -42,6 +43,7 @@ typedef double GLclampd;
#endif
/*GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS*/
#ifndef GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
#define GL_LOAD_GEN_BASIC_OPENGL_TYPEDEFS
...
...
@@ -190,7 +192,7 @@ extern HGLRC (CODEGEN_FUNCPTR *_ptrc_wglCreateContextAttribsARB)(HDC, HGLRC, con
#ifndef WGL_EXT_swap_control
#define WGL_EXT_swap_control 1
extern
int
(
CODEGEN_FUNCPTR
*
_ptrc_wglGetSwapIntervalEXT
)();
extern
int
(
CODEGEN_FUNCPTR
*
_ptrc_wglGetSwapIntervalEXT
)(
void
);
#define wglGetSwapIntervalEXT _ptrc_wglGetSwapIntervalEXT
extern
BOOL
(
CODEGEN_FUNCPTR
*
_ptrc_wglSwapIntervalEXT
)(
int
);
#define wglSwapIntervalEXT _ptrc_wglSwapIntervalEXT
...
...
@@ -218,7 +220,7 @@ extern BOOL (CODEGEN_FUNCPTR *_ptrc_wglResetFrameCountNV)(HDC);
enum
wgl_LoadStatus
{
wgl_LOAD_FAILED
=
0
,
wgl_LOAD_SUCCEEDED
=
1
,
wgl_LOAD_SUCCEEDED
=
1
};
int
wgl_LoadFunctions
(
HDC
hdc
);
...
...
@@ -228,4 +230,4 @@ int wgl_LoadFunctions(HDC hdc);
}
#endif
/*__cplusplus*/
#endif /
/POINTER_C_GENERATED_HEADER_WINDOWSGL_H
#endif
/
* POINTER_C_GENERATED_HEADER_WINDOWSGL_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录