-fixed emscripten compilation
This commit is contained in:
parent
3c1c67efd0
commit
84ba5f9eb5
6 changed files with 36 additions and 71 deletions
|
|
@ -187,6 +187,20 @@ struct Renderer
|
|||
}
|
||||
}
|
||||
|
||||
struct DrawData
|
||||
{
|
||||
Texture texture;
|
||||
vec2 position;
|
||||
vec2 size;
|
||||
vec4 coords;
|
||||
short depth = 0;
|
||||
uint color = uint.max;
|
||||
float angle = 0;
|
||||
uint material_id = 0;
|
||||
uint mesh_id = 0;
|
||||
uint thread_id = 0;
|
||||
}
|
||||
|
||||
struct Thread
|
||||
{
|
||||
//Vector!VertexBlock block;
|
||||
|
|
@ -430,20 +444,6 @@ struct Renderer
|
|||
|
||||
}
|
||||
|
||||
struct DrawData
|
||||
{
|
||||
Texture texture;
|
||||
vec2 position;
|
||||
vec2 size;
|
||||
vec4 coords;
|
||||
short depth = 0;
|
||||
uint color = uint.max;
|
||||
float angle = 0;
|
||||
uint material_id = 0;
|
||||
uint mesh_id = 0;
|
||||
uint thread_id = 0;
|
||||
}
|
||||
|
||||
//void draw(Texture tex, vec2 pos, vec2 size, vec4 coords, short depth = 0, uint color = uint.max, float angle = 0, uint material_id = 0, uint mesh_id = 0, uint thread_id = 0)
|
||||
void draw(scope ref const(DrawData) data)
|
||||
{
|
||||
|
|
@ -570,7 +570,7 @@ struct Renderer
|
|||
memcpy(ptr+16,pos.data.ptr,8);
|
||||
memcpy(ptr+32,coords.data.ptr,16);*/
|
||||
|
||||
short[] verts = cast(short[])block.batch_vertices;
|
||||
short[] verts = (cast(short*)block.batch_vertices.ptr)[0..block.batch_vertices.length>>1];
|
||||
uint item_id = block.items;
|
||||
|
||||
uint mesh_id = data.mesh_id;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue