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

Pages: [1] 2 3 ... 5
1
The address of a deferenced iterator is just a pointer that is equivalent to the iterator, is it not?

It can be a simple pointer but it doesn't need to be. Some implementations use a class so they add extra functionality in debug mode.

2
Window / Re: getLocalBounds() with text objects?
« on: May 02, 2019, 04:52:17 pm »
The window comes with a default view.

3
General / Re: Why getOrigin() doesnt return current position of object
« on: January 09, 2019, 10:07:23 pm »
Moving an object does not modify its origin (which is in local coordinates).

4
I think ElasticSprite of SelbaWard does it in 2d. You should check their code.

5
I think that in order to have the correct deformation 3d is needed. You should look Sprite 3D from SelbaWard.

6
General / Re: sf::RenderTexture::isRepeated
« on: May 14, 2018, 05:14:06 am »
To know if the repeat mode was enabled or disabled (with sf::RenderTexture::setRepeated).

You can have more information about that in sf::Texture::setRepeated.

8
Graphics / Re: Shaders slowing down app significantly
« on: April 15, 2018, 04:44:20 am »
It does not need to be the same size, you can use a larger RenderTexture and use setTextureRect in the sprite to use only a portion of the texture.

I'm not sure if the create function is slow or not.

9
Graphics / Re: Shaders slowing down app significantly
« on: April 15, 2018, 03:53:04 am »
If I am not mistaken when creating a new RenderTexture a new OpenGL context is created. In some previous versions I also noticed low FPS when creating a new RenderTexture in each frame. I solved it by creating one and reusing it.

10
Graphics / Re: Shaders slowing down app significantly
« on: April 15, 2018, 01:12:02 am »
You should not create a RenderTexture every time you're going to draw something. There is also no need to store it in the heap.

11
That is called initializer list.

12
Feature requests / Re: double click ?
« on: October 17, 2017, 07:38:05 pm »
Maybe we should put a bool in MouseButtonEvent that says whether it is a double click or not. That way, those clicks do not send two events. I do not know if it is a good idea or if it is used in other libraries.

13
General / Re: Strange Sprite Offset
« on: August 21, 2017, 06:06:38 am »
Maybe I was not clear with my message (English is not my main language) but you should replace getGlobalBounds with getLocalBounds.

14
General / Re: Strange Sprite Offset
« on: August 21, 2017, 02:31:01 am »
Now I see you're using getGlobalBounds instead of getLocalBounds. The origin is calculated in local coordinates and the scale of 5 causes it to be in the wrong position.

15
General / Re: Strange Sprite Offset
« on: August 21, 2017, 01:01:48 am »
With (window->getSize().x / 2, window->getSize().y / 2) you are creating a position in window coordinates. You have to use mapPixelToCoords to convert it into world coordinates.

Pages: [1] 2 3 ... 5
anything