mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
@@ -80,6 +80,9 @@ EXPORT void device_setrendertarget(device_t device, texture_t tex,
|
||||
EXPORT void device_setcuberendertarget(device_t device, texture_t cubetex,
|
||||
int side, zstencil_t zstencil);
|
||||
EXPORT void device_copy_texture(device_t device, texture_t dst, texture_t src);
|
||||
EXPORT void device_copy_texture_region(device_t device,
|
||||
texture_t dst, uint32_t dst_x, uint32_t dst_y,
|
||||
texture_t src, uint32_t src_x, uint32_t src_y, uint32_t src_w, uint32_t src_h);
|
||||
EXPORT void device_stage_texture(device_t device, stagesurf_t dst,
|
||||
texture_t src);
|
||||
EXPORT void device_beginscene(device_t device);
|
||||
|
||||
@@ -74,6 +74,7 @@ bool load_graphics_imports(struct gs_exports *exports, void *module,
|
||||
GRAPHICS_IMPORT(device_getzstenciltarget);
|
||||
GRAPHICS_IMPORT(device_setrendertarget);
|
||||
GRAPHICS_IMPORT(device_setcuberendertarget);
|
||||
GRAPHICS_IMPORT(device_copy_texture_region);
|
||||
GRAPHICS_IMPORT(device_copy_texture);
|
||||
GRAPHICS_IMPORT(device_stage_texture);
|
||||
GRAPHICS_IMPORT(device_beginscene);
|
||||
|
||||
@@ -86,6 +86,10 @@ struct gs_exports {
|
||||
int side, zstencil_t zstencil);
|
||||
void (*device_copy_texture)(device_t device, texture_t dst,
|
||||
texture_t src);
|
||||
void (*device_copy_texture_region)(device_t device,
|
||||
texture_t dst, uint32_t dst_x, uint32_t dst_y,
|
||||
texture_t src, uint32_t src_x, uint32_t src_y,
|
||||
uint32_t src_w, uint32_t src_h);
|
||||
void (*device_stage_texture)(device_t device, stagesurf_t dst,
|
||||
texture_t src);
|
||||
void (*device_beginscene)(device_t device);
|
||||
|
||||
@@ -1243,6 +1243,18 @@ void gs_copy_texture(texture_t dst, texture_t src)
|
||||
graphics->exports.device_copy_texture(graphics->device, dst, src);
|
||||
}
|
||||
|
||||
void gs_copy_texture_region(texture_t dst, uint32_t dst_x, uint32_t dst_y,
|
||||
texture_t src, uint32_t src_x, uint32_t src_y,
|
||||
uint32_t src_w, uint32_t src_h)
|
||||
{
|
||||
graphics_t graphics = thread_graphics;
|
||||
if (!graphics) return;
|
||||
|
||||
graphics->exports.device_copy_texture_region(graphics->device,
|
||||
dst, dst_x, dst_y,
|
||||
src, src_x, src_y, src_w, src_h);
|
||||
}
|
||||
|
||||
void gs_stage_texture(stagesurf_t dst, texture_t src)
|
||||
{
|
||||
graphics_t graphics = thread_graphics;
|
||||
|
||||
@@ -580,6 +580,10 @@ EXPORT void gs_setcuberendertarget(texture_t cubetex, int side,
|
||||
zstencil_t zstencil);
|
||||
|
||||
EXPORT void gs_copy_texture(texture_t dst, texture_t src);
|
||||
EXPORT void gs_copy_texture_region(
|
||||
texture_t dst, uint32_t dst_x, uint32_t dst_y,
|
||||
texture_t src, uint32_t src_x, uint32_t src_y,
|
||||
uint32_t src_w, uint32_t src_h);
|
||||
EXPORT void gs_stage_texture(stagesurf_t dst, texture_t src);
|
||||
|
||||
EXPORT void gs_beginscene(void);
|
||||
|
||||
+7
-3
@@ -38,19 +38,23 @@ static void def_log_handler(int log_level, const char *format,
|
||||
if (log_level <= log_output_level) {
|
||||
switch (log_level) {
|
||||
case LOG_DEBUG:
|
||||
printf("debug: %s\n", out);
|
||||
fprintf(stdout, "debug: %s\n", out);
|
||||
fflush(stdout);
|
||||
break;
|
||||
|
||||
case LOG_INFO:
|
||||
printf("info: %s\n", out);
|
||||
fprintf(stdout, "info: %s\n", out);
|
||||
fflush(stdout);
|
||||
break;
|
||||
|
||||
case LOG_WARNING:
|
||||
printf("warning: %s\n", out);
|
||||
fprintf(stdout, "warning: %s\n", out);
|
||||
fflush(stdout);
|
||||
break;
|
||||
|
||||
case LOG_ERROR:
|
||||
fprintf(stderr, "error: %s\n", out);
|
||||
fflush(stderr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user