public ObsDisplay(libobs.gs_init_data graphicsData) { instance = libobs.obs_display_create(ref graphicsData); if (instance == null) { throw new ApplicationException("obs_display_create failed"); } }
public void InitDisplay() { uint width = Width >= 0 ? (uint)Width : 0; uint height = Height >= 0 ? (uint)Height : 0; libobs.gs_init_data initData = new libobs.gs_init_data { cx = width, cy = height, format = libobs.gs_color_format.GS_RGBA, zsformat = libobs.gs_zstencil_format.GS_ZS_NONE, window = new libobs.gs_window { hwnd = Handle }, }; display = new ObsDisplay(initData); DisplayCreated(); }