diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2012-06-30 08:34:34 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2012-06-30 08:34:34 +0400 |
commit | 436f02ab9cdf58d8b68f124be0d974a5de0d9308 (patch) | |
tree | 55394116b8e2a7c84899e389acda1e725c61a744 /source/blender/gpu/GPU_draw.h | |
parent | 2d7efed014539e5b7193f9a73ccfa61ea3ed0838 (diff) |
Finally committing support for compressed textures on the GPU (DDS+DXT). This patch started out as a patch by me, then cleaned up by Kupoman during his work on Cucumber.
One important thing to keep in mind when using this feature is that you'll need to flip your textures vertically (both the GIMP and Photoshop DDS tools I've seen have support for this on export). This is a quirk in using a texture format originally made for DirectX/DirectDraw, and flipping the compressed data is a real headache. Another quick fix for this issue is to change the Y value for the Size in the Mapping panel in the Texture properties to -1 (default is 1).
Diffstat (limited to 'source/blender/gpu/GPU_draw.h')
-rw-r--r-- | source/blender/gpu/GPU_draw.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/gpu/GPU_draw.h b/source/blender/gpu/GPU_draw.h index 438cfd6b741..59140b2be80 100644 --- a/source/blender/gpu/GPU_draw.h +++ b/source/blender/gpu/GPU_draw.h @@ -122,6 +122,9 @@ void GPU_paint_update_image(struct Image *ima, int x, int y, int w, int h, int m void GPU_update_images_framechange(void); int GPU_update_image_time(struct Image *ima, double time); int GPU_verify_image(struct Image *ima, struct ImageUser *iuser, int tftile, int compare, int mipmap); +void GPU_create_gl_tex(unsigned int *bind, unsigned int *pix, float *frect, int rectw, int recth, int mipmap, int use_hight_bit_depth, struct Image *ima); +void GPU_create_gl_tex_compressed(unsigned int *bind, unsigned int *pix, int x, int y, int mipmap, struct Image *ima, struct ImBuf *ibuf); +int GPU_upload_dxt_texture(struct ImBuf *ibuf); void GPU_free_image(struct Image *ima); void GPU_free_images(void); void GPU_free_images_anim(void); |