|
ObjectivelyGPU
Object oriented graphics framework for SDL3 and C
|
#include <assert.h>#include <math.h>#include <string.h>#include "CommandBuffer.h"#include "CopyPass.h"#include "Fence.h"#include "RenderDevice.h"#include "Texture.h"Macros | |
| #define | _Class _Texture |
Functions | |
| static void | dealloc (Object *self) |
| static void | uploadPixels (Texture *self, const void *pixels, Uint32 size, Uint32 pixelsPerRow) |
Uploads size bytes of pixel data into mip level 0 of this texture. | |
| static Texture * | initWithDevice (Texture *self, RenderDevice *device, const SDL_GPUTextureCreateInfo *info, const void *pixels) |
| static Texture * | initWithSurface (Texture *self, RenderDevice *device, SDL_Surface *surface, SDL_GPUTextureUsageFlags usage, bool generateMipmaps) |
| static void | setName (Texture *self, const char *name) |
| static void * | downloadPixels (const Texture *self) |
| static void | initialize (Class *clazz) |
| Class * | _Texture (void) |
| #define _Class _Texture |
| Class * _Texture | ( | void | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Uploads size bytes of pixel data into mip level 0 of this texture.
The source data is laid out at pixelsPerRow pixels (texels) per row, so callers can pass strided data (e.g. an SDL_Surface with row padding) without first tightening it. The texture's dimensions and layer count come from its metadata, so this must be called after initWithDevice has populated them.