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 - Sebastian Huggbard

Pages: [1]
1
Graphics / Re: Problems with smoothing a textured shape
« on: August 29, 2022, 03:12:51 pm »
I got the solution.
The "settings" in the WindowsRenderer ;-)!


Best regards,
Sebastian

2
Graphics / Problems with smoothing a textured shape
« on: August 29, 2022, 01:43:09 pm »
Dear Ladies and Gentlemen,

it is the first time for me that i'm in your great forum and i hope i'm in the correct thread.
I'm using SFML.Net with C# and i'm new to SFML but not to C#.
My Problem is that i'm drawing a textured  shape (circle) an i can't get the edge smooth.
I#m using Win10. VisualStudio 2019 and SFML.Net-2.4-32-bit.
It would be great if you could help me ;)

Here is a picture:
https://ibb.co/cX407g7

Here is my code:
    class Program
    {
        const int WIDTH = 640;
        const int HEIGHT = 480;
        const string TITLE = "First";

        static void Main(string[] args)
        {

            VideoMode mode = new VideoMode(WIDTH, HEIGHT);
            RenderWindow window = new RenderWindow(mode, TITLE);
            window.SetVerticalSyncEnabled(true);

            Texture texture = new Texture(@"E:\SFML\SFML_First\Gold.png");
            texture.Smooth = true;
           
            CircleShape cshape = new CircleShape(50);
            cshape.TextureRect = new IntRect(10, 10, 100, 100);

            cshape.Texture = texture;
         
           

            while (window.IsOpen)
            {
                window.DispatchEvents();
                window.Clear(Color.Black);
                window.Draw(cshape);
                window.Display();
            }
        }
    }
 

 Best regards,
Sebastian

Pages: [1]