Commit Graph

5 Commits

Author SHA1 Message Date
Benjamin Otte
6c56793147 gsk: Add gsk_texture_download() API
Now users can download pixels and make everything slooooooow.
2016-12-23 08:11:01 +01:00
Benjamin Otte
2d2209859e gsk: Rename to gsk_texture_download_surface()
I want to reuse the name gsk_texture_download() for downloading the
actual bytes.
2016-12-23 08:11:01 +01:00
Benjamin Otte
48e7f4191f gsktexture: Allow attaching render data to textures
This allows renderers (or anyone really) to attach "render data" to
textures. Only the first render data sticks.

You can gsk_texture_set_render_data() with the key you will use to
look the data up again, and if no data has been set yet, yours will be
set.

You can retrieve this data via gsk_texture_get_render_data() later on.
If your data has been cleared, NULL will be returned.

When gsk_texture_clear_render_data() is called (which the texture will
call when it is finalized), your destory notify will be called and you
have to release your render data.

The GL driver uses this to attach texture ids to GskTextures.
2016-11-16 17:36:33 +01:00
Benjamin Otte
40565fb030 gsk: Rework GskTexture
We do no longer bind textures to a renderer, instead they are a way for
applications to provide texture data.

For now, that's it. We've reverted to uploading it from scratch every
frame.
2016-11-16 17:36:33 +01:00
Benjamin Otte
46eb2c1be9 gsk: Add GskTexture 2016-11-08 20:31:34 +01:00