class A
{
int Width();
int Height();
private:
SDL_Surface *screen;
};
class A
{
const Dimension &ScreenSize();
private:
SDL_Surface *screen;
Dimension screensize;
};
reading width and height from SDL_Surface* or storing in a seperate buffer?
I regularly need to query the screen size from within the application, and I know this may sound stupid but I was wondering whether reading the w,h data members of the screen struct is sufficient.
Is there any reason I should store the dimensions in a separate place rather than repeatedly reading the screen.
I ask this because I remember some issues with reading certain SDL structure's members.
Thanks for your time.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement