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.
# 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?
Drawing a texture flipped requires the use of either `DrawTextureRec`, or `DrawTexturePro` functions.

読み込み中…
キャンセル
保存