- Viewing Profile: Posts: leagal4ever
14 years ago on June 15th Gamedev.net was first launched! We want to thank all of you for being part of our community and hope the best years are ahead of us. Happy birthday Gamedev.net!
Community Stats
- Group Members
- Active Posts 11
- Profile Views 898
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
373
Good
User Tools
Contacts
leagal4ever hasn't added any contacts yet.
Latest Visitors
Posts I've Made
In Topic: sdl distorted SDL_FillRect and images
26 November 2012 - 02:38 PM
No, Init(); is in constructor it run only once, Render(); , Update(); and Fps(); run every frame
In Topic: sdl distorted SDL_FillRect and images
26 November 2012 - 02:00 PM
Yeah its tearning.
// init
SDL_Init(SDL_INIT_EVERYTHING);
screen = SDL_SetVideoMode(800, 600, 32, SDL_SWSURFACE | SDL_DOUBLEBUF);
// render
SDL_FillRect(screen, NULL, 0);
for(int i=0; i<box_vec.size(); i++)
{
SDL_FillRect(screen, &box_vec[i]->rect, box_vec[i]->color); // problem rect
}
SDL_Flip(screen);
// update
box_vec[i]->rect.x += box_vec[i]->xvel;
box_vec[i]->rect.y += box_vec[i]->yvel;
// init
SDL_Init(SDL_INIT_EVERYTHING);
screen = SDL_SetVideoMode(800, 600, 32, SDL_SWSURFACE | SDL_DOUBLEBUF);
// render
SDL_FillRect(screen, NULL, 0);
for(int i=0; i<box_vec.size(); i++)
{
SDL_FillRect(screen, &box_vec[i]->rect, box_vec[i]->color); // problem rect
}
SDL_Flip(screen);
// update
box_vec[i]->rect.x += box_vec[i]->xvel;
box_vec[i]->rect.y += box_vec[i]->yvel;
In Topic: c++, sdl - how to make installer? .exe
05 October 2012 - 05:15 PM
Oh souch silly error as told:
I had no idea proper foler is Release folder there were no images i just copy SDL files.
SDL_Surface* tmp;
tmp = IMG_Load©;
SDL_DisplayFormatAlpha(tmp);// problem
Problem is there was no image loaded.
if (tmp != NULL)
SDL_DisplayFormatAlpha(tmp);
Now i avoid problem just in case something is not loaded
Thans for all help
Just create the proper directory structure, add all relevant .dll and data files and pack it into zip archive.
I had no idea proper foler is Release folder there were no images i just copy SDL files.
SDL_Surface* tmp;
tmp = IMG_Load©;
SDL_DisplayFormatAlpha(tmp);// problem
Problem is there was no image loaded.
if (tmp != NULL)
SDL_DisplayFormatAlpha(tmp);
Now i avoid problem just in case something is not loaded
Thans for all help
In Topic: c++, sdl - how to make installer? .exe
05 October 2012 - 03:10 PM

I dont have any warnings have also minimize notices, when click on any Call Stack line only Dissembly lines are changed i dont see my code.

When run from Release folder i get window as normal with error message =(
I have made copy of project folder take most out and i have build it in Release so must be problem in my code.
- Home
- » Viewing Profile: Posts: leagal4ever

Find content