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 - G.

Pages: [1] 2 3 ... 56
General / 🍛
« on: July 13, 2020, 02:18:26 pm »
They are swapped in the vector, but their coordinates are never modified so you won't see any difference when you draw them.

General / Re: Changing the world origin in C++ SFML
« on: July 01, 2020, 09:04:09 pm »
True, true...  ;D

Feature requests / Re: crossfading images
« on: June 30, 2020, 11:08:44 am »
Set the color of the sprite you want to fade to a progressively more transparent white.

General / Re: Changing the world origin in C++ SFML
« on: June 28, 2020, 06:35:51 pm »
Check the sf::View class (tutorial, doc)

Moving the view half the window size in the top left direction would put 0, 0 in the middle of the screen.

Graphics / Re: How to move the View?
« on: June 20, 2020, 12:09:01 am »
sf::View view = window.getView();
view.move(0, 1);

Yes, you have to set the view when you modify it.

You don't need to modify the viewport to just move the view.
View creation and how they work:

Graphics / Re: How to move the View?
« on: June 19, 2020, 09:34:20 pm »
Get your sf::View as a variable, move it, and set it with setView

General discussions / Re: Multiple IntRects in a single Sprite
« on: June 15, 2020, 08:52:23 pm »
Yes, what Hapax said.

However if for some weird reason you want to draw everything with the same sprite, you can set the texture rect, draw, set a different texture rect, draw, etc.

Graphics / Re: sfml gradient shaders question
« on: May 29, 2020, 08:56:04 pm »
Hey. You can use an sf::RenderStates and pass it to your draw function instead of only the shader.

while (mWindow.pollEvent(event));
Don't put ; at the end of your while line.

General / Re: SFML dynamic / static
« on: May 06, 2020, 09:35:38 pm »
ca buggue
Oh  ???

Je ne sais plus la raison technique car je ne le fais jamais, mais il faut éviter  de déclarer en global les ressources SFML style Texture Window Text... sous peine de crash potentiel.

General / Re: Shape animations
« on: April 30, 2020, 05:52:42 pm »
Your gif is down.

General discussions / Re: Why is intersect too "basic?"
« on: April 30, 2020, 03:31:03 am »
It's only axis aligned bounding boxes (the square surrounding your object).
Not necessarily enough for what you want. Imagine playing pool but your balls collides as if they are squares.

DotNet / Re: How do I use pollEvent Method with C#
« on: April 24, 2020, 07:49:20 am »
Take a look at some of the examples, I think events are done through C# delegates.

Graphics / Re: Dimentionner le contenue dans une fenetre sfml
« on: April 21, 2020, 12:40:51 pm »
Ça s'appelle du letter boxing.
Il y a un petit tuto sur le wiki : https://github.com/SFML/SFML/wiki/Source:-Letterbox-effect-using-a-view

En gros, il faut que tu utilises une vue (si c'est pas déjà le cas) et que tu ajustes son Viewport (la partie de la fenêtre où s'affiche ta vue) de sorte à respecter le ratio que tu veux.

Graphics / Re: White Square Problem troubleshooting
« on: April 11, 2020, 03:06:27 am »
LoadTexture takes a copy of an sf::Texture, thus it is only a temporary texture that gets deleted at the end of the function.
Use a reference.

Pages: [1] 2 3 ... 56