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

Pages: [1] 2
1
General / Compiling sfml2 with mingw (without Codeblocks)
« on: December 08, 2010, 02:34:03 pm »
Just to update this information:

The sfml2 branch uses cmake now, which is able to generate makefiles for mingw.

2
Window / getting game pad events without showing a window
« on: November 22, 2010, 06:42:49 pm »
I've tried to create an SFML window using a Qt-winId-handle, without opening a GLContext via SFML. So far, it seems to work, to get the gamepad events via sf::Window::GetEvent().

Quote
SFML is not made for that, the input stuff is not independant.


Apart from SFML not being made for this, is there anything stopping me from doing that? That you can think of?

3
C / CSFML and cmake configuration problem
« on: November 22, 2010, 06:30:17 pm »
I'll do that, if I find the time. Thanks for your help.

4
C / CSFML and cmake configuration problem
« on: November 22, 2010, 05:08:49 pm »
Code: [Select]
$ ls "C:/Program Files/SFML/lib"
libsfml-audio-d.a  libsfml-graphics-d.a  libsfml-network-d.a  libsfml-system-d.a  libsfml-window-d.a
libsfml-audio.a    libsfml-graphics.a    libsfml-network.a    libsfml-system.a    libsfml-window.a

5
C / CSFML and cmake configuration problem
« on: November 22, 2010, 04:43:00 pm »
Quote
(never modify the source CMakeLists.txt!).

Yes, that makes sense.

Quote
If you have /include and lib/ under this path, then FindSFML.cmake will be able to find SFML headers and libraries, and CSFML will be configured successfully.


Sadly, no. I have the include- and the lib-dir in that directory, both the Release and the Debug version. cmake still fails with the following error:

Code: [Select]
CMake Error at c:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find SFML (missing: SFML_SYSTEM_LIBRARY SFML_WINDOW_LIBRARY
  SFML_NETWORK_LIBRARY SFML_GRAPHICS_LIBRARY SFML_AUDIO_LIBRARY) (Required is
  at least version "2")
Call Stack (most recent call first):
  c:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  c:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindSFML.cmake:67 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/SFML/CMakeLists.txt:22 (find_package)

(which is the same message as in my post from friday, as far as I see.)

I noticed one interesting thing: If I don't tell cmake to set SFMLDIR to the appropriate path I get this error message:
Code: [Select]
CMake Error at c:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find SFML (missing: SFML_INCLUDE_DIR SFML_SYSTEM_LIBRARY
  SFML_WINDOW_LIBRARY SFML_NETWORK_LIBRARY SFML_GRAPHICS_LIBRARY
  SFML_AUDIO_LIBRARY) (Required is at least version "2")
Call Stack (most recent call first):
  c:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  c:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindSFML.cmake:67 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/SFML/CMakeLists.txt:22 (find_package)

, which, as you can see, differs in that cmake cannot even find SFML's include dir. This leads me to the conclusion, that cmake uses SFMLDIR to search for the include dir, but ignores it when looking for the lib-dir, for some reason. Or am I wrong?

btw: I really appreciate your help and hope, we can resolve this issue.

6
C / CSFML and cmake configuration problem
« on: November 22, 2010, 01:48:18 pm »
Quote
How is it supposed to know that? It's not a standard path, and there's nothing written in the registry or in a config file Wink

I didn't tell cmake to use that path, so it seems to be the standard path in my setup. I am using msys, which caused some strange behaviour with paths before. (But cmake can generate Makefiles specifically for msys, so ideally this should just work.) What would be a standard path?

Quote
You need to add a variable in CMake, named SFMLDIR and equal to the path ("C:/Program Files/SFML/").


I added
Code: [Select]
set(SFMLDIR "C:/Program Files/SFML/") to
Code: [Select]
bindings/c/CMakeLists.txt. Is this what you meant? The result stays the same though. I also toyed around and tried
    passing -DSFMLDIR="C:/Program Files/SFML/" to cmake;

    trying the above solutions while escaping the space in the path;

    installing in a unix-like path under msys without spaces (with -DCMAKE_INSTALL_PREFIX=/usr/local);


all without success. I am a bit out of ideas, what else to try. Any advice?

7
C / CSFML and cmake configuration problem
« on: November 19, 2010, 06:54:03 pm »
I ran into a similar problem, this time on windows XP using minGW and msys:
Code: [Select]

$ cmake -G "MSYS Makefiles"  ..

[snip]

CMake Error at c:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find SFML (missing: SFML_SYSTEM_LIBRARY SFML_WINDOW_LIBRARY
  SFML_NETWORK_LIBRARY SFML_GRAPHICS_LIBRARY SFML_AUDIO_LIBRARY) (Required is
  at least version "2")
Call Stack (most recent call first):
  c:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  c:/Program Files/CMake 2.8/share/cmake-2.8/Modules/FindSFML.cmake:67 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  src/SFML/CMakeLists.txt:22 (find_package)


, although both the "Debug" and the "Release" versions are installed. Installing SFML reported, that things where installed in
Code: [Select]
C:/Program Files/SFML/, but cmake doesn't seem to be able to find it there.

I tried to fix this, but without any success. Which is probably cause my knowledge of cmake is not very profound.

Can I fix this easily?

8
Window / getting game pad events without showing a window
« on: November 19, 2010, 05:09:28 pm »
Quote
SFML is not made for that, the input stuff is not independant. I'm sure you can find dedicated IO libraries, like OIS. And what about Qt, it doesn't handle joysticks at all?

Qt doesn't handle joysticks at all :(. Our project already uses SFML for audio output, so I thought it would be natural to use it for gamepad stuff, too. But I am going to look at OIS...

Thanks for the quick reply.

9
Window / getting game pad events without showing a window
« on: November 19, 2010, 04:35:23 pm »
I want to use SFML for platform-independent gamepad support, but I already have a working GUI using Qt. I looked at the Qt sample in SFML-1.6, which seems to be very close to what I want.

Question 1: Does this still work with SFML-2 from svn? More specifically: Is SFML's WindowHandle type still compatible with Qt's WId type? On all supported platforms? (This is at least how I understand the usage in the 1.6 sample.)

Question 2: Is this possible at all? I think, I would need to create a Window-object, that does not open an actual window on the screen, nor creates an openGL-context.

Any insight appreciated.

10
C / CSFML and cmake configuration problem
« on: November 18, 2010, 10:48:10 pm »
It might be a preliminary solution to just install both the debug and the release versions of SFML by default.

11
C / CSFML and cmake configuration problem
« on: November 18, 2010, 09:31:49 pm »
Hi!

I just saw, that sfml switched to cmake in the version 2 branch. That's great! I have a problem building CSFML, though: When trying to do the cmake configuration I get:

Code: [Select]
#:~/src/sfml2/bindings/c/build$ cmake ..
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
SFML_AUDIO_LIBRARY_DEBUG
    linked by target "csfml-audio" in directory /home/shahn/src/sfml2/bindings/c/src/SFML/Audio
SFML_GRAPHICS_LIBRARY_DEBUG
    linked by target "csfml-graphics" in directory /home/shahn/src/sfml2/bindings/c/src/SFML/Graphics
SFML_NETWORK_LIBRARY_DEBUG
    linked by target "csfml-network" in directory /home/shahn/src/sfml2/bindings/c/src/SFML/Network
SFML_SYSTEM_LIBRARY_DEBUG
    linked by target "csfml-system" in directory /home/shahn/src/sfml2/bindings/c/src/SFML/System
    linked by target "csfml-window" in directory /home/shahn/src/sfml2/bindings/c/src/SFML/Window
    linked by target "csfml-network" in directory /home/shahn/src/sfml2/bindings/c/src/SFML/Network
    linked by target "csfml-graphics" in directory /home/shahn/src/sfml2/bindings/c/src/SFML/Graphics
    linked by target "csfml-audio" in directory /home/shahn/src/sfml2/bindings/c/src/SFML/Audio
SFML_WINDOW_LIBRARY_DEBUG
    linked by target "csfml-window" in directory /home/shahn/src/sfml2/bindings/c/src/SFML/Window
    linked by target "csfml-graphics" in directory /home/shahn/src/sfml2/bindings/c/src/SFML/Graphics

-- Configuring incomplete, errors occurred!


It seems to work, when you installed both the release and the debug version of SFML. If you just want a release build, it fails like described.

Using Ubuntu 10.10, x86_64, branches/sfml2 revision 1671

(btw: is this the right place for questions like this? I didn't find an active bug tracker.)

12
Audio / delay in Sound.Play() (Windows XP)
« on: April 15, 2010, 05:02:08 pm »
Yay, it works!

With the sfml2 svn snapshot there is no notable delay. I am looking for a platform independent sound library for some time now, so sfml made my day! Also the separation between the different modules of sfml (system, audio, etc.) comes in really handy in my case.

Many thanks!

13
General / Compiling sfml2 with mingw (without Codeblocks)
« on: April 13, 2010, 01:36:03 pm »
Hi!

I am trying to compile the sfml2 svn snapshot with mingw (without Codeblocks on Windows XP). When invoking "make", I get the following error:

Code: [Select]

../../src/SFML/System/Thread.o:C:\msys\1.0\home\Administrator\nikki\playground\sfml\sfml2\build\make/../../src/SFML/System/Thread.cpp:97: undefined reference to `sf::priv::ThreadImpl::~ThreadImpl()'


(and the same for line 85)

My guess is, that this has something to do with the platform-dependent implementation of threads (although this might just be a wild guess).

So my question is this: Is it supported to compile sfml like this? AKA Is this just a temporary failure in svn that will be fixed?

Or should I use Codeblocks to compile sfml2? (From what I understand, using Codeblocks (with the mingw-compiler) is "the SFML-way" (tm) to compile things on windows. So I guess this problem doesn't exist when using Codeblocks.

Thanks for any advice.

14
Audio / delay in Sound.Play() (Windows XP)
« on: April 12, 2010, 01:55:57 pm »
With SFML 1.5 the problem is the same.

I didn't manage to compile the SFML 2.0 snapshot yet. I will look into that tomorrow... Is the snapshot created every day from svn?

15
Audio / delay in Sound.Play() (Windows XP)
« on: April 09, 2010, 07:00:59 pm »
The code is something like this:

Code: [Select]

#include <iostream>
using namespace std;

#include <SFML/Audio.hpp>

void debug(string msg) {
    cout << msg << "\n";
};

int main() {
    sf::SoundBuffer buffer = sf::SoundBuffer();
    if (!buffer.LoadFromFile("sound.wav")) {
        debug("error in SFML-AUDIO::cpp::loadFromFile");
    };

    sf::Sound sound = sf::Sound();
    sound.SetBuffer(buffer);

    for (int i = 0; i < 10; i++) {
        sound.Play();
        debug("Play() called");
        Sleep(2000);
    };
};


(note: Sleep() is from the Win32 api, not sf::Sleep() from sfml.)

Of course, it's not that exact to just look at the console and try to see (and hear) a delay between the console output and the sound, but it's definitely a much smaller delay on Linux.

Additionally I wrote a testing program that triggers a sound for every keystroke. It uses Qt and is written in Haskell (calling sfml-audio functions via minimal bindings), so I won't post it here (unless someone wants me to). With this interactive program it's easy to verify, that sound playback is not as snappy as it should be.

Quote

Do you use the openal32 DLL provided in the SFML SDK?

I hope so. I put the open32.dll-file that comes with sfml into the same folder as the executable. (And I get an error if I don't. But there is another openal32.dll on my system and I am always confused where windows looks for dlls.)

Thanks for your quick help.

Pages: [1] 2