4 void texture_free(struct RrTexture *tex)
10 free(tex->data.text.string);
15 tex->type = RR_TEXTURE_NONE;
18 void RrTextureSetRGBA(struct RrSurface *sur,
26 struct RrTexture *tex = RrSurfaceTexture(sur, texnum);
30 tex->type = RR_TEXTURE_RGBA;
31 tex->data.rgba.data = data;
38 void RrTextureSetText(struct RrSurface *sur,
44 struct RrTexture *tex = RrSurfaceTexture(sur, texnum);
49 tex->type = RR_TEXTURE_TEXT;
50 tex->data.text.font = font;
51 tex->data.text.layout = layout;
54 tex->data.text.string = malloc(l);
55 memcpy(tex->data.text.string, text, l);