Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - joeduf

Pages: [1]
1
I found the simple solution. Visual Studio Compiler Optimizations getting in the way!

For my Release build I simply set the following options:

C/C++ -> Optimization -> Optimization = Disabled (/Od)

C/C++ -> Optimization -> Enable Intrinsic Functions = No

NOTE: These are the default values for a DEBUG build but not for a RELEASE build so I just changed the two settings and all my problems went away!

...Just in case this can help someone else!

The release mode is probably"too fast", thus you only get very small changes between frames, which leads to subpixel position, which again leads to OpenGL having to interpolate the actual position on a per pixel basis, which then leads to that the interpolation might end up rounding down for one frame and rounding up in the next frame.

What you want to do is still use a float for positioning, but before rendering round the position up or down to interger pixel positions.

2
Thanks for the reply! It's not sub-pixel positioning. Using floats and rounding already.  It's almost as if the double buffering is really "quad" (or maybe octo!?!) buffering and every 4th (or 8th or so) frame goes back to the "last" position / last render... a la smooth smooth smooth hiccup smooth smooth smooth etc

I'd built my own debug and release SFML libs with VStudio2017 so maybe the problem lies within that process itself or possibly within my release project settings.

I'll dig in more as soon as my day job allows! Love SFML - Fantastic work guys! Thanks again!

The release mode is probably"too fast", thus you only get very small changes between frames, which leads to subpixel position, which again leads to OpenGL having to interpolate the actual position on a per pixel basis, which then leads to that the interpolation might end up rounding down for one frame and rounding up in the next frame.

What you want to do is still use a float for positioning, but before rendering round the position up or down to interger pixel positions.

3
Hello all,

I'm relatively new to SFML. I absolutely love the library so far. I have a question that has me a bit puzzled at the moment. I believe it is related to the Graphics subsystem but I'm not 100% sure.

I have a small Tetris-clone that, for all time / animation related entities, uses a clock object, sf::Time, as the asSeconds() method to determine how "far" to correctly move / increment certain game pieces a la movement timers, starfield background, etc.

Since the time calculations are the same for DEBUG and RELEASE versions why does the DEBUG version run smoothly, without "hiccups" for lack of better description compare to the RELEASE version which you can clearly see starfield "stuttering" etc.

I thought the release version should run smoother / faster, yet it appears to be far worse.

I don't understand. Looking to deploy the release version to different machines but hesitant because of the performance glitches. Any ideas?

I'm not a fantastic programmer. Is there any way I can profile functions using Visual Studio 2017 Prof to "learn / discover" what's going on?!?

Thanks for any help you can provide.

Pages: [1]