OldSchool Library
Advanced

Macros

#define oslImageIsCopy(img)   (img->flags & OSL_IMAGE_COPY)
 
#define oslImageIsSwizzled(img)   (img->flags & OSL_IMAGE_SWIZZLED)
 
#define oslImageGetAutoStrip(img)   (img->flags & OSL_IMAGE_AUTOSTRIP)
 

Functions

static void oslImageIsCopySet (OSL_IMAGE *img, bool enabled)
 
static void oslImageIsSwizzledSet (OSL_IMAGE *img, bool enabled)
 
static void oslImageSetAutoStrip (OSL_IMAGE *img, bool enabled)
 

Detailed Description

Advanced routines for working with images.

Macro Definition Documentation

◆ oslImageIsCopy

#define oslImageIsCopy (   img)    (img->flags & OSL_IMAGE_COPY)

Returns a nonzero value if the image is a copy of another image, or 0 if it is an original. A copy is an image that was created as a clone of another image, rather than being directly created.

◆ oslImageIsSwizzled

#define oslImageIsSwizzled (   img)    (img->flags & OSL_IMAGE_SWIZZLED)

Returns a nonzero value if the image is swizzled, or 0 if it is not. Swizzling refers to a method of reorganizing image data to improve memory access patterns or GPU performance.

◆ oslImageGetAutoStrip

#define oslImageGetAutoStrip (   img)    (img->flags & OSL_IMAGE_AUTOSTRIP)

Returns a nonzero value if automatic striping is enabled for the image, or 0 if it is not. Automatic striping can be used to optimize the handling of large images by breaking them into smaller, more manageable strips.

Function Documentation

◆ oslImageIsCopySet()

static void oslImageIsCopySet ( OSL_IMAGE img,
bool  enabled 
)
inlinestatic

Sets or clears the copy flag for an image. This function is for internal use only and controls whether the image is marked as a copy of another image.

Parameters
imgPointer to the OSL_IMAGE structure whose copy flag is to be set or cleared.
enabledtrue to set the image as a copy, false to clear the copy flag.

◆ oslImageIsSwizzledSet()

static void oslImageIsSwizzledSet ( OSL_IMAGE img,
bool  enabled 
)
inlinestatic

Sets or clears the swizzled flag for an image. This function is for internal use only and determines whether the image is marked as swizzled.

Parameters
imgPointer to the OSL_IMAGE structure whose swizzled flag is to be set or cleared.
enabledtrue to set the image as swizzled, false to clear the swizzled flag.

◆ oslImageSetAutoStrip()

static void oslImageSetAutoStrip ( OSL_IMAGE img,
bool  enabled 
)
inlinestatic

Sets or clears the automatic striping flag for an image. This function is for internal use only and manages whether the image should be automatically divided into stripes for faster blitting.

Parameters
imgPointer to the OSL_IMAGE structure whose automatic striping flag is to be set or cleared.
enabledtrue to enable automatic striping, false to disable it.