static bool graphics_init(struct graphics_subsystem *graphics) { struct matrix3 top_mat; matrix3_identity(&top_mat); da_push_back(graphics->matrix_stack, &top_mat); graphics->exports.device_entercontext(graphics->device); if (!graphics_init_immediate_vb(graphics)) return false; if (!graphics_init_sprite_vb(graphics)) return false; if (pthread_mutex_init(&graphics->mutex, NULL) != 0) return false; graphics->exports.device_leavecontext(graphics->device); return true; }
void gs_matrix_identity(void) { struct matrix3 *top_mat = top_matrix(thread_graphics); matrix3_identity(top_mat); }
static void rs_color_space_init(RSColorSpace *color_space) { matrix3_identity(&color_space->matrix_to_pcs); matrix3_identity(&color_space->matrix_from_pcs); }