我的绘制方法不起作用
My Draw Method Is Not Working
虽然加载 "Image" 没有问题,但我的绘制函数没有绘制任何东西。这可能是什么原因?
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);
}
Rect6.y 永远不会得到分配给它的值。这可能是问题的原因。
虽然加载 "Image" 没有问题,但我的绘制函数没有绘制任何东西。这可能是什么原因?
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);
}
Rect6.y 永远不会得到分配给它的值。这可能是问题的原因。