Skip to content

Commit 6828437

Browse files
committed
WIP - Fonts: do not mark whole ImTextureData struct as IMGUI_API to fix warning when used in ImVector<> (8559)
1 parent b37a8c1 commit 6828437

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

imgui.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -3513,7 +3513,7 @@ struct ImTextureRect
35133513
// Why does we store two identifiers: TexID and BackendUserData?
35143514
// - ImTextureID TexID = lower-level identifier stored in ImDrawCmd. ImDrawCmd can refer to textures not created by the backend, and for which there's no ImTextureData.
35153515
// - void* BackendUserData = higher-level opaque storage for backend own book-keeping. Some backends may have enough with TexID and not need both.
3516-
struct IMGUI_API ImTextureData
3516+
struct ImTextureData
35173517
{
35183518
ImTextureStatus Status; // ImTextureStatus_OK/_WantCreate/_WantUpdates/_WantDestroy
35193519
ImTextureFormat Format; // ImTextureFormat_RGBA32 (default) or ImTextureFormat_Alpha8
@@ -3535,8 +3535,8 @@ struct IMGUI_API ImTextureData
35353535
// Functions
35363536
ImTextureData() { memset(this, 0, sizeof(*this)); }
35373537
~ImTextureData() { DestroyPixels(); }
3538-
void Create(ImTextureFormat format, int w, int h);
3539-
void DestroyPixels();
3538+
IMGUI_API void Create(ImTextureFormat format, int w, int h);
3539+
IMGUI_API void DestroyPixels();
35403540
unsigned char* GetPixels() { IM_ASSERT(Pixels != NULL); return Pixels; }
35413541
unsigned char* GetPixelsAt(int x, int y) { IM_ASSERT(Pixels != NULL); return Pixels + (x + y * Width) * BytesPerPixel; }
35423542
int GetSizeInBytes() const { return Width * Height * BytesPerPixel; }

0 commit comments

Comments
 (0)