SFML community forums

Help => Graphics => Topic started by: lori3 on May 02, 2020, 01:43:12 am

Title: How do I shift background to grayscale?
Post by: lori3 on May 02, 2020, 01:43:12 am
Hi.

So I'm trying to create a warcraft II clone and I'd like to shift the gameplay's display to grayscale if the in game menu gets opened.
Here is a screenshot:
https://ibb.co/G31nhtX

github to full source (it's huge though): https://github.com/lori2001/Warcraft-II-HD

I found out I'd have to shift each pixel of the image to about this amount (y is a pixel in grayscale)
y=0.3R+0.6G+0.1B

I just have no idea how it's done. =)) Could you guys please help me out?
Title: How do I shift background to grayscale?
Post by: lori3 on May 02, 2020, 01:56:35 am
Hi.
So I'm trying to create a warcraft II clone with c++ 17 and SFML 2.1.

I'd like to grayscale the background (similarly to the original game) in case the in-game menu is opened.
I figured I'd need to shift each pixel's value by y=0.3R+0.6G+0.1B. (where y is the shifted value)

The thing is I don't really know how to do that =)). I searched and couldn't find anything. I hope you can help me out.

here's a screenshot:
https://ibb.co/G31nhtX

here is the full code (In case you wanna see the whole thing)
https://github.com/lori2001/Warcraft-II-HD
Title: How to shift background to grayscale?
Post by: lori3 on May 02, 2020, 01:58:38 am
Hi.
So I'm trying to create a warcraft II clone with c++ 17 and SFML 2.1.

I'd like to grayscale the background (similarly to the original game) in case the in-game menu is opened.
I figured I'd need to shift each pixel's value by y=0.3R+0.6G+0.1B. (where y is the shifted value)

The thing is I don't really know how to do that =)). I searched and couldn't find anything. I hope you can help me out.

here's a screenshot:
https://ibb.co/G31nhtX

here is the full code (In case you wanna see the whole thing)
https://github.com/lori2001/Warcraft-II-HD
Title: How to shift window content to black and white?
Post by: lori3 on May 02, 2020, 02:01:31 am
Hi.
So I'm trying to create a warcraft II clone with c++ 17 and SFML 2.1.

I'd like to grayscale the background (similarly to the original game) in case the in-game menu is opened.
I figured I'd need to shift each pixel's value by y=0.3R+0.6G+0.1B. (where y is the shifted value)

The thing is I don't really know how to do that =)). I searched and couldn't find anything. I hope you can help me out.

here's a screenshot:
https://ibb.co/G31nhtX

here is the full code (In case you wanna see the whole thing)
https://github.com/lori2001/Warcraft-II-HD
Title: How to shift window content to black and white?
Post by: lori3 on May 02, 2020, 02:02:35 am
Hi.
So I'm trying to create a warcraft II clone with c++ 17 and SFML 2.1.

I'd like to grayscale the background (similarly to the original game) in case the in-game menu is opened.
I figured I'd need to shift each pixel's value by y=0.3R+0.6G+0.1B. (where y is the shifted value)

The thing is I don't really know how to do that =)). I searched and couldn't find anything. I hope you can help me out.

here's a screenshot:
https://ibb.co/G31nhtX (https://ibb.co/G31nhtX)

here is the full code (In case you wanna see the whole thing)
https://github.com/lori2001/Warcraft-II-HD (https://github.com/lori2001/Warcraft-II-HD)
Title: Trying to get the global bounds From this "Vertex"-transformable Class
Post by: Power on May 02, 2020, 06:31:05 pm
Hello, so here is the shape i made, and my goal ultimately is to be able to test the intersections between some entity and the elements of this image specifically (it means : not the rectangle surrounding the shape).
(https://i.postimg.cc/7h8YSrrY/screenshot-158.png)

Its construction follow the tilemap example, its has a vertexArray as an attributes which is resized to match the size of the total numbers of vertices needed to make the shape in the image above. So total numbers of vertices is :
1) +4 (for the rectangle in the middle)
2) +(6*4) for the diamond shapes on every side.
3) multiply line 2 by 4.
Totat vertices = 4+(6*4)*4= 100.

I proceed to construct the vertices with a function member of the class
class VertexFun :  public sf::Transformable , public sf::Drawable
{private:

       sf::VertexArray V;
...}
And the function would be :
public :
      bool VertexShapeQuad(const std::string& address, sf::Vector2f centerOfVertex, sf::Vector2f Dimensions, sf::Vector2f halfRadius, int NumberOfWings, int NumberOfElements )
        {...} /// i dont need the first parameter, it's just in case i want to use a texture

Final result is shown at the beginning of this post.
VertexFun shape1;
    shape1.VertexShapeQuad("data/tilemap.png",sf::Vector2f(400,400),sf::Vector2f(30,30),sf::Vector2f(10,10),4,6);
....
window.clear(sf::Color::White);

        window.draw(shape1);
        window.display();
 

Okay now i am taking the advice i was given lastly here : https://en.sfml-dev.org/forums/index.php?topic=27161.0
And i am trying to get the global bounds of the vertexArray:

i implemented this function member :
sf::FloatRect getGlobalBounds()
        {
            return getTransform().transformRect(V.getBounds());
        }
 

And when using it in the main :
sf::FloatRect ff;
    ff=shape1.getGlobalBounds();
    int aa,bb,cc,dd;
    aa=ff.left;bb=ff.top;cc=ff.width;dd=ff.height;
    cout << " left top width height : " << aa << " " << bb << " " << cc << " " << dd << " " << endl;

I find that it has what i presume the bound of the rectangle made by the whole shape :
(https://i.postimg.cc/v8gnJ5Y5/screenshot-159.png)

AND, when i use a moving function:
up = (sf::Keyboard::isKeyPressed(sf::Keyboard::Up) ? 1 : 0);
        if(up==1)
        {
                shape1.move(0,-10);
                cout << " left top width height : " << aa << " " << bb << " " << cc << " " << dd << " " << endl;
        }
The bounds are the same.
___
To the questions :

1) I think i should have a member function (sf::FloatRect getGlobalBounds()) that applies to each little structures (the rectangle + diamonds) i made, and then proceed to test them ALL, to be able to check the "intersection" of an entity with my vertexclass?
But IS THAT POSSIBLE? Since i have only one "VertexArray" in my Class? The GetBounds applies to the wholes points of the vertexArray and not individually for each 4 vertices.... (reminder : all the elements in the image are 4-vertices shapes inside ONE vertexAray)

2) Any other idea how to do it?
Thanks
Title: Trying to get the global bounds From this "Vertex"-transformable Class
Post by: Power on May 02, 2020, 06:31:42 pm
Hello, so here is the shape i made, and my goal ultimately is to be able to test the intersections between some entity and the elements of this image specifically (it means : not the rectangle surrounding the shape).
(https://i.postimg.cc/7h8YSrrY/screenshot-158.png)

Its construction follow the tilemap example, its has a vertexArray as an attributes which is resized to match the size of the total numbers of vertices needed to make the shape in the image above. So total numbers of vertices is :
1) +4 (for the rectangle in the middle)
2) +(6*4) for the diamond shapes on every side.
3) multiply line 2 by 4.
Totat vertices = 4+(6*4)*4= 100.

I proceed to construct the vertices with a function member of the class
class VertexFun :  public sf::Transformable , public sf::Drawable
{private:

       sf::VertexArray V;
...}
And the function would be :
public :
      bool VertexShapeQuad(const std::string& address, sf::Vector2f centerOfVertex, sf::Vector2f Dimensions, sf::Vector2f halfRadius, int NumberOfWings, int NumberOfElements )
        {...} /// i dont need the first parameter, it's just in case i want to use a texture

Final result is shown at the beginning of this post.
VertexFun shape1;
    shape1.VertexShapeQuad("data/tilemap.png",sf::Vector2f(400,400),sf::Vector2f(30,30),sf::Vector2f(10,10),4,6);
....
window.clear(sf::Color::White);

        window.draw(shape1);
        window.display();
 

Okay now i am taking the advice i was given lastly here : https://en.sfml-dev.org/forums/index.php?topic=27161.0
And i am trying to get the global bounds of the vertexArray:

i implemented this function member :
sf::FloatRect getGlobalBounds()
        {
            return getTransform().transformRect(V.getBounds());
        }
 

And when using it in the main :
sf::FloatRect ff;
    ff=shape1.getGlobalBounds();
    int aa,bb,cc,dd;
    aa=ff.left;bb=ff.top;cc=ff.width;dd=ff.height;
    cout << " left top width height : " << aa << " " << bb << " " << cc << " " << dd << " " << endl;

I find that it has what i presume the bound of the rectangle made by the whole shape :
(https://i.postimg.cc/v8gnJ5Y5/screenshot-159.png)

AND, when i use a moving function:
up = (sf::Keyboard::isKeyPressed(sf::Keyboard::Up) ? 1 : 0);
        if(up==1)
        {
                shape1.move(0,-10);
                cout << " left top width height : " << aa << " " << bb << " " << cc << " " << dd << " " << endl;
        }
The bounds are the same.
___
To the questions :

1) I think i should have a member function (sf::FloatRect getGlobalBounds()) that applies to each little structures (the rectangle + diamonds) i made, and then proceed to test them ALL, to be able to check the "intersection" of an entity with my vertexclass?
But IS THAT POSSIBLE? Since i have only one "VertexArray" in my Class? The GetBounds applies to the wholes points of the vertexArray and not individually for each 4 vertices.... (reminder : all the elements in the image are 4-vertices shapes inside ONE vertexAray)

2) Any other idea how to do it?
Thanks
Title: Trying to get the global bounds From this "Vertex"-transformable Class
Post by: Power on May 02, 2020, 06:34:14 pm
Hello, so here is the shape i made, and my goal ultimately is to be able to test the intersections between some entity and the elements of this image specifically (it means : not the rectangle surrounding the shape).
(https://i.postimg.cc/7h8YSrrY/screenshot-158.png)

Its construction follow the tilemap example, its has a vertexArray as an attributes which is resized to match the size of the total numbers of vertices needed to make the shape in the image above. So total numbers of vertices is :
1) +4 (for the rectangle in the middle)
2) +(6*4) for the diamond shapes on every side.
3) multiply line 2 by 4.
Totat vertices = 4+(6*4)*4= 100.

I proceed to construct the vertices with a function member of the class
class VertexFun :  public sf::Transformable , public sf::Drawable
{private:

       sf::VertexArray V;
...}
And the function would be :
public :
      bool VertexShapeQuad(const std::string& address, sf::Vector2f centerOfVertex, sf::Vector2f Dimensions, sf::Vector2f halfRadius, int NumberOfWings, int NumberOfElements )
        {...} /// i dont need the first parameter, it's just in case i want to use a texture

Final result is shown at the beginning of this post.
VertexFun shape1;
    shape1.VertexShapeQuad("data/tilemap.png",sf::Vector2f(400,400),sf::Vector2f(30,30),sf::Vector2f(10,10),4,6);
....
window.clear(sf::Color::White);

        window.draw(shape1);
        window.display();
 

Okay now i am taking the advice i was given lastly here : https://en.sfml-dev.org/forums/index.php?topic=27161.0
And i am trying to get the global bounds of the vertexArray:

i implemented this function member :
sf::FloatRect getGlobalBounds()
        {
            return getTransform().transformRect(V.getBounds());
        }
 

And when using it in the main :
sf::FloatRect ff;
    ff=shape1.getGlobalBounds();
    int aa,bb,cc,dd;
    aa=ff.left;bb=ff.top;cc=ff.width;dd=ff.height;
    cout << " left top width height : " << aa << " " << bb << " " << cc << " " << dd << " " << endl;

I find that it has what i presume the bound of the rectangle made by the whole shape :
(https://i.postimg.cc/v8gnJ5Y5/screenshot-159.png)

AND, when i use a moving function:
up = (sf::Keyboard::isKeyPressed(sf::Keyboard::Up) ? 1 : 0);
        if(up==1)
        {
                shape1.move(0,-10);
                cout << " left top width height : " << aa << " " << bb << " " << cc << " " << dd << " " << endl;
        }
The bounds are the same.
___
To the questions :

1) I think i should have a member function (sf::FloatRect getGlobalBounds()) that applies to each little structures (the rectangle + diamonds) i made, and then proceed to test them ALL, to be able to check the "intersection" of an entity with my vertexclass?
But IS THAT POSSIBLE? Since i have only one "VertexArray" in my Class? The GetBounds applies to the wholes points of the vertexArray and not individually for each 4 vertices.... (reminder : all the elements in the image are 4-vertices shapes inside ONE vertexAray)

2) Any other idea how to do it?
Thanks
Title: Trying to get the global bounds From this "Vertex"-transformable Class
Post by: Power on May 02, 2020, 06:34:57 pm
Hello, so here is the shape i made, and my goal ultimately is to be able to test the intersections between some entity and the elements of this image specifically (it means : not the rectangle surrounding the shape).
(https://i.postimg.cc/7h8YSrrY/screenshot-158.png)

Its construction follow the tilemap example, its has a vertexArray as an attributes which is resized to match the size of the total numbers of vertices needed to make the shape in the image above. So total numbers of vertices is :
1) +4 (for the rectangle in the middle)
2) +(6*4) for the diamond shapes on every side.
3) multiply line 2 by 4.
Totat vertices = 4+(6*4)*4= 100.

I proceed to construct the vertices with a function member of the class
class VertexFun :  public sf::Transformable , public sf::Drawable
{private:

       sf::VertexArray V;
...}
And the function would be :
public :
      bool VertexShapeQuad(const std::string& address, sf::Vector2f centerOfVertex, sf::Vector2f Dimensions, sf::Vector2f halfRadius, int NumberOfWings, int NumberOfElements )
        {...} /// i dont need the first parameter, it's just in case i want to use a texture

Final result is shown at the beginning of this post.
VertexFun shape1;
    shape1.VertexShapeQuad("data/tilemap.png",sf::Vector2f(400,400),sf::Vector2f(30,30),sf::Vector2f(10,10),4,6);
....
window.clear(sf::Color::White);

        window.draw(shape1);
        window.display();
 

Okay now i am taking the advice i was given lastly here : https://en.sfml-dev.org/forums/index.php?topic=27161.0
And i am trying to get the global bounds of the vertexArray:

i implemented this function member :
sf::FloatRect getGlobalBounds()
        {
            return getTransform().transformRect(V.getBounds());
        }
 

And when using it in the main :
sf::FloatRect ff;
    ff=shape1.getGlobalBounds();
    int aa,bb,cc,dd;
    aa=ff.left;bb=ff.top;cc=ff.width;dd=ff.height;
    cout << " left top width height : " << aa << " " << bb << " " << cc << " " << dd << " " << endl;

I find that it has what i presume the bound of the rectangle made by the whole shape :
(https://i.postimg.cc/v8gnJ5Y5/screenshot-159.png)

AND, when i use a moving function:
up = (sf::Keyboard::isKeyPressed(sf::Keyboard::Up) ? 1 : 0);
        if(up==1)
        {
                shape1.move(0,-10);
                cout << " left top width height : " << aa << " " << bb << " " << cc << " " << dd << " " << endl;
        }
The bounds are the same.
___
To the questions :

1) I think i should have a member function (sf::FloatRect getGlobalBounds()) that applies to each little structures (the rectangle + diamonds) i made, and then proceed to test them ALL, to be able to check the "intersection" of an entity with my vertexclass?
But IS THAT POSSIBLE? Since i have only one "VertexArray" in my Class? The GetBounds applies to the wholes points of the vertexArray and not individually for each 4 vertices.... (reminder : all the elements in the image are 4-vertices shapes inside ONE vertexAray)

2) Any other idea how to do it?
Thanks
Title: Trying to get the global bounds From this "Vertex"-transformabl Class
Post by: Power on May 02, 2020, 06:36:55 pm
Hello, so here is the shape i made, and my goal ultimately is to be able to test the intersections between some entity and the elements of this image specifically (it means : not the rectangle surrounding the shape).
(https://i.postimg.cc/7h8YSrrY/screenshot-158.png)

Its construction follow the tilemap example, its has a vertexArray as an attributes which is resized to match the size of the total numbers of vertices needed to make the shape in the image above. So total numbers of vertices is :
1) +4 (for the rectangle in the middle)
2) +(6*4) for the diamond shapes on every side.
3) multiply line 2 by 4.
Totat vertices = 4+(6*4)*4= 100.

I proceed to construct the vertices with a function member of the class
class VertexFun :  public sf::Transformable , public sf::Drawable
{private:

       sf::VertexArray V;
...}
And the function would be :
public :
      bool VertexShapeQuad(const std::string& address, sf::Vector2f centerOfVertex, sf::Vector2f Dimensions, sf::Vector2f halfRadius, int NumberOfWings, int NumberOfElements )
        {...} /// i dont need the first parameter, it's just in case i want to use a texture

Final result is shown at the beginning of this post.
VertexFun shape1;
    shape1.VertexShapeQuad("data/tilemap.png",sf::Vector2f(400,400),sf::Vector2f(30,30),sf::Vector2f(10,10),4,6);
....
window.clear(sf::Color::White);

        window.draw(shape1);
        window.display();
 

Okay now i am taking the advice i was given lastly here : https://en.sfml-dev.org/forums/index.php?topic=27161.0
And i am trying to get the global bounds of the vertexArray:

i implemented this function member :
sf::FloatRect getGlobalBounds()
        {
            return getTransform().transformRect(V.getBounds());
        }
 

And when using it in the main :
sf::FloatRect ff;
    ff=shape1.getGlobalBounds();
    int aa,bb,cc,dd;
    aa=ff.left;bb=ff.top;cc=ff.width;dd=ff.height;
    cout << " left top width height : " << aa << " " << bb << " " << cc << " " << dd << " " << endl;

I find that it has what i presume the bound of the rectangle made by the whole shape :
(https://i.postimg.cc/v8gnJ5Y5/screenshot-159.png)

AND, when i use a moving function:
up = (sf::Keyboard::isKeyPressed(sf::Keyboard::Up) ? 1 : 0);
        if(up==1)
        {
                shape1.move(0,-10);
                cout << " left top width height : " << aa << " " << bb << " " << cc << " " << dd << " " << endl;
        }
The bounds are the same.
___
To the questions :

1) I think i should have a member function (sf::FloatRect getGlobalBounds()) that applies to each little structures (the rectangle + diamonds) i made, and then proceed to test them ALL, to be able to check the "intersection" of an entity with my vertexclass?
But IS THAT POSSIBLE? Since i have only one "VertexArray" in my Class? The GetBounds applies to the wholes points of the vertexArray and not individually for each 4 vertices.... (reminder : all the elements in the image are 4-vertices shapes inside ONE vertexAray)

2) Any other idea how to do it?
Thanks
Title: How to rotate a sprite around another sprite
Post by: Objection on May 03, 2020, 05:36:38 am
So I'm basically trying to put a reticle around a top down spaceship and when the ship rotates I want the reticle to follow it. Does anyone know how to rotate a sprite around another sprite's origin?
Title: Erreur compilation reference Code Blocks
Post by: galimor on May 03, 2020, 11:58:46 am
Bonjour,
Après avoir scrupuleusement suivi le tuto pour installer les bibliothèques sfml, mon code est celui donné dans l'exemple test du tuto, donc pas de problème à ce niveau là, mais je ne comprend pas d'où peut provenir le problème, même si je sais qu'il est au niveau des référence, donc peut être que j'ai mal lier mes bibliothèques mais j'ai exactement comme dans le tuto.

Voici à quoi ressemble mes erreurs :
undefined reference to '_imp__ZN2sf6StringClEPKcRKSt6locale'
undefined reference to '_imp__ZN2sf9VideoModeClEjjj'
....

Il y a 20 erreurs de ce type.
Merci d'avoir lu, si vous pouvez m'aider ça serait génial !
Title: Erreur compilation reference Code Blocks
Post by: galimor on May 03, 2020, 12:02:40 pm
Bonjour,
Après avoir scrupuleusement suivi le tuto pour installer les bibliothèques sfml, mon code est celui donné dans l'exemple test du tuto, donc pas de problème à ce niveau là, mais je ne comprend pas d'où peut provenir le problème, même si je sais qu'il est au niveau des référence, donc peut être que j'ai mal lier mes bibliothèques mais j'ai exactement comme dans le tuto.

Voici à quoi ressemble mes erreurs :
undefined reference to '_imp__ZN2sf6StringClEPKcRKSt6locale'
undefined reference to '_imp__ZN2sf9VideoModeClEjjj'
....

Il y a 20 erreurs de ce type.
Merci d'avoir lu, si vous pouvez m'aider ça serait génial !
Title: Erreur compilation reference Code Blocks
Post by: galimor on May 03, 2020, 12:03:51 pm
Bonjour,
Après avoir scrupuleusement suivi le tuto pour installer les bibliothèques sfml, mon code est celui donné dans l'exemple test du tuto, donc pas de problème à ce niveau là, mais je ne comprend pas d'où peut provenir le problème, même si je sais qu'il est au niveau des référence, donc peut être que j'ai mal lier mes bibliothèques mais j'ai exactement comme dans le tuto.

Voici à quoi ressemble mes erreurs :
undefined reference to '_imp__ZN2sf6StringClEPKcRKSt6locale'
undefined reference to '_imp__ZN2sf9VideoModeClEjjj'
....

Il y a 20 erreurs de ce type.
Merci d'avoir lu, si vous pouvez m'aider ça serait génial !
Title: Erreur compilation reference Code Blocks
Post by: galimor on May 03, 2020, 12:06:58 pm
Bonjour,
Après avoir scrupuleusement suivi le tuto pour installer les bibliothèques sfml, mon code est celui donné dans l'exemple test du tuto, donc pas de problème à ce niveau là, mais je ne comprend pas d'où peut provenir le problème, même si je sais qu'il est au niveau des référence, donc peut être que j'ai mal lier mes bibliothèques mais j'ai exactement comme dans le tuto.

Voici à quoi ressemble mes erreurs :
undefined reference to '_imp__ZN2sf6StringClEPKcRKSt6locale'
undefined reference to '_imp__ZN2sf9VideoModeClEjjj'
....

Il y a 20 erreurs de ce type.
Merci d'avoir lu, si vous pouvez m'aider ça serait génial !
Title: Sprite under PNG
Post by: bszandras on May 03, 2020, 03:04:49 pm
I am having truble findig a solution:
Is there a way to check if a sprite is under the transparent part of a png texture? (I mean if it is visible under it)
Title: Sprite under PNG
Post by: bszandras on May 03, 2020, 03:06:25 pm
Is there a way to check if a sprite is under the transparent part of another sprite (with a png)?
Title: Sprite under PNG
Post by: bszandras on May 03, 2020, 03:07:36 pm
Is there a way to check if a sprite is under the transparent part of another sprite (with a png)?
Title: Sprite under PNG
Post by: bszandras on May 03, 2020, 03:08:00 pm
Is there a way to check if a sprite is under the transparent part of another sprite (with a png)?
Title: Sprite under PNG
Post by: bszandras on May 03, 2020, 03:09:25 pm
Is there a way to check if a sprite is under the transparent part of another sprite (with a png)?
Title: accès à la touche + (shift =)
Post by: Riton_Lafouine on May 03, 2020, 04:35:03 pm
Bonjour,

tout d'abord, je suis débutant sur SFML (et en programmation en général) mais j'ai bien réussi à mettre en place une chaine d’événement clavier fonctionnelle dont je suis satisfait.

Mon problème est que je cherche à accéder à la touche + (shift =) le code ascii est identique à celui de la touche + du pavé numérique mais apparement SFML n'utilise pas ce code ascii pour accéder aux touches.

En effet mon programme ne répond pas à + (shift =) alors qu'il répond à + clavier numérique.

Comment puis-je accéder à cette touche, elle n'apparait pas dans sf::Keyboard Class Reference

question subsidiaire, est il possible de forcer le shift pour qu'il soit activé tout le temps dans le programme ?

Merci d'avance

RLF
Title: Retrieving + key with (shit =)
Post by: Riton_Lafouine on May 03, 2020, 04:56:21 pm
Hello, i'm new to sfml and rookie into programming.

I already set up a keyboard event chain wich is working and i'm happy with it.

But i need for some purpose to use the + (shit =), it shows Ascii code 43, same as + key on numerical keypad.

+ (shift =) is not triggering my event, it seems sf::keyboard::Add is only triggered by keypad.

Is there a way to use this key wit sf::keyboard ?

Bonus question, is it possible to lock Shift key in the program ? in order that keyboard numbers (not keypad) are always active in front.

thanks by advance,

RLF

Title: Texture smoothing, window stretch, white/grey pixels
Post by: nullptr123 on May 03, 2020, 09:45:18 pm
Is there a technical explanation for why some textures might have these artifacts when stretching with texture smoothing? Is there something I can do to the "faulty" textures to help them along and remedy this? Stretching the window with smoothing enabled is quite desirable for me here, so I'd like to do something other than just turning smoothing off.

https://i.imgur.com/Tss2AGa.png

If it can look fine for some textures then surely there's a way to get it to look good for all of them.
Title: Texture smoothing, window stretch, white/grey pixels
Post by: nullptr123 on May 03, 2020, 09:46:12 pm
Is there a technical explanation for why some textures might have these artifacts when stretching with texture smoothing? Is there something I can do to the "faulty" textures to help them along and remedy this? Stretching the window with smoothing enabled is quite desirable for me here, so I'd like to do something other than just turning smoothing off.

https://i.imgur.com/Tss2AGa.png

If it can look fine for some textures then surely there's a way to get it to look good for all of them.
Title: Sprite under Sprite
Post by: bszandras on May 04, 2020, 08:13:01 am
I want to check if a sprite is under another sprite's transparent part (textured with a png). I haven't really found a solution, is this even possible in SFML?
Title: Forum database errors
Post by: Laurent on May 04, 2020, 08:29:41 am
Hi

It seems that the forum causes database errors when creating a new post, or doing a search.

We're aware of these errors, we're investigating and hopefully we'll fix that soon.

In the meantime, you can stop sending me PMs or e-mails about it ;D