The SDL forums have moved to discourse.libsdl.org.
This is just a read-only archive of the previous forums, to keep old links working.


SDL Forum Index
SDL
Simple Directmedia Layer Forums
SDL_RenderPresent draws current gRenderer then previous run
gatris


Joined: 23 Jun 2015
Posts: 3
OSX 10.10.04, Xcode 6.4 (video Intel 4600)

run in some problems, if I execute:

SDL_RenderPresent(gRenderer);
SDL_RenderPresent(gRenderer);

first screen shows previous run (canceled - exited), next shows current, and so on
gatris


Joined: 23 Jun 2015
Posts: 3
I just get this:

http://lazyfoo.net/tutorials/SDL/27_collision_detection/index.php

edited wall size:

wall.w = 40 + rand() % 40;
wall.h = 300 + rand() % 40;

and add some rows in main()

SDL_RenderPresent( gRenderer );
SDL_RenderPresent( gRenderer );
SDL_RenderPresent( gRenderer );
SDL_RenderPresent( gRenderer );
SDL_RenderPresent( gRenderer );
SDL_RenderPresent( gRenderer );
SDL_RenderPresent( gRenderer );
SDL_RenderPresent( gRenderer );

set Debug line at first
SDL_RenderPresent( gRenderer );

and get iteration between current and previous application instance

did I miss something?

thanks in advance,
GK
gatris


Joined: 23 Jun 2015
Posts: 3
I done development of my project under Windows 7, 64-bit, Visual Studio 2010 and all works fine, and

Code:
SDL_RenderPresent( gRenderer );


always draws correct picture, not in this order:

- correct picture,
- previous run last picture,
- correct picture,
- previous run last picture,
- ...

I copied c++ file from Visual Studio 2010 to XCode and just change

from:

Code:
#include <SDL.h>
#include <SDL_image.h>


to

Code:
#include <SDL2/SDL.h>
#include <SDL2_image/SDL_image.h>


is OSX SDL2 is somewhat other than in Windows 7?