separation to vec.h, generic vector ops, camera class and its usage for spatial rendering
This commit is contained in:
@ -3,8 +3,8 @@
|
||||
#define CIRCLES_H
|
||||
|
||||
#include "../util.h"
|
||||
#include "internal_api.h"
|
||||
#include "../context.h"
|
||||
#include "internal_api.h"
|
||||
|
||||
#include <SDL2/SDL.h>
|
||||
#include <stb_ds.h>
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "../context.h"
|
||||
#include "../util.h"
|
||||
#include "quad_element_buffer.h"
|
||||
#include "internal_api.h"
|
||||
|
||||
#include <stb_ds.h>
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
|
||||
#include "../textures.h"
|
||||
#include "../context.h"
|
||||
#include "internal_api.h"
|
||||
|
||||
#include <stb_ds.h>
|
||||
|
||||
@ -66,6 +67,8 @@ static void draw_uncolored_space_traingle_batch(struct mesh_batch *batch,
|
||||
t_rect srcrect = textures_get_srcrect(&ctx.texture_cache, texture_key);
|
||||
t_rect dims = textures_get_dims(&ctx.texture_cache, texture_key);
|
||||
|
||||
/* TODO: fast path for uvs mapped directly on srcrect corners? */
|
||||
|
||||
const float wr = (float)srcrect.w / (float)dims.w;
|
||||
const float hr = (float)srcrect.h / (float)dims.h;
|
||||
const float xr = (float)srcrect.x / (float)dims.w;
|
||||
|
Reference in New Issue
Block a user