Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/GPU_texture.h
| Show First 20 Lines • Show All 181 Lines • ▼ Show 20 Lines | |||||
| /** | /** | ||||
| * \note \a data is expected to be float. If the \a format is not compatible with float data or if | * \note \a data is expected to be float. If the \a format is not compatible with float data or if | ||||
| * the data is not in float format, use GPU_texture_update to upload the data with the right data | * the data is not in float format, use GPU_texture_update to upload the data with the right data | ||||
| * format. | * format. | ||||
| * \a mips is the number of mip level to allocate. It must be >= 1. | * \a mips is the number of mip level to allocate. It must be >= 1. | ||||
| */ | */ | ||||
| GPUTexture *GPU_texture_create_1d( | GPUTexture *GPU_texture_create_1d( | ||||
| const char *name, int w, int mips, eGPUTextureFormat format, const float *data); | const char *name, int w, int mip_len, eGPUTextureFormat format, const float *data); | ||||
| GPUTexture *GPU_texture_create_1d_array( | GPUTexture *GPU_texture_create_1d_array( | ||||
| const char *name, int w, int h, int mips, eGPUTextureFormat format, const float *data); | const char *name, int w, int h, int mip_len, eGPUTextureFormat format, const float *data); | ||||
| GPUTexture *GPU_texture_create_2d( | GPUTexture *GPU_texture_create_2d( | ||||
| const char *name, int w, int h, int mips, eGPUTextureFormat format, const float *data); | const char *name, int w, int h, int mip_len, eGPUTextureFormat format, const float *data); | ||||
| GPUTexture *GPU_texture_create_2d_array( | GPUTexture *GPU_texture_create_2d_array( | ||||
| const char *name, int w, int h, int d, int mips, eGPUTextureFormat format, const float *data); | const char *name, int w, int h, int d, int mip_len, eGPUTextureFormat format, const float *data); | ||||
| GPUTexture *GPU_texture_create_3d(const char *name, | GPUTexture *GPU_texture_create_3d(const char *name, | ||||
| int w, | int w, | ||||
| int h, | int h, | ||||
| int d, | int d, | ||||
| int mips, | int mip_len, | ||||
| eGPUTextureFormat texture_format, | eGPUTextureFormat texture_format, | ||||
| eGPUDataFormat data_format, | eGPUDataFormat data_format, | ||||
| const void *data); | const void *data); | ||||
| GPUTexture *GPU_texture_create_cube( | GPUTexture *GPU_texture_create_cube( | ||||
| const char *name, int w, int mips, eGPUTextureFormat format, const float *data); | const char *name, int w, int mip_len, eGPUTextureFormat format, const float *data); | ||||
| GPUTexture *GPU_texture_create_cube_array( | GPUTexture *GPU_texture_create_cube_array( | ||||
| const char *name, int w, int d, int mips, eGPUTextureFormat format, const float *data); | const char *name, int w, int d, int mip_len, eGPUTextureFormat format, const float *data); | ||||
| /* Special textures. */ | /* Special textures. */ | ||||
| GPUTexture *GPU_texture_create_from_vertbuf(const char *name, struct GPUVertBuf *vert); | GPUTexture *GPU_texture_create_from_vertbuf(const char *name, struct GPUVertBuf *vert); | ||||
| /** | /** | ||||
| * \a data should hold all the data for all mipmaps. | * \a data should hold all the data for all mipmaps. | ||||
| */ | */ | ||||
| GPUTexture *GPU_texture_create_compressed_2d( | GPUTexture *GPU_texture_create_compressed_2d( | ||||
| const char *name, int w, int h, int miplen, eGPUTextureFormat format, const void *data); | const char *name, int w, int h, int miplen, eGPUTextureFormat format, const void *data); | ||||
| ▲ Show 20 Lines • Show All 66 Lines • Show Last 20 Lines | |||||