Add debug rendering, fix misaligned pos render bug
Rendering using a non-default quad specifies normalised coordinates relative to the frame buffer size. Hence each render of these frames should origin from (0,0) any other value is invalid.
This commit is contained in:
+2
-2
@@ -9,7 +9,7 @@
|
||||
#include "Dengine/Platform.h"
|
||||
#include "Dengine/AssetManager.h"
|
||||
|
||||
#define WT_RENDER_FONT_FILE
|
||||
//#define WT_RENDER_FONT_FILE
|
||||
#ifdef WT_RENDER_FONT_FILE
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#include <STB/stb_image_write.h>
|
||||
@@ -136,7 +136,7 @@ const i32 asset_loadTTFont(AssetManager *assetManager, const char *filePath)
|
||||
CAST(GlyphBitmap *) calloc(numGlyphs, sizeof(GlyphBitmap));
|
||||
v2i largestGlyphDimension = V2i(0, 0);
|
||||
|
||||
const f32 targetFontHeight = 32.0f;
|
||||
const f32 targetFontHeight = 20.0f;
|
||||
f32 scaleY = stbtt_ScaleForPixelHeight(&fontInfo, targetFontHeight);
|
||||
|
||||
i32 ascent, descent, lineGap;
|
||||
|
||||
Reference in New Issue
Block a user