diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-04-30 17:02:24 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-04-30 17:39:26 +0300 |
commit | eb7188802daf5909351d8a3c01b68303b655c1bc (patch) | |
tree | 137c2c43be509c07efa96ba49c63b5632974cceb /source/blender/gpu/GPU_texture.h | |
parent | 41431eacfa1afc66533f5d27cc21dfa58024e26c (diff) |
DRW: Remove DRWTextureFormat in favor or GPUTextureFormat.
Because:
- Less redundancy.
- Better suffixes.
Also a few modification to GPU_texture_create_* to simplify the API:
- make the format explicit to the texture creation process.
- remove the component count as it's specified in the GPUTextureFormat.
Diffstat (limited to 'source/blender/gpu/GPU_texture.h')
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index a783a69ae6b..f6fe4fe28e5 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -145,26 +145,18 @@ typedef enum GPUTextureFormat { unsigned int GPU_texture_memory_usage_get(void); -GPUTexture *GPU_texture_create_1D(int w, const float *pixels, char err_out[256]); -GPUTexture *GPU_texture_create_1D_custom( - int w, int channels, GPUTextureFormat data_type, const float *pixels, char err_out[256]); -GPUTexture *GPU_texture_create_2D(int w, int h, const float *pixels, char err_out[256]); -GPUTexture *GPU_texture_create_2D_custom( - int w, int h, int channels, GPUTextureFormat data_type, const float *pixels, char err_out[256]); -GPUTexture *GPU_texture_create_2D_multisample(int w, int h, const float *pixels, int samples, char err_out[256]); -GPUTexture *GPU_texture_create_2D_custom_multisample( - int w, int h, int channels, GPUTextureFormat data_type, const float *pixels, int samples, char err_out[256]); -GPUTexture *GPU_texture_create_2D_array_custom( - int w, int h, int d, int channels, GPUTextureFormat data_type, const float *pixels, char err_out[256]); -GPUTexture *GPU_texture_create_3D(int w, int h, int d, const float *pixels, char err_out[256]); -GPUTexture *GPU_texture_create_3D_custom( - int w, int h, int d, int channels, GPUTextureFormat data_type, const float *pixels, char err_out[256]); -GPUTexture *GPU_texture_create_cube_custom( - int w, int channels, GPUTextureFormat data_type, const float *pixels, char err_out[256]); -GPUTexture *GPU_texture_create_depth(int w, int h, char err_out[256]); -GPUTexture *GPU_texture_create_depth_with_stencil(int w, int h, char err_out[256]); -GPUTexture *GPU_texture_create_depth_multisample(int w, int h, int samples, char err_out[256]); -GPUTexture *GPU_texture_create_depth_with_stencil_multisample(int w, int h, int samples, char err_out[256]); +GPUTexture *GPU_texture_create_1D( + int w, GPUTextureFormat data_type, const float *pixels, char err_out[256]); +GPUTexture *GPU_texture_create_2D( + int w, int h, GPUTextureFormat data_type, const float *pixels, char err_out[256]); +GPUTexture *GPU_texture_create_2D_multisample( + int w, int h, GPUTextureFormat data_type, const float *pixels, int samples, char err_out[256]); +GPUTexture *GPU_texture_create_2D_array( + int w, int h, int d, GPUTextureFormat data_type, const float *pixels, char err_out[256]); +GPUTexture *GPU_texture_create_3D( + int w, int h, int d, GPUTextureFormat data_type, const float *pixels, char err_out[256]); +GPUTexture *GPU_texture_create_cube( + int w, GPUTextureFormat data_type, const float *pixels, char err_out[256]); GPUTexture *GPU_texture_from_blender( struct Image *ima, struct ImageUser *iuser, int textarget, bool is_data, double time, int mipmap); |