Change graphics subsystem to 4x4 matrices

4x4 matrices aren't as optimal, but are much more sensible to handle
when you want to do more advanced stuff like scaling, skewing, or
inversion.
This commit is contained in:
jp9000
2014-06-14 23:09:13 -07:00
parent c2eebd8d1d
commit 1c2a0524b7
19 changed files with 363 additions and 92 deletions

View File

@@ -866,10 +866,8 @@ static inline bool can_render(device_t device)
static void update_viewproj_matrix(struct gs_device *device)
{
struct gs_shader *vs = device->cur_vertex_shader;
struct matrix3 cur_matrix;
gs_matrix_get(&cur_matrix);
gs_matrix_get(&device->cur_view);
matrix4_from_matrix3(&device->cur_view, &cur_matrix);
matrix4_mul(&device->cur_viewproj, &device->cur_view,
&device->cur_proj);
matrix4_transpose(&device->cur_viewproj, &device->cur_viewproj);