|
|
@ -244,11 +244,11 @@ namespace ImGuiNET |
|
|
|
/// <summary> |
|
|
|
/// <summary> |
|
|
|
/// Recreates the device texture used to render text. |
|
|
|
/// Recreates the device texture used to render text. |
|
|
|
/// </summary> |
|
|
|
/// </summary> |
|
|
|
public unsafe void RecreateFontDeviceTexture(GraphicsDevice gd) |
|
|
|
public void RecreateFontDeviceTexture(GraphicsDevice gd) |
|
|
|
{ |
|
|
|
{ |
|
|
|
ImGuiIOPtr io = ImGui.GetIO(); |
|
|
|
ImGuiIOPtr io = ImGui.GetIO(); |
|
|
|
// Build |
|
|
|
// Build |
|
|
|
byte* pixels; |
|
|
|
IntPtr pixels; |
|
|
|
int width, height, bytesPerPixel; |
|
|
|
int width, height, bytesPerPixel; |
|
|
|
io.Fonts.GetTexDataAsRGBA32(out pixels, out width, out height, out bytesPerPixel); |
|
|
|
io.Fonts.GetTexDataAsRGBA32(out pixels, out width, out height, out bytesPerPixel); |
|
|
|
// Store our identifier |
|
|
|
// Store our identifier |
|
|
@ -264,7 +264,7 @@ namespace ImGuiNET |
|
|
|
_fontTexture.Name = "ImGui.NET Font Texture"; |
|
|
|
_fontTexture.Name = "ImGui.NET Font Texture"; |
|
|
|
gd.UpdateTexture( |
|
|
|
gd.UpdateTexture( |
|
|
|
_fontTexture, |
|
|
|
_fontTexture, |
|
|
|
(IntPtr)pixels, |
|
|
|
pixels, |
|
|
|
(uint)(bytesPerPixel * width * height), |
|
|
|
(uint)(bytesPerPixel * width * height), |
|
|
|
0, |
|
|
|
0, |
|
|
|
0, |
|
|
|
0, |
|
|
|