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.

불러오는 중...
취소
저장