Add notes about calling LoadTexture before calling InitWindow

master
Peter0x44 3 yıl önce
ebeveyn
işleme
6e20101ae0
1 değiştirilmiş dosya ile 6 ekleme ve 0 silme
  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.

Yükleniyor…
İptal
Kaydet