Example #1
0
void gs_set2dmode(void)
{
	uint32_t cx, cy;
	gs_getsize(&cx, &cy);

	gs_ortho(0.0f, (float)cx, 0.0f, (float)cy, -1.0, -1024.0f);
}
Example #2
0
void gs_resetviewport(void)
{
	uint32_t cx, cy;
	assert(thread_graphics != NULL);
	gs_getsize(&cx, &cy);

	gs_setviewport(0, 0, (int)cx, (int)cy);
}
Example #3
0
void gs_set2dmode(void)
{
	uint32_t cx, cy;
	assert(thread_graphics != NULL);
	gs_getsize(&cx, &cy);

	gs_ortho(0.0f, (float)cx, 0.0f, (float)cy, -1.0, -1024.0f);
}
Example #4
0
static inline void render_begin(struct obs_display *display)
{
	struct vec4 clear_color;
	uint32_t width, height;

	gs_load_swapchain(display ? display->swap : NULL);

	gs_getsize(&width, &height);

	gs_beginscene();
	vec4_set(&clear_color, 0.3f, 0.0f, 0.0f, 1.0f);
	gs_clear(GS_CLEAR_COLOR | GS_CLEAR_DEPTH | GS_CLEAR_STENCIL,
			&clear_color, 1.0f, 0);

	gs_enable_depthtest(false);
	/* gs_enable_blending(false); */
	gs_setcullmode(GS_NEITHER);

	gs_ortho(0.0f, (float)width, 0.0f, (float)height, -100.0f, 100.0f);
	gs_setviewport(0, 0, width, height);
}
Example #5
0
void gs_resetviewport(void)
{
	uint32_t cx, cy;
	gs_getsize(&cx, &cy);
	gs_setviewport(0, 0, (int)cx, (int)cy);
}