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.


Topics - nonexistent

Pages: [1]
1
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.

2
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?

3
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?

4
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]