Changeset View
Changeset View
Standalone View
Standalone View
source/blender/gpu/GPU_texture.h
| Show All 35 Lines | |||||
| struct ImageUser; | struct ImageUser; | ||||
| struct MovieClip; | struct MovieClip; | ||||
| struct MovieClipUser; | struct MovieClipUser; | ||||
| struct PreviewImage; | struct PreviewImage; | ||||
| struct GPUFrameBuffer; | struct GPUFrameBuffer; | ||||
| typedef struct GPUTexture GPUTexture; | typedef struct GPUTexture GPUTexture; | ||||
| /* GPU Samplers state | |||||
| * - Specify the sampler state to bind a texture with. | |||||
| * - Internally used by textures. | |||||
| * - All states are created at startup to avoid runtime costs. | |||||
| */ | |||||
| typedef enum eGPUSamplerState { | |||||
| GPU_SAMPLER_FILTER = (1 << 0), | |||||
| GPU_SAMPLER_MIPMAP = (1 << 1), | |||||
| GPU_SAMPLER_REPEAT_S = (1 << 2), | |||||
| GPU_SAMPLER_REPEAT_T = (1 << 3), | |||||
| GPU_SAMPLER_REPEAT_R = (1 << 4), | |||||
| GPU_SAMPLER_CLAMP_BORDER = (1 << 5), /* Clamp to border color instead of border texel. */ | |||||
| GPU_SAMPLER_COMPARE = (1 << 6), | |||||
| GPU_SAMPLER_ANISO = (1 << 7), | |||||
| /* Don't use that. */ | |||||
| GPU_SAMPLER_MAX = (1 << 8), | |||||
| } eGPUSamplerState; | |||||
| #define GPU_SAMPLER_DEFAULT GPU_SAMPLER_FILTER | |||||
| #define GPU_SAMPLER_REPEAT (GPU_SAMPLER_REPEAT_S | GPU_SAMPLER_REPEAT_T | GPU_SAMPLER_REPEAT_R) | |||||
| void GPU_samplers_init(void); | |||||
| void GPU_samplers_free(void); | |||||
| /* GPU Texture | /* GPU Texture | ||||
| * - always returns unsigned char RGBA textures | * - always returns unsigned char RGBA textures | ||||
| * - if texture with non square dimensions is created, depending on the | * - if texture with non square dimensions is created, depending on the | ||||
| * graphics card capabilities the texture may actually be stored in a | * graphics card capabilities the texture may actually be stored in a | ||||
| * larger texture with power of two dimensions. | * larger texture with power of two dimensions. | ||||
| * - can use reference counting: | * - can use reference counting: | ||||
| * - reference counter after GPU_texture_create is 1 | * - reference counter after GPU_texture_create is 1 | ||||
| * - GPU_texture_ref increases by one | * - GPU_texture_ref increases by one | ||||
| ▲ Show 20 Lines • Show All 228 Lines • Show Last 20 Lines | |||||