SFML community forums

General => General discussions => Topic started by: Laurent on December 12, 2007, 04:48:16 am

Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 12, 2007, 04:48:16 am
Hi :)

I'm going to release the version 1.2 of SFML (probably by the end of the month).

Before releasing it, I need to make sure that everything is still working fine and no new bug have been introduced.

So, everyone who can use SVN is invited to get, compile and run the current version, and report any bug.

The list of what have been done since last version is still on the roadmap page of the website.

The C wrapper for SFML is also available, under the CSFML folder. All the packages except Graphics have been wrapped and are ready to be tested. I'm going to finish the Graphics wrapper very soon.

Please note that the MacOS port, as well as RubySFML have not been updated yet.

Thanks ;)
Title: [SOLVED] SFML 1.2 RC
Post by: Lord Delvin on December 12, 2007, 10:50:51 am
Ubuntu 7.10 am64:
I had to change graphics to shared lib to build at all. I got
Code: [Select]

/usr/bin/ld: ./libjpeg/jcapimin.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC
./libjpeg/jcapimin.o: could not read symbols: Bad value
(this will appear for all libs, tried that:) )

After some changes regarding windowstyle and rebuilding my project I got the following error during startup:

Code: [Select]

BF][: SOIL/stb_image_aug.c:1568: fill_bits: Assertion `code_buffer < (1U << num_bits)' failed.
./valtest.sh: line 1: 15033 Aborted                 (core dumped) valgrind --log-file-exactly=valgrind.txt --leak-check=full ./BF\]\[ > out.txt



Edit: graphics is build with(dont know if this is really usefull information)
Code: [Select]
g++ -shared -Wl,-soname,libsfml-graphics.so.1 -o ../../../lib/libsfml-graphics.so.1 Color.o Drawable.o FontManager.o GraphicsDevice.o Image.o ImageLoader.o PostFX.o RenderWindow.o Sprite.o String.o VideoResource.o View.o ./libjpeg/jcapimin.o ./libjpeg/jcapistd.o ./libjpeg/jccoefct.o ./libjpeg/jccolor.o ./libjpeg/jcdctmgr.o ./libjpeg/jchuff.o ./libjpeg/jcinit.o ./libjpeg/jcmainct.o ./libjpeg/jcmarker.o ./libjpeg/jcmaster.o ./libjpeg/jcomapi.o ./libjpeg/jcparam.o ./libjpeg/jcphuff.o ./libjpeg/jcprepct.o ./libjpeg/jcsample.o ./libjpeg/jctrans.o ./libjpeg/jdapimin.o ./libjpeg/jdapistd.o ./libjpeg/jdatadst.o ./libjpeg/jdatasrc.o ./libjpeg/jdcoefct.o ./libjpeg/jdcolor.o ./libjpeg/jddctmgr.o ./libjpeg/jdhuff.o ./libjpeg/jdinput.o ./libjpeg/jdmainct.o ./libjpeg/jdmarker.o ./libjpeg/jdmaster.o ./libjpeg/jdmerge.o ./libjpeg/jdphuff.o ./libjpeg/jdpostct.o ./libjpeg/jdsample.o ./libjpeg/jdtrans.o ./libjpeg/jerror.o ./libjpeg/jfdctflt.o ./libjpeg/jfdctfst.o ./libjpeg/jfdctint.o ./libjpeg/jidctflt.o ./libjpeg/jidctfst.o ./libjpeg/jidctint.o ./libjpeg/jidctred.o ./libjpeg/jmemmgr.o ./libjpeg/jmemnobs.o ./libjpeg/jquant1.o ./libjpeg/jquant2.o ./libjpeg/jutils.o ./libpng/png.o ./libpng/pngerror.o ./libpng/pnggccrd.o ./libpng/pngget.o ./libpng/pngmem.o ./libpng/pngpread.o ./libpng/pngread.o ./libpng/pngrio.o ./libpng/pngrtran.o ./libpng/pngrutil.o ./libpng/pngset.o ./libpng/pngtrans.o ./libpng/pngvcrd.o ./libpng/pngwio.o ./libpng/pngwrite.o ./libpng/pngwtran.o ./libpng/pngwutil.o ./SOIL/image_DXT.o ./SOIL/SOIL.o ./SOIL/stb_image_aug.o ./zlib/adler32.o ./zlib/compress.o ./zlib/crc32.o ./zlib/deflate.o ./zlib/inffast.o ./zlib/inflate.o ./zlib/inftrees.o ./zlib/trees.o ./zlib/uncompr.o ./zlib/zutil.o -lfreetype
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 12, 2007, 11:00:19 am
Quote
Code: [Select]
/usr/bin/ld: ./libjpeg/jcapimin.o: relocation R_X86_64_32 against `a local symbol' can not be used when making a shared object; recompile with -fPIC

Oops, I forgot to use -fPIC for external C libraries in the Linux makefiles. I'll add it, thanks.

Quote
Code: [Select]
SOIL/stb_image_aug.c:1568: fill_bits: Assertion `code_buffer < (1U << num_bits)' failed.

What type of image are you trying to load ? Are you sure it is a valid one ? Can you upload it somewhere, so that I can do more testing ?
Title: [SOLVED] SFML 1.2 RC
Post by: Lord Delvin on December 12, 2007, 11:17:40 am
Quote from: "Laurent"

What type of image are you trying to load ? Are you sure it is a valid one ? Can you upload it somewhere, so that I can do more testing ?

[...]

Edit:
It crashs before main in normal execution and using valgrind it passes until initialisation of the window(it pops up and imidiately crashes without any texture creation so I'd guess I missed to link with something).
Title: [SOLVED] SFML 1.2 RC
Post by: CareBear on December 14, 2007, 11:40:50 am
Hurray!

I'm happy to hear that the C-Interface is implemented.
I hope somebody will make bindings for "D" (http://www.digitalmars.com/d/index.html), otherwise I'll need to try it :)
Title: [SOLVED] SFML 1.2 RC
Post by: Srejv on December 14, 2007, 04:44:53 pm
Code: [Select]
make[1]: Entering directory `/root/sfml/src/SFML'
make[2]: Entering directory `/root/sfml/src/SFML/System'
g++ -o Clock.o -c Clock.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -o Lock.o -c Lock.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -o Randomizer.o -c Randomizer.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -o Sleep.o -c Sleep.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -o Unix/Mutex.o -c Unix/Mutex.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -o Unix/Platform.o -c Unix/Platform.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -o Unix/Thread.o -c Unix/Thread.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -shared -Wl,-soname,libsfml-system.so.1 -o ../../../lib/libsfml-system.so.1 Clock.o Lock.o Randomizer.o Sleep.o ./Unix/Mutex.o ./Unix/Platform.o ./Unix/Thread.o -lpthread
make[2]: Leaving directory `/root/sfml/src/SFML/System'
make[2]: Entering directory `/root/sfml/src/SFML/Window'
g++ -o Input.o -c Input.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -o OpenGLCaps.o -c OpenGLCaps.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -o VideoMode.o -c VideoMode.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -o Window.o -c Window.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -o WindowImpl.o -c WindowImpl.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
g++ -o Linux/Joystick.o -c Linux/Joystick.cpp -W -Wall -pedantic -fPIC -I../.. -DNDEBUG -O2
Linux/Joystick.cpp:36: error: expected constructor, destructor, or type conversion before 'namespace'
make[2]: *** [Linux/Joystick.o] Error 1
make[2]: Leaving directory `/root/sfml/src/SFML/Window'
make[1]: *** [sfml-window] Error 2
make[1]: Leaving directory `/root/sfml/src/SFML'
make: *** [sfml] Error 2


Using gentoo, gcc. Latest svn (362).  :(
Title: [SOLVED] SFML 1.2 RC
Post by: Lord Delvin on December 14, 2007, 07:21:09 pm
Quote from: "CareBear"
Hurray!

I'm happy to hear that the C-Interface is implemented.
I hope somebody will make bindings for "D" (http://www.digitalmars.com/d/index.html), otherwise I'll need to try it :)

Isn't C a subset of D as in C++?
Title: [SOLVED] SFML 1.2 RC
Post by: CareBear on December 14, 2007, 10:31:42 pm
Quote from: "Lord Delvin"
...

Yes, but they still need by declared by a "extern (C)".

See: http://www.digitalmars.com/d/interfaceToC.html

So should no big thing.
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 15, 2007, 03:07:30 am
Quote
Linux/Joystick.cpp:36: error: expected constructor, destructor, or type conversion before 'namespace'

Yep, a bad copy and paste. It's ok now.
Title: Re: SFML 1.2 RC
Post by: T.T.H. on December 15, 2007, 02:14:56 pm
Hi there!

I recently stumbled over SFML and have to admit that I really, really like its OOP design and intuitive API (after spending weeks over weeks on getting SDL surfaces in the right color layout pattern which fits my needs regarding performance and transparency *ugh*)

Quote from: "Laurent"
All the packages except Graphics have been wrapped and are ready to be tested. I'm going to finish the Graphics wrapper very soon.

Please give us a hint when you're done with that because I'd be most/only interested in the graphics part of SFML and would happily test your RC (if my spare time before christmas permits *sigh*)

In addition I'd really welcome if the "SFML vs SDL benchmarking tool" you wrote will get part of the SFML repository, just like all the other examples. I intend to experiment a bit with that because after I ported my little prototype from SDL to SFML the performance actually got much, much worse and currently I have absolutely no clue why the software rendering of SDL is so much better than the OpenGL powered hardware rendering of SFML in my personal case. And I want to find out why.

Finally I'd suggest to put some images/screenshots in the tutorial section of the SFML website (at least the graphic related part) because a picture can say more than thousand words. Most people looking for multimedia libraries want to see what the advertised library can accomplish and not necessarily read how the coding part works (well, real geeks go nuts about such stuff, too).

Bye,
T.T.H.
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 15, 2007, 02:49:21 pm
Quote
Please give us a hint when you're done with that because I'd be most/only interested in the graphics part of SFML and would happily test your RC (if my spare time before christmas permits *sigh*)

Sure ;)

Quote
In addition I'd really welcome if the "SFML vs SDL benchmarking tool" you wrote will get part of the SFML repository, just like all the other examples

You can get the latest version here, compiled with SFML 1.2 RC :
http://sfml.sourceforge.net/temp/bench-sdl-sfml.zip

Quote
I intend to experiment a bit with that because after I ported my little prototype from SDL to SFML the performance actually got much, much worse and currently I have absolutely no clue why the software rendering of SDL is so much better than the OpenGL powered hardware rendering of SFML in my personal case. And I want to find out why.

If you really get problems with it, you can post your code here on the forum, so that we can have a look at it.

Quote
Finally I'd suggest to put some images/screenshots in the tutorial section of the SFML website (at least the graphic related part) because a picture can say more than thousand words. Most people looking for multimedia libraries want to see what the advertised library can accomplish and not necessarily read how the coding part works (well, real geeks go nuts about such stuff, too).

In fact there is not much to show, even in the graphics tutorials. For people who want to see screenshots, I've put some old ones on the SF.net page (there's a screenshot page).
I think the most impressive to show will be the coming real-size projects using SFML ;)

Thanks for your feedback.
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 16, 2007, 03:37:45 pm
The C wrapper is now 100% complete.

For the moment, only Visual Studio 2005 project files are provided, but I'm going to add Linux makefiles soon.
Title: [SOLVED] SFML 1.2 RC
Post by: T.T.H. on December 17, 2007, 11:14:13 am
Quote from: "Laurent"
If you really get problems with it, you can post your code here on the forum, so that we can have a look at it.

Ooookay, that's an offer :D

I've now (within the last 2 hours) written a minimalistic program to demonstrate my performance issues. Sourcecode can be found here (http://www.teeteehaa.de/SFML/TestSFMLvsSDL.cpp) and a ZIP file including a VS2005 project, an image, the required libraries and a precompiled binary can be found here (http://www.teeteehaa.de/SFML/TestSFMLvsSDL.zip).

There is two variables called SPRITE_WIDTH_DEST and SPRITE_HEIGHT_DEST at the beginning of the code which define the output size of the sprite which then gets drawn all over the 800x600 screen. The input size of the sprite is 32x32 pixel from the center of a 96x96 pixel image. The results are the following (numbers are the output sprite size):

SFML 100x100: 106 FPS
SDL 100x100: 103 FPS
SFML 32x32: 11 FPS
SDL 32x32: 122 FPS
SFML 10x10: 2 FPS
SDL 10x10: 114 FPS

As you can see SFML gets a major drop in FPS when you scale down the output sprite size while SDL can keep up nearly the same FPS. I am really wondering why...

SFML version: subversion repository as of 1. December 2007
SDL version: 1.2.11
SDLgfx version: 2.0.16

My computer is a AMD Athlon XP 2000+ running at 1.7 GHz with 1 GB Ram and a Sapphire ATI Radeon 9800 Pro with 128 MB Ram. Operation system is Windows 2000 and I am using Visual Studio 2005 Express.
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 17, 2007, 01:14:49 pm
The new version introduces a safer but slower code (related to internal states). If you're not going to mix with custom OpenGL calls, you can disable it to get the maximum performances.
Try to add this magic line after the RenderWindow creation :
Code: [Select]
MyRenderWindow.OptimizeForNonOpenGL(true);
;)
Title: [SOLVED] SFML 1.2 RC
Post by: T.T.H. on December 18, 2007, 07:56:00 pm
Quote from: "Laurent"
Try to add this magic line after the RenderWindow creation :
Code: [Select]
MyRenderWindow.OptimizeForNonOpenGL(true);

Ooookay, nice hint:

SFML 100x100: 106 FPS -> 1170 FPS
SFML 32x32: 11 FPS -> 500 FPS
SFML 10x10: 2 FPS -> 70 FPS

Why not make this the default? Performance is one of the key features people do care about when stumbling over new libraries.

Can you maybe automatically disable that optimization when you "give out" the handles one needs for custom OpenGL calls?

If developers came so far to cram custom OpenGL calls into SFML's API then they should have already come across the warning in the documentation "to ensure safe mixing SFML and custom OpenGL calls please disable optimiziation by...".

Just my 2 cents. And thanks for the hint!  :D
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 19, 2007, 02:19:40 am
It seems obvious to me that the best implementation is the one which works for everyone by default.
I prefer to see a few people saying "my application rendering 1000 sprites is quite slow", than much more saying "I can't make OpenGL work at all" ;)

Something else : I want to keep a consistent default behaviour with sf::Window, as it's now a public base of sf::RenderWindow.
Title: [SOLVED] SFML 1.2 RC
Post by: Srejv on December 25, 2007, 03:49:51 pm
Okay, so I've done the following in gentoo linux:

Code: [Select]
svn co https://sfml.svn.sourceforge.net/svnroot/sfml sfml
cd sfml
make
make install


Then, created a new file test.cpp, the code:


Code: [Select]

#include <SFML/Graphics.hpp>

int main()
{
  sf::Window App(sf::VideoMode(800,600,32), "Test");
 
  bool Running = true;
  while(Running)
  {
     App.Display();
  }

  return EXIT_SUCCESS;
}


It compiles just fine but I'm getting "Segmentation fault" when running it.  :(

(I did this just 3 minutes ago)
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 25, 2007, 04:38:02 pm
What is your graphics card ?

Would you be able to run gdb to know exactly where the crash occurs ?
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 26, 2007, 03:48:36 am
One more thing... The /include folder is not up to date (it's updated only when I make a new release), so if you use the SVN sources you should use the /src folder in your include path, instead of /include.
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 26, 2007, 08:32:43 am
This folder layout was a bit more convenient for me, but it really caused issues to people using SVN.

I just changed it, so that the public headers in /include will now always be up to date.
Title: [SOLVED] SFML 1.2 RC
Post by: Srejv on December 27, 2007, 02:40:09 pm
Quote from: "Laurent"
This folder layout was a bit more convenient for me, but it really caused issues to people using SVN.

I just changed it, so that the public headers in /include will now always be up to date.


It works now, so I guess that fixed it. :) Thank you.
Title: [SOLVED] SFML 1.2 RC
Post by: herc on December 28, 2007, 01:43:53 pm
i am currently on a very slow modem connection, so i ask directly, before looking at svn:

does the new rc include the new image loaders, that are independent from external image libs like libjpeg or libpng ?
Title: [SOLVED] SFML 1.2 RC
Post by: dabo on December 29, 2007, 12:59:37 pm
Any news on the release date?
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 29, 2007, 01:12:13 pm
Quote
does the new rc include the new image loaders, that are independent from external image libs like libjpeg or libpng ?

Yes it does, no more external libraries are needed to run the graphics package (except FreeType, but it is now linked statically on Windows).
Actually it also uses libjpeg and libpng, but the code is included directly into SFML, so that you don't have any external dependency.

Quote
Any news on the release date?

Should be very soon. The C++ and C parts are ok, and the Ruby and Python bindings should be ready in a few days. The only thing I'm not sure of is the OSX port, as its maintainer seems to have very little time to update it.
Title: [SOLVED] SFML 1.2 RC
Post by: Jowee on December 29, 2007, 06:42:56 pm
Couldn't you do a pre-release of it?
Title: [SOLVED] SFML 1.2 RC
Post by: CareBear on December 29, 2007, 09:42:50 pm
Quote from: "Jowee"
Couldn't you do a pre-release of it?


Install: http://tortoisesvn.net/downloads
And checkout the trunk: https://sfml.svn.sourceforge.net/svnroot/sfml
Title: [SOLVED] SFML 1.2 RC
Post by: Jowee on December 30, 2007, 12:19:46 am
Already compiled everything but I mean some people have A LOT of problems with the compilation!
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on December 30, 2007, 07:15:50 am
Compiling SFML is really easy. The only hard part is the extra step needed to build the static libraries with MinGW ; but then if it's too troublesome just build the dynamic libraries, or install VC++ Express ;)
Title: [SOLVED] SFML 1.2 RC
Post by: T.T.H. on January 01, 2008, 05:23:26 pm
Hi there!

Short feedback for you: I just checked out revision 408 of SFML and compiled it with VC2005 Express under Windows 2000 - basically without any troubles (see below for details).

My own application is still running fine, I just had to rename "sf::Event::Close" to "sf::Event::Closed". In addition it's nice that there is no need for any additional DLLs anymore :)

I'm currently using the following libraries in my own application:

winmm.lib sfml-system.lib sfml-window.lib sfml-graphics.lib
winmm.lib sfml-system-d.lib sfml-window-d.lib sfml-graphics-d.lib

FYI: for the all the multithreading stuff I'm using Boost (http://www.boost.org).

One problem I noticed so far is the following output on std::cerr when my application is closing. But please note that this is only happening in Debug mode, not in Release mode, and I have not investigated it further yet.

Code: [Select]
An internal OpenGL call failed in renderwindow.cpp (234) : GL_INVALID_OPERATION,
 the specified operation is not allowed in the current state
An internal OpenGL call failed in renderwindow.cpp (235) : GL_INVALID_OPERATION,
 the specified operation is not allowed in the current state
An internal OpenGL call failed in image.cpp (517) : GL_INVALID_OPERATION, the sp
ecified operation is not allowed in the current state
   [...same error a couple of times...]
An internal OpenGL call failed in image.cpp (517) : GL_INVALID_OPERATION, the sp
ecified operation is not allowed in the current state



Regarding compilation of SFML: here's the build log, stripped by the "everything is fine" parts:
(note: I neither have Qt no wxWidgets installed)

Code: [Select]

------ Build started: Project: sfml-window, Configuration: Release static Win32 ------
Creating library...
winmm.lib(WINMM.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in opengl32.lib(OPENGL32.dll); second definition ignored
winmm.lib(WINMM.dll) : warning LNK4221: no public symbols found; archive member will be inaccessible
sfml-window - 0 error(s), 2 warning(s)

------ Build started: Project: sfml-window, Configuration: Debug static Win32 ------
Creating library...
winmm.lib(WINMM.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in opengl32.lib(OPENGL32.dll); second definition ignored
winmm.lib(WINMM.dll) : warning LNK4221: no public symbols found; archive member will be inaccessible
sfml-window - 0 error(s), 2 warning(s)

------ Build started: Project: sfml-audio, Configuration: Release static Win32 ------
Creating library...
sndfile.lib(libsndfile-1.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in openal32.lib(OpenAL32.dll); second definition ignored
sndfile.lib(libsndfile-1.dll) : warning LNK4221: no public symbols found; archive member will be inaccessible
sfml-audio - 0 error(s), 2 warning(s)

------ Build started: Project: sfml-audio, Configuration: Debug static Win32 ------
Creating library...
sndfile.lib(libsndfile-1.dll) : warning LNK4006: __NULL_IMPORT_DESCRIPTOR already defined in openal32.lib(OpenAL32.dll); second definition ignored
sndfile.lib(libsndfile-1.dll) : warning LNK4221: no public symbols found; archive member will be inaccessible
sfml-audio - 0 error(s), 2 warning(s)

------ Build started: Project: sfml-graphics, Configuration: Release DLL Win32 ------
Linking...
   Creating library E:\myProjects8\SFML\vc2005\..\lib\vc2005\dynamic\sfml-graphics.lib and object E:\myProjects8\SFML\vc2005\..\lib\vc2005\dynamic\sfml-graphics.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Generating code
Finished generating code
Embedding manifest...
sfml-graphics - 0 error(s), 1 warning(s)

------ Build started: Project: sfml-graphics, Configuration: Debug DLL Win32 ------
Linking...
   Creating library E:\myProjects8\SFML\vc2005\..\lib\vc2005\dynamic\sfml-graphics-d.lib and object E:\myProjects8\SFML\vc2005\..\lib\vc2005\dynamic\sfml-graphics-d.exp
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Embedding manifest...
sfml-graphics - 0 error(s), 1 warning(s)

------ Build started: Project: postfx, Configuration: Release Win32 ------
Linking...
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Embedding manifest...
postfx - 0 error(s), 1 warning(s)

------ Build started: Project: postfx, Configuration: Debug Win32 ------
Linking...
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Embedding manifest...
postfx - 0 error(s), 1 warning(s)

------ Build started: Project: opengl, Configuration: Release Win32 ------
Linking...
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Embedding manifest...
opengl - 0 error(s), 1 warning(s)

------ Build started: Project: opengl, Configuration: Debug Win32 ------
Linking...
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Embedding manifest...
opengl - 0 error(s), 1 warning(s)

------ Build started: Project: wxwidgets, Configuration: Release Win32 ------
Compiling...
wxSFMLCanvas.cpp
e:\myprojects8\sfml\samples\wxwidgets\wxSFMLCanvas.hpp(9) : fatal error C1083: Cannot open include file: 'wx/wx.h': No such file or directory
Main.cpp
e:\myprojects8\sfml\samples\wxwidgets\wxSFMLCanvas.hpp(9) : fatal error C1083: Cannot open include file: 'wx/wx.h': No such file or directory
Generating Code...
wxwidgets - 2 error(s), 0 warning(s)

------ Build started: Project: wxwidgets, Configuration: Debug Win32 ------
Compiling...
Main.cpp
e:\myprojects8\sfml\samples\wxwidgets\wxsfmlcanvas.hpp(9) : fatal error C1083: Cannot open include file: 'wx/wx.h': No such file or directory
wxSFMLCanvas.cpp
e:\myprojects8\sfml\samples\wxwidgets\wxsfmlcanvas.hpp(9) : fatal error C1083: Cannot open include file: 'wx/wx.h': No such file or directory
Generating Code...
wxwidgets - 2 error(s), 0 warning(s)

------ Build started: Project: qt, Configuration: Release Win32 ------
Compiling...
QSFMLCanvas.cpp
e:\myprojects8\sfml\samples\qt\QSFMLCanvas.hpp(9) : fatal error C1083: Cannot open include file: 'Qt/qwidget.h': No such file or directory
Main.cpp
e:\myprojects8\sfml\samples\qt\QSFMLCanvas.hpp(9) : fatal error C1083: Cannot open include file: 'Qt/qwidget.h': No such file or directory
Generating Code...
qt - 2 error(s), 0 warning(s)

------ Build started: Project: qt, Configuration: Debug Win32 ------
Compiling...
Main.cpp
e:\myprojects8\sfml\samples\qt\qsfmlcanvas.hpp(9) : fatal error C1083: Cannot open include file: 'Qt/qwidget.h': No such file or directory
QSFMLCanvas.cpp
e:\myprojects8\sfml\samples\qt\qsfmlcanvas.hpp(9) : fatal error C1083: Cannot open include file: 'Qt/qwidget.h': No such file or directory
Generating Code...
qt - 2 error(s), 0 warning(s)

------ Build started: Project: pong, Configuration: Release Win32 ------
Linking...
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Embedding manifest...
pong - 0 error(s), 1 warning(s)

------ Build started: Project: pong, Configuration: Debug Win32 ------
Linking...
LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
Embedding manifest...
pong - 0 error(s), 1 warning(s)

========== Build: 40 succeeded, 4 failed, 0 up-to-date, 0 skipped ==========



The following examples are working fine:
win32
win32-d
window
window-d
sockets
sockets-d
opengl
opengl-d

The postfx and postfx-d examples start and even show some of the effects, but when I switch to other effects the application totally freezes.

I did not try any of the examples requiring OpenAL32.dll.


Hope this helps & happy new year,
T.T.H.
Title: [SOLVED] SFML 1.2 RC
Post by: Srejv on January 01, 2008, 10:28:07 pm
I just updated to latest SVN (408 I think)

Code: [Select]
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libsfml-graphics.so: undefined reference to `sf::Image::GetTexCoords(sf::Rect<int> const&) const'
collect2: ld returned 1 exit status


 :(
I'm not even using sf::Image (at this moment)
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on January 02, 2008, 02:15:43 am
Quote
One problem I noticed so far is the following output on std::cerr when my application is closing. But please note that this is only happening in Debug mode, not in Release mode, and I have not investigated it further yet.

That's weird, I'm going to check this. It doesn't appear in release mode because no checking is done on OpenGL functions ;)

Quote
Regarding compilation of SFML: here's the build log, stripped by the "everything is fine" parts:
(note: I neither have Qt no wxWidgets installed)

Everything looks ok.

Quote
The postfx and postfx-d examples start and even show some of the effects, but when I switch to other effects the application totally freezes

Which effects ? What is our graphics card ?

Quote
/usr/lib/gcc/i686-pc-linux-gnu/4.1.1/../../../libsfml-graphics.so: undefined reference to `sf::Image::GetTexCoords(sf::Rect<int> const&) const'
collect2: ld returned 1 exit status

I've added an optional parameter to this function, try a complete rebuild ;)
Title: [SOLVED] SFML 1.2 RC
Post by: T.T.H. on January 03, 2008, 03:21:31 pm
Effect "nothing" works, looks like this (http://www.teeteehaa.de/SFML/postfx_nothing.jpg).

Effect "wave" works, looks like this (http://www.teeteehaa.de/SFML/postfx_wave.jpg).

Effect "fisheye" runs but without any visual change, looks like this (http://www.teeteehaa.de/SFML/postfx_fisheye.jpg).

Effect "colorize" works, looks like this (http://www.teeteehaa.de/SFML/postfx_colorize.jpg).

Effect "blur" (at least I guess it's the effect "blur") freezes instantly when I switch to it, showing the last visible image from the last effect. The call stack in the debugger tells me something about "NTDLL.DLL" and "atioglxx.dll" but not more.

I do have ATI Radeon 9800 Pro from Sapphire with 128 MB Ram on 400 Mhz running with a ATI Catalyst 4.4 driver version 6.14.0010.6436 on Windows 2000 SP 4. Obviously the Catalyst is pretty old (April 2004) but pretty stable so far (regarding games).
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on January 03, 2008, 03:28:59 pm
Some effects are not supported, depending on which GLSL version is supported by your card. Your results are consistent with that.
Title: [SOLVED] SFML 1.2 RC
Post by: T.T.H. on January 03, 2008, 09:09:07 pm
Ugh - how can I find out which version of GLSL my card supports?

Whether or not, it would be quite nice if the postfx.exe application would tell me something like "your graphic card can't display that effect" instead of just plain freezing up.
Title: [SOLVED] SFML 1.2 RC
Post by: omgfairies on January 03, 2008, 11:50:28 pm
Strange, tried out the postfx.exe and all except waves works.
Got a newer card ATI Radeon X1900GT, kinda strange it works on older card but not on a newer.
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on January 04, 2008, 03:01:46 am
Quote
Ugh - how can I find out which version of GLSL my card supports?

Whether or not, it would be quite nice if the postfx.exe application would tell me something like "your graphic card can't display that effect" instead of just plain freezing up.

It's not straight-forward. Basically, with GLSL everything is done by the driver, which means the shader system is very flexible. But this flexibility also means there's no strong versioning system. For example, I can't force the shaders to be compiled in GLSL 1.1, or check which subset of 1.1 instructions is supported by your system.

However, I'll investigate more on this and see if I can find a way to make the system more robust.

Quote
Strange, tried out the postfx.exe and all except waves works.
Got a newer card ATI Radeon X1900GT, kinda strange it works on older card but not on a newer.

Do you have the latest driver for your graphics card ?
Title: [SOLVED] SFML 1.2 RC
Post by: zarka on January 05, 2008, 11:32:45 pm
it seams like the sf::String isn't freeing up its resources as it should

i tried running this code in visual studio 2005

Code: [Select]

#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>

#include "SFML/Graphics.hpp"

int main()
{
// Create the main window
sf::RenderWindow App(sf::VideoMode(800, 600), "SFML test", sf::Style::Close, 4);
App.ShowMouseCursor(true);

// Create a graphical string to display
sf::String Text("Hello SFML", "arial.ttf", 32);
Text.Move(265, 50);
Text.SetColor(sf::Color(255,0,0));

// Start the game loop
bool Running = true;
while (Running)
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
Running = false;
if(Event.KeyPressed && Event.Key.Code == sf::Key::Escape)
Running = false;
}
// Draw the string
App.Draw(Text);

// Update the window
App.Display();
}
//Tell Visual studio to dump memory leaks
_CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
_CrtSetReportMode ( _CRT_ERROR, _CRTDBG_MODE_DEBUG);
return 0;
}


and got this in the output window
Quote

Detected memory leaks!
Dumping objects ->
{3770} normal block at 0x018B2470, 320 bytes long.
 Data: <                > E4 AC AC AC AC AC AC AC AC AC AC AC AC AC AC E4
{3769} normal block at 0x018B2400, 52 bytes long.
 Data: <  = 4 \ stib    > 08 D2 3D 00 34 14 5C 00 73 74 69 62 00 00 18 00
{3761} normal block at 0x018B2158, 320 bytes long.
 Data: <                > E4 AC AC AC AC AC AC AC AC AC AC AC AC AC AC E4

and so on for a long long while...

i investigated further using Visual Leak Detector (http://dmoulding.googlepages.com/vld) and it seamd to originate in the FontManager. i tried linking with the 1.1 version and then i did not get any leaks.

Edit:
if i remove the mApp.Draw(Text) i do not get any leaks so it seams to perhaps be in the Rendering code ?
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on January 06, 2008, 05:06:08 am
Thanks for the leak report, I'l try to find and fix it.
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on January 06, 2008, 09:34:45 am
All the font leaks have now been fixed, thanks for your help. And thanks for telling me about Visual Leak Detector, which I didn't know ;)
Title: [SOLVED] SFML 1.2 RC
Post by: Aszarsha on January 06, 2008, 10:12:19 am
Quote from: "Laurent"
And thanks for telling me about Visual Leak Detector, which I didn't know ;)
Same here, thanks ! :)
Title: [SOLVED] SFML 1.2 RC
Post by: dabo on January 06, 2008, 01:01:13 pm
Quote from: "Aszarsha"
Quote from: "Laurent"
And thanks for telling me about Visual Leak Detector, which I didn't know ;)
Same here, thanks ! :)

ditto
Title: [SOLVED] SFML 1.2 RC
Post by: zarka on January 06, 2008, 03:23:34 pm
Quote from: "Laurent"
All the font leaks have now been fixed, thanks for your help.

Excellent! I have now updated and i can't se any leaks.

Quote from: "Laurent"
And thanks for telling me about Visual Leak Detector, which I didn't know ;)

Quote from: "Aszarsha"
Same here, thanks ! :)

Quote from: "dabo"
ditto

your welcome. it's a quite handy tool :)
Title: [SOLVED] SFML 1.2 RC
Post by: zarka on January 06, 2008, 07:33:03 pm
Ther seams to be another memory leak in the Audio package.

Code: [Select]

#include "SFML/Graphics.hpp"
#include "SFML/Audio.hpp"
#include "vld.h"
int main()
{
// Create the main window
sf::RenderWindow App(sf::VideoMode(800, 600), "SFML test", sf::Style::Close, 4);
App.ShowMouseCursor(true);

sf::Music mus();
mus.Open("sidlek.ogg");

mus.Play();
// Start the game loop
bool Running = true;
while (Running)
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
Running = false;
if(Event.KeyPressed && Event.Key.Code == sf::Key::Escape)
Running = false;
}
// Update the window
App.Display();
}
}


with this code VLD reports 6 leaks originating in sf::Music class. seams to be some memory allocated by SoundFileOgg that doesn't get released.
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on January 07, 2008, 02:44:55 am
Quote
with this code VLD reports 6 leaks originating in sf::Music class. seams to be some memory allocated by SoundFileOgg that doesn't get released.

Ok, I'll check this.
Title: [SOLVED] SFML 1.2 RC
Post by: T.T.H. on January 08, 2008, 08:24:28 pm
Hi there


Regarding the sample program "postfx.cpp":

While loading the effects...
Code: [Select]
// Load all effects
std::map<std::string, sf::PostFX> Effects;
Effects["nothing"].LoadFromFile("datas/post-fx/nothing.sfx");
Effects["blur"].LoadFromFile("datas/post-fx/blur.sfx");
Effects["colorize"].LoadFromFile("datas/post-fx/colorize.sfx");
Effects["fisheye"].LoadFromFile("datas/post-fx/fisheye.sfx");
Effects["wave"].LoadFromFile("datas/post-fx/wave.sfx");
std::map<std::string, sf::PostFX>::iterator CurrentEffect = Effects.find("nothing");

...no return value is checked. For a sample application where you want to know "is that effect working for me?" not a good solution (in my humble opinion).

In addition postfx.exe is no console application and so I initially didn't see any errors because std::cerr gets displayed nowhere. I had to reroute std::cerr into a file so see what is actually happening.


Regarding the effect "fisheye":

When running postfx.exe I do get the following message when loading the effect "fisheye":
Code: [Select]
Failed to compile effect :
ERROR: 0:5: '*' :  wrong operand types  no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:7: '<' :  wrong operand types  no operation '<' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 2 compilation errors.  No code generated.

That seems to be the reason why there is no visual result on the screenshots I posted earlier.


Regarding the effect "blur":

It loads and compiles without any problems but then it simply freezes the whole application - and I don't know why.

At the end I don't really care since I am far, far away from using any shaders, but in case you (Laurent) want this resolved before you declare the "RC version" as "stable" I would dig deeper into the problem.


Regarding my GLSL version:

With the help of the tool "GPU Caps Viewer v1.4.0" from "oZone3D" (which can be found here (http://www.ozone3d.net/gpu_caps_viewer/)) I figured out that my version of GLSL is...

...none?!? For some weird reason the tool tells me "GLSL Version: Not Supported" :(

Here's the full info dump (sorry, it's long, but I didn't want to cut off any details that might be important). After reading this anybody has a clue why "fisheye" isn't compiled correctly and why "blur" crashes?

Code: [Select]
===================================[ OpenGL GPU Capabilities ]
- OpenGL Version: 1.5.4273 Win2000 Release
- GLSL (OpenGL Shading Language) Version: Not Supported
- ARB Texture Units: 8
- Vertex Shader Texture Units: 0
- Pixel Shader Texture Units: 16
- Geometry Shader Texture Units: 0
- Max Texture Size: 2048x2048
- Max Anisotropic Filtering Value: X16.0
- Max Point Sprite Size: 0.0
- Max Dynamic Lights: 8
- Max Viewport Size: 4096x4096
- Max Vertex Uniform Components: 0
- Max Fragment Uniform Components: 0
- Max Varying Float: 0
- Max Vertex Bindable Uniforms: 0
- Max Fragment Bindable Uniforms: 0
- Max Geometry Bindable Uniforms: 0
- Frame Buffer Objects (FBO) Support:[no]
- Multiple Render Targets / Max draw buffers: 4
- Pixel Buffer Objects (PBO) Support:[no]
- S3TC Texture Compression Support:[yes]
- ATI 3Dc Texture Compression Support:[no]
- Texture Rectangle Support:[yes]
- Floating Point Textures Support:[yes]
- MSAA: 2X
- MSAA: 4X
- MSAA: 6X
- OpenGL Extensions: 97 extensions
   - GL_ARB_multitexture
   - GL_EXT_texture_env_add
   - GL_EXT_compiled_vertex_array
   - GL_S3_s3tc
   - GL_ARB_depth_texture
   - GL_ARB_fragment_program
   - GL_ARB_multisample
   - GL_ARB_occlusion_query
   - GL_ARB_point_parameters
   - GL_ARB_shadow
   - GL_ARB_shadow_ambient
   - GL_ARB_texture_border_clamp
   - GL_ARB_texture_compression
   - GL_ARB_texture_cube_map
   - GL_ARB_texture_env_add
   - GL_ARB_texture_env_combine
   - GL_ARB_texture_env_crossbar
   - GL_ARB_texture_env_dot3
   - GL_ARB_texture_mirrored_repeat
   - GL_ARB_transpose_matrix
   - GL_ARB_vertex_blend
   - GL_ARB_vertex_buffer_object
   - GL_ARB_vertex_program
   - GL_ARB_window_pos
   - GL_ATI_draw_buffers
   - GL_ATI_element_array
   - GL_ATI_envmap_bumpmap
   - GL_ATI_fragment_shader
   - GL_ATI_map_object_buffer
   - GL_ATI_separate_stencil
   - GL_ATI_texture_env_combine3
   - GL_ATI_texture_float
   - GL_ATI_texture_mirror_once
   - GL_ATI_vertex_array_object
   - GL_ATI_vertex_attrib_array_object
   - GL_ATI_vertex_streams
   - GL_ATIX_texture_env_combine3
   - GL_ATIX_texture_env_route
   - GL_ATIX_vertex_shader_output_point_size
   - GL_EXT_abgr
   - GL_EXT_bgra
   - GL_EXT_blend_color
   - GL_EXT_blend_func_separate
   - GL_EXT_blend_minmax
   - GL_EXT_blend_subtract
   - GL_EXT_clip_volume_hint
   - GL_EXT_draw_range_elements
   - GL_EXT_fog_coord
   - GL_EXT_multi_draw_arrays
   - GL_EXT_packed_pixels
   - GL_EXT_point_parameters
   - GL_EXT_rescale_normal
   - GL_EXT_secondary_color
   - GL_EXT_separate_specular_color
   - GL_EXT_shadow_funcs
   - GL_EXT_stencil_wrap
   - GL_EXT_texgen_reflection
   - GL_EXT_texture3D
   - GL_EXT_texture_compression_s3tc
   - GL_EXT_texture_cube_map
   - GL_EXT_texture_edge_clamp
   - GL_EXT_texture_env_combine
   - GL_EXT_texture_env_dot3
   - GL_EXT_texture_filter_anisotropic
   - GL_EXT_texture_lod_bias
   - GL_EXT_texture_mirror_clamp
   - GL_EXT_texture_object
   - GL_EXT_texture_rectangle
   - GL_EXT_vertex_array
   - GL_EXT_vertex_shader
   - GL_ARB_shading_language_100
   - GL_ARB_shader_objects
   - GL_ARB_vertex_shader
   - GL_ARB_fragment_shader
   - GL_HP_occlusion_test
   - GL_NV_texgen_reflection
   - GL_NV_blend_square
   - GL_NV_occlusion_query
   - GL_NV_point_sprite
   - GL_ARB_point_sprite
   - GL_SGI_color_matrix
   - GL_SGIS_texture_edge_clamp
   - GL_SGIS_texture_border_clamp
   - GL_SGIS_texture_lod
   - GL_SGIS_generate_mipmap
   - GL_SGIS_multitexture
   - GL_SUN_multi_draw_arrays
   - GL_WIN_swap_hint
   - WGL_EXT_extensions_string
   - WGL_EXT_swap_control
   - WGL_ARB_extensions_string
   - WGL_ARB_make_current_read
   - WGL_ARB_multisample
   - WGL_ARB_pbuffer
   - WGL_ARB_pixel_format
   - WGL_ARB_render_texture
   - WGL_ATI_pixel_format_float
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on January 09, 2008, 02:09:34 am
Quote
...no return value is checked. For a sample application where you want to know "is that effect working for me?" not a good solution (in my humble opinion).

Actually, the return value will reflect the fact that :
- The file has been found
- There's no error in the pseudo-GLSL code
- No internal OpenGL call failed, which will be the case if CanUsePostFX() returned true

As I'm sure the files are there, the code contains no error and as I check CanUsePostFX(), there's no really need for checking the return value in this sample.

But anyway you're right, I should add it, that's not a good practice to show people such potentially unsafe code ;)

Quote
Failed to compile effect :
ERROR: 0:5: '*' :  wrong operand types  no operation '*' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 0:7: '<' :  wrong operand types  no operation '<' exists that takes a left-hand operand of type 'float' and a right operand of type 'const int' (or there is no acceptable conversion)
ERROR: 2 compilation errors.  No code generated.

Ok, so apparently your driver doesn't want to consider "7" and "1" as floats. What if you replace with "7.f" and "1.f", or "7.0" and "1.0" ?

Quote
It loads and compiles without any problems but then it simply freezes the whole application - and I don't know why

That's annoying... The problem is that your driver probably doesn't support random/multiple texture lookup in the shader, but there's no way to detect it if it succeeds to compile the effect. Do you have the latest version of your driver ?

Quote
With the help of the tool "GPU Caps Viewer v1.4.0" from "oZone3D" (which can be found here) I figured out that my version of GLSL is...

...none?!?

That's right, the GLSL extensions are not exposed by your driver. How can it work ??
Title: [SOLVED] SFML 1.2 RC
Post by: T.T.H. on January 09, 2008, 10:35:23 pm
Quote from: "Laurent"
Ok, so apparently your driver doesn't want to consider "7" and "1" as floats. What if you replace with "7.f" and "1.f", or "7.0" and "1.0" ?


Using "7.0" and "1.0" or "7." and "1." in "fisheye.sfx" works fine, no errors, effect is visible while running.

But when using "7.f" and "1.f" I get the following error:
Code: [Select]
Failed to compile effect :
ERROR: 0:5: 'f' : syntax error parse error

--------------------

Quote from: "Laurent"
Do you have the latest version of your driver ?

I am using this...
Code: [Select]
- Drivers Version: 6.14.10.6436 - Catalyst 04.4
- ATI Catalyst Version String: 04.4
- ATI Catalyst Release Version String: 8.00-040322a-014266C-ATI

...which is not the newest version. The newest version is Catalyst 7.12.

I am using Catalyst 4.4 because it does not yet need the .NET Framework and mostly because it runs pretty stable with the games I play (Guild Wars, Warcraft III, UT1, UT2004, Call of Duty, etc.). And I am a fan of the "never change a running system" concept...

--------------------

Quote from: "Laurent"
That's right, the GLSL extensions are not exposed by your driver. How can it work ??

Uhm, sorry, how can work what?
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on January 10, 2008, 01:31:57 am
Quote
Using "7.0" and "1.0" or "7." and "1." in "fisheye.sfx" works fine, no errors, effect is visible while running.

But when using "7.f" and "1.f" I get the following error:

Ok cool. I was not sure of the GLSL syntax for floating point numbers ;)

Quote
I am using Catalyst 4.4 because it does not yet need the .NET Framework and mostly because it runs pretty stable with the games I play (Guild Wars, Warcraft III, UT1, UT2004, Call of Duty, etc.). And I am a fan of the "never change a running system" concept...

Ok I see. No problem.

Quote
Uhm, sorry, how can work what?

The post-effects, which use GLSL, which your card says it doesn't support :D
Title: [SOLVED] SFML 1.2 RC
Post by: Laurent on January 16, 2008, 06:03:09 pm
SFML 1.2 is finally out, thanks everybody for your help ;)