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

Pages: [1]
1
General / Re: Problem on using SFML.NET binding
« on: September 03, 2016, 12:26:14 pm »
@dabbertorres, Thank you.

When I try to change it to x64 in build configurations, it solve the problem.

Lesson Learn : Don't use "Any CPU" when you are using native dlls.

2
General / Re: Problem on using SFML.NET binding
« on: September 03, 2016, 12:59:42 am »
@dabbertorres, I don't understand what you mean by build configuration so I will just explain the complete steps on how I try to use it.

  • I have added library in "lib" folder(sfmlnet-audio-2.dll,sfmlnet-graphics-2.dll,sfmlnet-system-2.dll,sfmlnet-window-2.dll) as references
  • I have copy (csfml-audio-2.dll,csfml-graphics-2.dll,csfml-system-2.dll,csfml-window-2.dll,libsndfile-1.dll,openal32.dll,OpenTK.Compatibility.dll,OpenTK.dll) from "extlibs" to a solution
  • I have set their "Build Action" as "Content" and set "Copy to Output Directory" as "Copy always"
  • I use the build configurations(I think this is what you mean by build configurations) as "Debug" and "Platform" as "Any CPU" 
I than try to use

 RenderWindow window = new RenderWindow(new VideoMode(640, 480), "MotionNET Playback Example");
            window.SetVerticalSyncEnabled(true);

and I error is shown

3
General / Re: Problem on using SFML.NET binding
« on: September 02, 2016, 12:04:20 pm »
@dabbertorres , I know that the download package does not contain the complete package for both 32 bit and 64 bit.

I mean , when I download the 64 bit package and reference the CSFML in 64 bit package, it doesn't work.

Than

I try to download the 32 bit and use the CSFML in 32 bit package but it work.

The problem is that 64 bit package doesn't work while the 32 bit package work.

I am trying to use 64 bit one.

Sorry, if my question seem confusing and thank you for helping me out.
 

4
General / Re: Problem on using SFML.NET binding
« on: September 01, 2016, 09:27:58 pm »
dabbertorres , Since the 64 bit doesn't work, I try it again with 32 bit work.

Unexpectedly , it work on 32 bit.

By 32 bit, 64 bit, I mean the complete package which can be found on

http://www.sfml-dev.org/download/sfml.net/

Maybe it have the wrong csfml wrong in the archive?

I thought of downloading csfml from

http://www.sfml-dev.org/download/csfml/

but I don't know which version of CSFML that SFML.NET 2.2 64 bit used.

Could you please help me with the problem?

Comment on side note: yes, it is a WinForms. I got it mix up somehow.

5
General / Problem on using SFML.NET binding
« on: September 01, 2016, 04:57:58 pm »
I am having problem in using SFML.NET 2.2 64bit in Visual studio 2015.

I have added all the library in the "lib" folder(sfmlnet-audio-2.dll,sfmlnet-graphics-2.dll,sfmlnet-system-2.dll,sfmlnet-window-2.dll) (as references) and add the lib in "extlibs" by copying it into the visual studio and setting them to always copy to "output directory"

It is showing me the error on "sfmlnet-window-2.dll" saying that it is missing the required component.

Therefore, I try to add the source code while removing the references in the "lib" folder to understand what the error is really about. I doesn't remove the lib in "extlibs".

The stack trace is

System.BadImageFormatException was unhandled
  HResult=-2147024885
  Message=An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)
  Source=SFMLTest
  StackTrace:
       at SFML.Graphics.RenderWindow.sfRenderWindow_createUnicode(VideoMode Mode, IntPtr Title, Styles Style, ContextSettings& Params)
       at SFML.Graphics.RenderWindow..ctor(VideoMode mode, String title, Styles style, ContextSettings settings) in C:\Users\Steven\Documents\Visual Studio 2015\Projects\SFMLTest\SFMLTest\SFML.Net-2.2\Graphics\RenderWindow.cs:line 66
       at SFML.Graphics.RenderWindow..ctor(VideoMode mode, String title) in C:\Users\Steven\Documents\Visual Studio 2015\Projects\SFMLTest\SFMLTest\SFML.Net-2.2\Graphics\RenderWindow.cs:line 30
       at MotionNetPlayer.Form1.Form1_Load(Object sender, EventArgs e) in C:\Users\Steven\Documents\Visual Studio 2015\Projects\SFMLTest\SFMLTest\Form1.cs:line 24
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
  InnerException:



The source code my WPF program is

using SFML.Graphics;
using SFML.Window;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace SFMLTest
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            RenderWindow window = new RenderWindow(new VideoMode(640, 480), "MotionNET Playback Example");
        }
    }
}



Pages: [1]