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

Pages: [1]
1
C / Re: Building CSFML 2.0 on Windows
« on: November 06, 2012, 11:35:32 pm »
Thanks for the clarification, I've edited my original post

2
C / Re: Building CSFML 2.0 on Windows
« on: November 05, 2012, 08:37:27 am »
Quote
Above this line add the following:
set(SFML_ROOT "C:/Program Files (x86)/SFML")
set(SFML_SYSTEM_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-system.lib")
[...]
No! This is exactly what the find_package function does, it finds everything for you automatically.

If something needed to be added to the CSFML build files, it would already been done don't you think? ;)
They work out of the box, if you need to change something then you're wrong.

It works perfectly without modification on Linux but I had to do this for Windows.  I certainly don't know CMake particularly well so it's entirely possible I'm doing something wrong.  For what it's worth though, my system is running 64-bit Win 7, Cmake 2.8.10, and nmake from VS 11.  I also tried CMake 2.8.9, 2.8.8, 2.8.7 with the same results.

In another thread someone mentioned that the install script for SFML used to copy FindSFML.cmake into the CMake share/Modules directory, but it was changed to no longer do this.  I'm assuming the CSFML is supposed to see this from from the SFML install directory w/ SFML_ROOT?

On that note, did I miss a configuration step setting SFML_ROOT?  The CSFML CMake couldn't find its value until I explicitly set it on my machine.

3
C / Building CSFML 2.0 on Windows
« on: November 04, 2012, 02:35:22 pm »
Nevermind, see: Laurent's post below
(The instructions below are for the latest SFML and CSFML source from github as of the time of writing)

Figuring out how to get CSFML 2.0 to build on Windows took me a while so to save others some time here's what you need to:

After building SFML 2.0 copy cmake/Modules/FindSFML.cmake into the CSFML directory cmake/Modules (you'll need to mkdir Modules).

Open up src/SFML/CMakeLists.txt from the CSFML directory and find the line:
find_package(SFML 2.0 COMPONENTS system window network graphics audio REQUIRED)

Above this line add the following:
set(SFML_ROOT "C:/Program Files (x86)/SFML")
set(SFML_SYSTEM_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-system.lib")
set(SFML_WINDOW_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-window.lib")
set(SFML_NETWORK_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-network.lib")
set(SFML_GRAPHICS_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-graphics.lib")
set(SFML_AUDIO_LIBRARY_RELEASE "${SFML_ROOT}/lib/sfml-audio.lib")
set(SFML_SYSTEM_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-system-d.lib")
set(SFML_WINDOW_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-window-d.lib")
set(SFML_NETWORK_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-network-d.lib")
set(SFML_GRAPHICS_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-graphics-d.lib")
set(SFML_AUDIO_LIBRARY_DEBUG "${SFML_ROOT}/lib/sfml-audio-d.lib")

(SFML_ROOT should be set to wherever you installed SFML 2.0)

And now cmake should be happy and you can build CSFML, etc.

4
Graphics / Black outline when rendering sprite
« on: March 12, 2010, 08:10:20 pm »
Here is the 256x64 image


It is the same as the original except padded w/ additional transparent pixels.

5
Graphics / Black outline when rendering sprite
« on: March 12, 2010, 03:40:29 am »
Hmm, very interesting.  I made a mistake posting the original image, that's not the one I am loading in my file.  I extended the image size to the closest powers of 2 to make it 256x64.  The loaded 256x64 image displays the black outline problem, but loading the original 224x43 image renders correctly.

Does SFML do something special internally w/ power of 2 textures?  I've been manually image editing all my textures to be powers of 2 to account for older graphics cards.

6
Graphics / Black outline when rendering sprite
« on: March 10, 2010, 08:59:57 am »
Yes, that is the exact image I am loading from file.  Thanks for the quick replies so far!

7
Graphics / Black outline when rendering sprite
« on: March 10, 2010, 02:36:08 am »
Calling SetSmooth(false) on the image resulted in no graphical difference unfortunately  :(  None of the sprite Blend Modes aside from Alpha seem to allow transparency, so that's no good either.

8
Graphics / Black outline when rendering sprite
« on: March 09, 2010, 10:36:33 pm »
Hi, I'm getting a black outline on a sprite when rendering in SFML.  The original grass image looks like:



and rendered in SFML looks like:



The sprite is loaded into an Image, stuck in a Sprite, and rendered with RenderWindow's Draw().  I haven't calling any resizing or scaling functions on the sprite.

I'm guessing this is some sort of side effect of the alpha blending in the sprite blend mode.  Any ideas to minimize this unwanted outline?

9
Python / Drawing Shape.Rectangle crashes on Windows
« on: March 09, 2010, 10:27:50 pm »
Tank: I wrote a minimal example and that runs correctly for some reason.  I guess it must have been some quirk with the previous project I was working on  :?:

Oh well, guess things are fine now.  I had hacked together a draw rectangle function to work around this earlier by drawing a resized blank sprite.

10
Python / Drawing Shape.Rectangle crashes on Windows
« on: October 25, 2009, 04:48:24 pm »
I have a bit of code that draws a rectangle on the screen:

Code: [Select]
drawRect = Shape.Rectangle(rect.Left, rect.Top, rect.Right, rect.Bottom, Color.Green)
renderWindow.Draw(drawRect)


This works fine in Linux but crashes running under Windows (no error output in console before the program dies).  This same behavior occurs on two of my team's computers (both Windows Vista).  We are using Python3.0 and PySFML 1.5.

Is this a bug anyone has encountered before?

11
Python / Problems running PySFML with Python3.0
« on: August 06, 2009, 05:55:54 am »
Quote from: "remi.k2620"
Quote from: "nonexistent"
So unless I am overlooking something I definitely do not have a conflict with an older PySFML.

I suggested a conflict with an older sfml, not an older pysfml. What does ls /usr/lib/libsfml* output ?


Whoops... I've been parsing your posts with "sfml" automatically as "PySFML".  You were right from the start, I had an old SFML 1.4 in my /usr/lib.  I should probably read things more carefully...  :oops:   Anyway thanks, things are working now.

12
Python / Problems running PySFML with Python3.0
« on: August 05, 2009, 10:17:59 am »
Quote from: "remi.k2620"
Quote from: "Laurent"
Remi, did you bind sf::Sound::SetRelativeToListener? It is a new function (maybe even the only one!) in SFML 1.5.


Yes, and there is also sf::Sound::IsRelativeToListener, see http://sfml.svn.sourceforge.net/viewvc/sfml/tags/1.5/python/src/Sound.cpp?r1=1056&r2=1064
So nonexistent you probably have an older version of sfml installed somewhere.


I have PySFML 1.4 installed for Python 2.6, but I do not think this would affect Python 3.0.  Just to be safe, I removed the 1.4 files from site-packages for Python 2.6.

If I remove PySFML 1.5 from site-packages in Python 3.0 and try to run a PySFML program, I will get the error:

Traceback (most recent call last):
  File "ex1.py", line 2, in <module>
    from PySFML import sf
ImportError: No module named PySFML

If I then go back and rebuild and reinstall PySFML 1.5 from source as specified in my previous post, I still get this "undefined symbol: _ZNK2sf5Sound20IsRelativeToListenerEv" error.

So unless I am overlooking something I definitely do not have a conflict with an older PySFML.

13
Python / Problems running PySFML with Python3.0
« on: August 04, 2009, 03:22:37 am »
Quote from: "remi.k2620"
Make sure you have well installed the sfml librairies, with the good version.


I am quite sure this is the case unless something is wrong with the following:

I downloaded SFML-1.5-sdk-linux-32.tar.gz and SFML-1.5-python-sdk.zip from the SFML downloads page.  After extracting both I built and installed from the python folder from SFML-1.5-python-sdk.zip with "python3.0 setup.py build; sudo python3.0 setup.py install".

Still looking for a solution.

14
Python / Problems running PySFML with Python3.0
« on: August 03, 2009, 12:41:47 am »
Hello, I'm having some problems running PySFML programs.  My system is 32-bit Arch Linux.  I have python3.0 installed, and installed the full PySFML 1.5 SDK.  If I try to run a simple hello world SFML program:

Code: [Select]
from PySFML import sf

window = sf.RenderWindow(sf.VideoMode(800, 600), "Floating")
text = sf.String("Hello SFML")

running = True
while running:
    event = sf.Event()
    while window.GetEvent(event):
        if event.Type == sf.Event.Closed:
            running = False

    window.Clear(sf.Color.Black)
    window.Draw(text)
    window.Display()


I get the error:

Traceback (most recent call last):
  File "ex1.py", line 2, in <module>
    from PySFML import sf
ImportError: /usr/local/lib/python3.0/site-packages/PySFML/sf.so: undefined symbol: _ZNK2sf5Sound20IsRelativeToListenerEv

I tried editing the python setup.py installer as specified in http://www.sfml-dev.org/wiki/en/tutorials/installpysfml and reinstalling, but it made no difference.

Does anyone know what the problem is?

Pages: [1]