(API Change) Merge branch 'windowless-context'
API Changed (obs.h): ----------------------------------------- - Removed member variables from struct obs_video_info: - window_width - window_height - window - Removed functions: - obs_add_draw_callback - obs_remove_draw_callback - obs_resize - obs_preview_set_enabled - obs_preview_enabled API Changed (graphics/graphics.h) ----------------------------------------- - Changed third parameter of gs_create from const struct gs_init_data *data to uint32_t adapter Summary ----------------------------------------- Changing to a windowless context allows the ability to use libobs without needing to have it depend on an open window/view, and removes superfluous functionality that's already provided by the obs_display functions. Biggest benefits of windowless context: - Make it so all window/view related code uses obs_display (which is a major refactor/prune) - Allows core functions to not have to be dependent upon an existing window/view - Allow the ability to make a fully CLI front end that doesn't depend on a window - Allows the ability to a hypothetical CLI from a remote Because of the API changes, multiple modules are affected by this commit to prevent creating broken commits: libobs, libobs-opengl, libobs-d3d11, and the UI. In the libobs back-end, all preview/window API functions that are not related to obs_display have been removed, and to draw on a window/view you must now always create an obs_display (rather than having "main" display functions and then "secondary" display functions that use obs_display). For the technicalities of the graphics back-end, the gs_init function now only takes in an adapter parameter instead of window/format/etc information. To draw on a window/view you must now always create a swap chain for it (note that obs_display wraps this functionality). As for the UI, the UI has been refactored so that all dialogs/windows that have a preview do not have to manually create OBSDisplay objects; the OBSQTDisplay class now automatically handles all the code related to displays. The main window preview now also relies on that same functionality/code.
Showing
obs/qt-display.cpp
0 → 100644
想要评论请 注册 或 登录