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

Pages: [1]
1
Graphics / Re: AntiaAliasing and Texture Smoothing
« on: April 10, 2014, 05:40:36 am »
Of course, I have the math correct in the game in C# but didn't write it correctly here :-(. Thanks. Just need to figure why it isn't antialiasing properly. could someone try using the png I created and see if it is choppy on their system?

The png I'm using is attached.

2
Graphics / Re: Help loading Images
« on: April 08, 2014, 07:14:20 pm »
I created a new thread since I realized this was not the problem. This is my current issue: http://en.sfml-dev.org/forums/index.php?topic=14896.0

Thanks for your reply :-)

3
Graphics / Re: AntiaAliasing and Texture Smoothing
« on: April 08, 2014, 06:53:28 pm »
I have a GeForce GT 650M. Downloaded the latest update but it still renders without smoothing.

4
Graphics / Re: AntiaAliasing and Texture Smoothing
« on: April 08, 2014, 09:00:06 am »
I moved the call to Clear() into the loop, but it still draws without the smoothing.

Also, the image is stretched even when the viewport is at 400x400, where I initially set it. I tried setting the window's Style to Styles.None but that didn't change anything, so it isn't accounting for the Frame in the size of the viewport.

If I know what is skewing it I can calculate and offset to correct it, or just program it correctly... Lol

5
Graphics / Re: AntiaAliasing and Texture Smoothing
« on: April 08, 2014, 08:25:50 am »
Yes, I cut that out since it wasn't necessary here. The drawn hexagon has a size of 100x100, according to GetGlobalBounds().

I have tried RectangleShape, ConvexShape, and Sprite, but all of them render the same.

Stepping through it I have done, but I don't see how that would solve the smoothing issue :-(

6
Graphics / AntiaAliasing and Texture Smoothing
« on: April 08, 2014, 08:14:43 am »
I am trying to draw this hexagon smoothly at any scale, but if it is scaled at all it gets messed up.

This is my code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Drawing;

using SFML.Window;
using SFML.Graphics;

namespace Project5
{
    class Class1
    {
        static void Main(string[] AssemblyLoadEventArgs)
        {
            RenderWindow rw = new RenderWindow(new VideoMode(400,400), "kkkk", Styles.Default, new ContextSettings(8,8,8));
            rw.Clear(Color.White);

            Sprite s = new Sprite(new Texture("Hexagon.png"));
            s.Texture.Smooth = true;

            //resize to 100x100
            FloatRect rb = s.GetGlobalBounds();
            s.Scale = new Vector2f(1 / (rb.Width / 100),1 / (rb.Height / 100));

            rw.Closed += delegate(object sender, EventArgs args)
            {
                rw.Close();
            };

            while (rw.IsOpen())
            {
                rw.DispatchEvents();
                rw.Draw(s);
                rw.Display();
            }
        }
    }

}
 

This is the output, and the png next to it:


Also, why is the hexagon squished? I scaled it evenly :-(

7
General / Re: Help setting up SFML
« on: April 06, 2014, 04:42:29 pm »
I tried this which worked fine. Figure it would create and dispose of a window with no problem, guess I was wrong.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using SFML.Window;
using SFML.Graphics;

namespace Project5
{
    class Class1
    {
        static void Main(string[] AssemblyLoadEventArgs)
        {
            RenderWindow rw = new RenderWindow(VideoMode.DesktopMode, "kkkk");

            System.Diagnostics.Stopwatch sw = new System.Diagnostics.Stopwatch();

            System.Timers.Timer endTimer = new System.Timers.Timer(25000);
            endTimer.Elapsed += delegate(Object sender, System.Timers.ElapsedEventArgs args)
            {
                rw.Close();
            };
            endTimer.Start();

            RectangleShape r = new RectangleShape(new Vector2f(15,15));
            r.Transform.Translate(new Vector2f(15, 15));

            while (rw.IsOpen())
            {
                rw.DispatchEvents();
                rw.Draw(r);
                rw.Display();

            }
        }
    }

}
 

8
General / Re: Help setting up SFML
« on: April 06, 2014, 10:01:23 am »
I updated the OP with crash information. Is there any other useful information I can post? And how do I get it?

9
General / Re: Help setting up SFML
« on: April 06, 2014, 03:14:06 am »
It only crashes if I instantiate a RenderWindow. A regular Window doesn't crash.

10
DotNet / Re: C# Documents and Tutorials SFML?
« on: April 06, 2014, 03:10:34 am »
If I may ask, how exactly did you get the C# bindings to work without crashing?

I downloaded the bindings for dotnet, used VS2013, and added the libraries, but it crashes if I make any call or reference to RenderWindow.

11
Graphics / Re: Help loading Images
« on: April 05, 2014, 06:54:44 pm »
Running my program was giving me a BadImageFormatException so I assumed this was due to me not entering a valid image file location. This was actually due to missing external libraries, which I have now added. The program just crashes now, with a single call to create a new render window.

12
General / Help setting up SFML
« on: April 05, 2014, 06:46:36 am »
I have looked at the tutorial, and looked at threads by people having similar issues, with no luck. I get this error when I run a single line program:

Code: [Select]
The thread 0x21f8 has exited with code 259 (0x103).
The thread 0xc90 has exited with code 259 (0x103).
The program '[9844] Project5.vshost.exe' has exited with code 255 (0xff).

This is the program that generates that error:

using System;
using System.Drawing;
using SFML.Graphics;
using SFML.Window;

namespace Project1
{
    public class SDL
    {

        public static void Main(string[] args)
        {
            RenderWindow rw = new RenderWindow(VideoMode.DesktopMode,"Test");
        }

    }
}

Previously, I was unable to run this at all, but since adding the files from the "extlibs" folder to my project it just crashes immediately after running.

Running it in VS2012 I get this:


I got this from the event log:
Code: [Select]
- System

  - Provider

   [ Name]  Application Error
 
  - EventID 1000

   [ Qualifiers]  0
 
   Level 2
 
   Task 100
 
   Keywords 0x80000000000000
 
  - TimeCreated

   [ SystemTime]  2014-04-06T07:36:32.000000000Z
 
   EventRecordID 6196
 
   Channel Application
 
   Computer Josh-PC
 
   Security
 

- EventData

   Project1.vshost.exe
   11.0.50727.1
   5011d445
   nvoglv32.DLL
   8.17.12.9616
   4f53cfb7
   c0000005
   00845643
   cc8
   01cf516abacb848d
   c:\users\josh\documents\visual studio 2012\Projects\Project1\Project1\bin\Debug\Project1.vshost.exe
   C:\Windows\system32\nvoglv32.DLL
   2bed7b7a-bd5e-11e3-b2dc-606c66427029

13
Graphics / Help loading Images
« on: April 05, 2014, 12:39:44 am »
I am trying to load bitmaps that I have saved in the resources section in Visual Studio 2012. It seems that this is not possible so where would I need to place a bitmap resource file and by what name would I reference it?

Pages: [1]
anything