6 void texture_free(struct RrTexture *tex)
12 free(tex->data.text.string);
17 tex->type = RR_TEXTURE_NONE;
20 void RrTextureSetRGBA(struct RrSurface *sur,
28 struct RrTexture *tex = RrSurfaceTexture(sur, texnum);
32 tex->type = RR_TEXTURE_RGBA;
33 tex->data.rgba.data = data;
40 void RrTextureSetText(struct RrSurface *sur,
46 struct RrTexture *tex = RrSurfaceTexture(sur, texnum);
51 tex->type = RR_TEXTURE_TEXT;
52 tex->data.text.font = font;
53 tex->data.text.layout = layout;
56 tex->data.text.string = malloc(l);
57 memcpy(tex->data.text.string, text, l);