Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/include/BIF_glutil.h
| Show First 20 Lines • Show All 43 Lines • ▼ Show 20 Lines | |||||
| } IMMDrawPixelsTexState; | } IMMDrawPixelsTexState; | ||||
| /* To be used before calling immDrawPixelsTex | /* To be used before calling immDrawPixelsTex | ||||
| * Default shader is GPU_SHADER_2D_IMAGE_COLOR | * Default shader is GPU_SHADER_2D_IMAGE_COLOR | ||||
| * Returns a shader to be able to set uniforms */ | * Returns a shader to be able to set uniforms */ | ||||
| IMMDrawPixelsTexState immDrawPixelsTexSetup(int builtin); | IMMDrawPixelsTexState immDrawPixelsTexSetup(int builtin); | ||||
| /** | /** | ||||
| * immDrawPixelsTex - Functions like a limited glDrawPixels, but actually draws the | * #immDrawPixelsTex - Functions like a limited #glDrawPixels, but actually draws the | ||||
| * image using textures, which can be tremendously faster on low-end | * image using textures, which can be tremendously faster on low-end | ||||
| * cards, and also avoids problems with the raster position being | * cards, and also avoids problems with the raster position being | ||||
| * clipped when offscreen. Pixel unpacking parameters and | * clipped when off-screen. Pixel unpacking parameters and | ||||
| * the glPixelZoom values are _not_ respected. | * the #glPixelZoom values are _not_ respected. | ||||
| * | * | ||||
| * \attention Use immDrawPixelsTexSetup before calling this function. | * \attention Use #immDrawPixelsTexSetup before calling this function. | ||||
| * | * | ||||
| * \attention This routine makes many assumptions: the rect data | * \attention This routine makes many assumptions: the `rect` data | ||||
| * is expected to be in RGBA byte or float format, and the | * is expected to be in RGBA byte or float format, and the | ||||
| * modelview and projection matrices are assumed to define a | * model-view and projection matrices are assumed to define a | ||||
| * 1-to-1 mapping to screen space. | * 1-to-1 mapping to screen space. | ||||
| */ | */ | ||||
| void immDrawPixelsTex(IMMDrawPixelsTexState *state, | void immDrawPixelsTex(IMMDrawPixelsTexState *state, | ||||
| float x, | float x, | ||||
| float y, | float y, | ||||
| int img_w, | int img_w, | ||||
| int img_h, | int img_h, | ||||
| eGPUTextureFormat gpu_format, | eGPUTextureFormat gpu_format, | ||||
| ▲ Show 20 Lines • Show All 106 Lines • Show Last 20 Lines | |||||