flickering fixed !
This commit is contained in:
@ -57,6 +57,7 @@ union uncolored_space_triangle {
|
||||
t_fvec2 uv2; /* in pixels */
|
||||
} primitive;
|
||||
|
||||
/* TODO: have it packed? */
|
||||
/* structure that is passed in opengl vertex array */
|
||||
struct uncolored_space_triangle_payload {
|
||||
t_fvec3 v0;
|
||||
|
@ -67,8 +67,6 @@ static void draw_uncolored_space_traingle_batch(struct mesh_batch *batch,
|
||||
const t_frect srcrect = textures_get_srcrect(&ctx.texture_cache, texture_key);
|
||||
const t_frect dims = textures_get_dims(&ctx.texture_cache, texture_key);
|
||||
|
||||
/* TODO: fast path for uvs mapped directly on srcrect corners? */
|
||||
|
||||
const float wr = srcrect.w / dims.w;
|
||||
const float hr = srcrect.h / dims.h;
|
||||
const float xr = srcrect.x / dims.w;
|
||||
@ -107,7 +105,7 @@ static void draw_uncolored_space_traingle_batch(struct mesh_batch *batch,
|
||||
(void *)offsetof(struct uncolored_space_triangle_payload, uv0));
|
||||
|
||||
/* commit for drawing */
|
||||
glDrawArrays(GL_TRIANGLES, 0, 3 * (int)primitives_len);
|
||||
glDrawArrays(GL_TRIANGLES, 0, 3 * (GLint)primitives_len);
|
||||
|
||||
glDisableClientState(GL_TEXTURE_COORD_ARRAY);
|
||||
glDisableClientState(GL_VERTEX_ARRAY);
|
||||
|
Reference in New Issue
Block a user