Textures: ImTextureData::GetPixels() returns void* for clarity.
This commit is contained in:
@@ -3440,8 +3440,8 @@ struct ImTextureData
|
||||
~ImTextureData() { DestroyPixels(); }
|
||||
IMGUI_API void Create(ImTextureFormat format, int w, int h);
|
||||
IMGUI_API void DestroyPixels();
|
||||
unsigned char* GetPixels() { IM_ASSERT(Pixels != NULL); return Pixels; }
|
||||
unsigned char* GetPixelsAt(int x, int y) { IM_ASSERT(Pixels != NULL); return Pixels + (x + y * Width) * BytesPerPixel; }
|
||||
void* GetPixels() { IM_ASSERT(Pixels != NULL); return Pixels; }
|
||||
void* GetPixelsAt(int x, int y) { IM_ASSERT(Pixels != NULL); return Pixels + (x + y * Width) * BytesPerPixel; }
|
||||
int GetSizeInBytes() const { return Width * Height * BytesPerPixel; }
|
||||
int GetPitch() const { return Width * BytesPerPixel; }
|
||||
ImTextureRef GetTexRef() { ImTextureRef tex_ref; tex_ref._TexData = this; tex_ref._TexID = ImTextureID_Invalid; return tex_ref; }
|
||||
|
||||
Reference in New Issue
Block a user