Re: Uneven V-sync

"rtrussell" <[email protected]> Wed, 18 Jan 2017 17:05:54 +0000
Newsgroups gmane.comp.lib.sdl
Message-ID <[email protected]>
Edition Chamäleon wrote:
> I get  iterations from 6 ms to 47 ms. ( see list ).  I think v-sync isn't working here. Am I wrong ?

Your measurements will be affected by the time taken in __android_log_print, and I wouldn't be surprised if it is variable.  To be certain your conclusion is valid I would prefer to see you measure the actual frame period:


Code:
	time2 = SDL_GetTicks();
	while (1)
	{
		SDL_RenderClear( m_renderer );
		SDL_RenderCopy( m_renderer, rawTexture, &SDL_srcRect, &SDL_destRect );
		SDL_RenderPresent( m_renderer );

		time1 = time2;
		time2 = SDL_GetTicks();
		time3 = time2 - time1;

		ostringstream sstream;
		sstream << time3 << " ms";
		text = sstream.str();
		__android_log_print ( ANDROID_LOG_VERBOSE, "Mw", text.c_str() );
	}


Richard.

_______________________________________________
SDL mailing list
[email protected]
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org