(API Change) Remove obs_graphics()
API Removed: - graphics_t obs_graphics(); Replaced With: - void obs_enter_graphics(); - void obs_leave_graphics(); Description: obs_graphics() was somewhat of a pointless function. The only time that it was ever necessary was to pass it as a parameter to gs_entercontext() followed by a subsequent gs_leavecontext() call after that. So, I felt that it made a bit more sense just to implement obs_enter_graphics() and obs_leave_graphics() functions to do the exact same thing without having to repeat that code. There's really no need to ever "hold" the graphics pointer, though I suppose that could change in the future so having a similar function come back isn't out of the question. Still, this at least reduces the amount of unnecessary repeated code for the time being.
This commit is contained in:
@@ -56,7 +56,7 @@ static inline void render_displays(void)
|
||||
if (!obs->data.valid)
|
||||
return;
|
||||
|
||||
gs_entercontext(obs_graphics());
|
||||
gs_entercontext(obs->video.graphics);
|
||||
|
||||
/* render extra displays/swaps */
|
||||
pthread_mutex_lock(&obs->data.displays_mutex);
|
||||
@@ -411,7 +411,7 @@ static inline void output_frame(uint64_t timestamp)
|
||||
memset(&frame, 0, sizeof(struct video_data));
|
||||
frame.timestamp = timestamp;
|
||||
|
||||
gs_entercontext(obs_graphics());
|
||||
gs_entercontext(video->graphics);
|
||||
|
||||
render_video(video, cur_texture, prev_texture);
|
||||
frame_ready = download_frame(video, prev_texture, &frame);
|
||||
|
Reference in New Issue
Block a user