summaryrefslogtreecommitdiff
path: root/src/core/device.c
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2020-07-18 03:25:53 +0800
committerchai <chaifix@163.com>2020-07-18 03:25:53 +0800
commit4984946caf0397a13da7605bc1ee406ea7354628 (patch)
tree0e87b71ae7639b8f12dbf3e8ec94e2087390acef /src/core/device.c
parente5e995103377f9bb79123ef8257d8680ed0945fc (diff)
-VertexShaderIn
Diffstat (limited to 'src/core/device.c')
-rw-r--r--src/core/device.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/core/device.c b/src/core/device.c
index 923a2fa..8284315 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -44,7 +44,7 @@ static struct {
StencilFunc stencil_func;
StencilOp stencil_failop, stencil_dpfailop, stencil_passop;
- Vert* verts; uint vert_count;
+ Vertex* verts; uint vert_count;
uint* indices; uint prim_count;
Program* program;
@@ -457,7 +457,7 @@ void ssrU_blend(
out->a = src->a + dst->a;
}
-void ssr_bindvertices(Vert* verts, int vert_count, uint* indices, int prim_count) {
+void ssr_bindvertices(Vertex* verts, int vert_count, uint* indices, int prim_count) {
ssr_assert(verts && indices);
state.verts = verts;
state.vert_count = vert_count;
@@ -474,7 +474,6 @@ void ssr_unuseprogram() {
state.program = NULL;
}
-VertexShaderIn ssr_vert_in;
FragmentShaderIn ssr_frag_in;
static struct {
@@ -659,13 +658,12 @@ void ssr_draw(ssr_PrimitiveType primitive) {
/*vertex operation*/
VertexShader vert_shader = state.program->vertexshader;
for (int i = 0; i < state.vert_count; ++i) {
- Vert* vert = &state.verts[i];
- ssr_vert_in.vertex = vert;
+ Vertex* vert = &state.verts[i];
/*set register pointers*/
if (use_extra_varyings) {
ssrS_setupregisterpointers(vert->index);
}
- vert_shader(&state.uniforms, &ssr_vert_in, &clip_coords.coords[i]);
+ vert_shader(&state.uniforms, vert, &clip_coords.coords[i]);
}
/*set register pointer to frag-in*/