0
雖然加載「圖像」沒有問題,但我的繪圖函數並沒有繪製任何東西。這可能是什麼原因?我的繪製方法不起作用
void Draw_InGameMenu()
{
Rect6.w = 100;
Rect6.h = 100;
Rect6.x = 100;
Rect6.h = 100;
MenuCaption.x = Rect6.x;
MenuCaption.y = Rect6.y;
SDL_RenderCopy(renderer, Image, NULL, &Rect6);
SDL_RenderCopy(renderer, MenuCaptionTexture, NULL, &MenuCaption);
}
謝謝。我現在一直在盯着代碼半個小時。 :) –
哈哈我有'SDL_Rect'完全相同的錯字導致的錯誤。獲得的經驗:如果有更多視覺上有區別的可用(「寬度」,「高度」),請勿使用單字母縮寫作爲標識符('w','h')。 – emlai