Add notes about calling LoadTexture before calling InitWindow

master
Peter0x44 3 年前
父节点
当前提交
6e20101ae0
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. +6
    -0
      Frequently-asked-Questions--Common-Questions.md

+ 6
- 0
Frequently-asked-Questions--Common-Questions.md

@ -95,6 +95,12 @@ DrawText(text, textStartX, textStartY, fontSize, LIGHTGRAY);
``` ```
`MeasureText` only measures the width of text, but takes fewer arguments. It is often acceptable to just use the font size as the total text height, but for some fonts, this may not be accurate. `MeasureTextEx` will measure both height and width of text, but does take more arguments. For this reason it is used less often. `MeasureText` only measures the width of text, but takes fewer arguments. It is often acceptable to just use the font size as the total text height, but for some fonts, this may not be accurate. `MeasureTextEx` will measure both height and width of text, but does take more arguments. For this reason it is used less often.
# Why does calling `LoadTexture` crash my program?
You are likely calling `LoadTexture` before calling `InitWindow`.
Loading textures requires a valid OpenGL context, that `InitWindow` sets up.
Therefore, textures cannot be loaded before calling it.
# How can I draw a texture flipped? # How can I draw a texture flipped?
Drawing a texture flipped requires the use of either `DrawTextureRec`, or `DrawTexturePro` functions. Drawing a texture flipped requires the use of either `DrawTextureRec`, or `DrawTexturePro` functions.

正在加载...
取消
保存