DRW: Add 3D texture support.
This commit is contained in:
parent
660eea8cf4
commit
1c0c63ce5b
|
@ -190,6 +190,8 @@ struct GPUTexture *DRW_texture_create_2D(
|
|||
int w, int h, DRWTextureFormat format, DRWTextureFlag flags, const float *fpixels);
|
||||
struct GPUTexture *DRW_texture_create_2D_array(
|
||||
int w, int h, int d, DRWTextureFormat format, DRWTextureFlag flags, const float *fpixels);
|
||||
struct GPUTexture *DRW_texture_create_3D(
|
||||
int w, int h, int d, DRWTextureFormat format, DRWTextureFlag flags, const float *fpixels);
|
||||
struct GPUTexture *DRW_texture_create_cube(
|
||||
int w, DRWTextureFormat format, DRWTextureFlag flags, const float *fpixels);
|
||||
void DRW_texture_generate_mipmaps(struct GPUTexture *tex);
|
||||
|
|
|
@ -500,6 +500,20 @@ GPUTexture *DRW_texture_create_2D_array(
|
|||
return tex;
|
||||
}
|
||||
|
||||
GPUTexture *DRW_texture_create_3D(
|
||||
int w, int h, int d, DRWTextureFormat format, DRWTextureFlag flags, const float *fpixels)
|
||||
{
|
||||
GPUTexture *tex;
|
||||
GPUTextureFormat data_type;
|
||||
int channels;
|
||||
|
||||
drw_texture_get_format(format, &data_type, &channels);
|
||||
tex = GPU_texture_create_3D_custom(w, h, d, channels, data_type, fpixels, NULL);
|
||||
drw_texture_set_parameters(tex, flags);
|
||||
|
||||
return tex;
|
||||
}
|
||||
|
||||
GPUTexture *DRW_texture_create_cube(int w, DRWTextureFormat format, DRWTextureFlag flags, const float *fpixels)
|
||||
{
|
||||
GPUTexture *tex;
|
||||
|
|
Loading…
Reference in New Issue