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 - BaneTrapper

Pages: 1 ... 8 9 [10] 11 12 ... 15
136
With VSync it is still there, my GPU has VSync set to "Controled by application"
Withot VSync its still there unchanged, but allot of screen tearing occurs.

On my GPU i set all setting off or to lowest possible and the issue was still there.
I also tryed setting GPU to application control and all to maximum the issue is still there.

I will post minimal code soon.

EDIT::
It is getting so complicated about code, i am unable to reproduce the issue with sfml shapes.
I have complex way of holding/rendering.
Still working on it.

137
The effect occurs on anything being drawn.
Drawn a single rectangleShape on a black background and i got the same behavior.
I also
Code: [Select]
sf::ContextSettings constSetting = sf::ContextSettings();
constSetting.antialiasingLevel = 0;
constSetting.depthBits = 32;
constSetting.majorVersion = 0;
constSetting.minorVersion = 0;
constSetting.stencilBits = 0;
renWin.create(vidMod, string, style, constSetting);
Same issue.

138
Hello, unsure if this is correct place to post this because i am unsure is this hardware or sfml related.
So to explain my issue the best i will first describe when it occurred.

I have a screen filled with map(as walkable terrain, grass), on this map there are sprites like barrel, houses and other stuff related.

The issue starts when i move camera, everything gets motion blur or like 60-75% transparency and is drawn again where it used to be before this loop, tried to get screenshot so many times but i failed every single time.

I do not understand what is the issue here, its like the old buffer got drawn again but with 60-75% transparency this time.
I do only have one display() call to render window and i am hoping you got some idea what i can do to turn it off.

What IMO i need to modify is GL states, turning off AntiAliasing and other shader effects, but i am no expect and i may be mistaken massively.

139
Graphics / Re: Smooth movement.
« on: October 03, 2013, 01:32:13 pm »
I do not notice the issue, somehow turning Vsync on makes it look even smoother.

140
Graphics / Re: Smooth movement.
« on: October 02, 2013, 10:48:18 pm »
Unfortunately doesn't work. ;(
I also have the same code on SDL and there it uses your solution since SDL_Rect positions are ints, but it shows the same problem.
Thank you anyway ^^
Im starting to think that my eyes see more frames that it should ;)
Pass me exe file, i need/want to see that.

I used your code, just made the adjustments i suggested and it was fine, perfect movement.

141
Graphics / Re: Size max of an sf::Image
« on: October 02, 2013, 02:53:56 pm »
(like 2000000px * 2000000px).
Loading texture that big...
Stream it during runtime, it will take more process but its the only way for that size.
If streaming is out of grasp, split map its many little peaces and load/release as needed.

142
Graphics / Re: Can't get a smooth motion (First Time)
« on: October 02, 2013, 02:48:24 pm »
The choppy movement can be eliminated simply by passing int for position of sprite,rectangle...
Make two floats
Code: [Select]
float posX, posY;
Instead of updating the sprite directly, update posX, and posY.
Before drawing sprite update its position from posX, posY as following.
Code: [Select]
sprite.setPosition(static_cast<int>(posX), static_cast<int>(posY));

143
Graphics / Re: Smooth movement.
« on: October 02, 2013, 01:36:13 pm »
The issue is obviously with float type for position & how is drawing done.

Do following.
Add two floats.
Code: [Select]
float posX, posY;
Then for movement update posX,posY with coordinates.
Code: [Select]
posX += (move * dt);
posY += 0;
Before drawing, update sprite position from the posX, posY
Code: [Select]
sprite.setPosition(static_cast<int>(posX), static_cast<int>(posY);

Tada! smooth movement

144
Graphics / Re: Smooth movement.
« on: October 01, 2013, 12:53:14 pm »
Floats are inaccurate when so low.
Try following:
auto move = 100.f / 1000;
dt = clock.restart().asMiliseconds();

145
General / Re: Showing animated picture, how would i achieve that in sfml2.1
« on: September 26, 2013, 01:33:38 pm »
What i am trying is to show animated scene in .gif format.
You can't load animated file formats with SFML and maintain all the frames.

What is a way to achieve animation in sfml?
You use a sprite of which you change the texture rect over time. My Thor library also provides predefined functionality for animations.
Thank you on sharing that, i will see what i can pull out.

146
General / Showing animated picture, how would i achieve that in sfml2.1
« on: September 25, 2013, 09:32:41 pm »
Hello.
What i am trying is to show animated scene in .gif format.
What is a way to achieve animation in sfml?

In simpler saying: What is a way to display animated picture, gif or similar.

147
Graphics / Re: How to make VertexArray with RenderState semi transparent.
« on: September 24, 2013, 07:32:03 pm »
1280x1280 pixels is too high for very old graphics cards, but I think it's ok for relatively old graphics cards.
Oh good point.
I have not thought about that...

148
Graphics / Re: How to make VertexArray with RenderState semi transparent.
« on: September 24, 2013, 02:41:19 pm »
But does this 300x225 minimap area shows the whole map, or does it scroll? What I'm interested in is the total size of the minimap in pixels, not what you show of it. To know if you can pre-render it to a sf::RenderTexture safely.
Currently its drawing whole map witch is Huge 10k size width and height.
But i will eventually split the map intro small sections to improve performance so your suggestion would be more efficient and one i will use.

Splited map size width and height would be around 640pixels by 640 pixels. 32*32*4 in vertexArray size

Therefore my answer would be the size is 1280x1280 that i would draw to render texture

149
Graphics / Re: How to make VertexArray with RenderState semi transparent.
« on: September 24, 2013, 01:44:25 pm »
Quote
The map size currently is 1000*1000*4, i do not know what scale "big" is.
What is the maximum size of your rendered minimap, in pixels?
WINDOW_WIDTH = 800, WINDOW_HEIGHT = 600
sf::View viewMinimap is
Code: [Select]
viewMinimap.setViewport(sf::FloatRect(0.74f, 0.01f, 0.25f, 0.25f));
200x150 for minimap render in default but is resizable.
To draw minimap i use same code as i use for Map, i just change the view.

Size goes from +50% - 25%
so X goes from 200 default to 300 max 150 min
and Y goes from 150 default to 225 max 112.5

150
Graphics / Re: How to make VertexArray with RenderState semi transparent.
« on: September 24, 2013, 01:12:25 pm »
You should pre-render your whole minimap to a render-texture (it's not that big, is it?), rebuilding it when needed (user changed minimap size in options) -- or render it at maximum size and then just scale it. Then you just have to draw it with a sf::Sprite with color (255, 255, 255, transparency).
The map size currently is 1000*1000*4, i do not know what scale "big" is.
I have just made another vertexArray that holds another map with different color.

Pages: 1 ... 8 9 [10] 11 12 ... 15