Skip to content

Instantly share code, notes, and snippets.

@Leandros
Created February 18, 2017 17:14
Show Gist options
  • Save Leandros/f91b3a401681568939487ec5574305d2 to your computer and use it in GitHub Desktop.
Save Leandros/f91b3a401681568939487ec5574305d2 to your computer and use it in GitHub Desktop.
/* ... some code calling the function below ... */
static int
gui_mkdev(void)
{
struct gui_state *s = g_state->gui_state;
s->vshader = mem_calloc(sizeof(struct gfx_shader));
s->vshader->id = 0x1;
s->vshader->len = 20;
s->vshader->data = NULL;
s->fshader = mem_calloc(sizeof(struct gfx_shader));
s->fshader->id = 0x2;
s->fshader->len = 200;
s->fshader->data = NULL;
DLOG(("vshader->id: %d\n", s->vshader->id));
DLOG(("fshader->id: %d\n", s->fshader->id));
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment