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

Pages: [1]
1
Graphics / Draw() to another Image, not the Window
« on: March 20, 2012, 12:15:24 am »
The tutorials cover how to put up sprites onto the window, but they never seem to tell me how to draw one to another image.

Upon searching, I found the Image::Copy function, but the description says that it's very slow and should only be used during initialization.

How would I do that?---draw a sprite onto an image, and not the window?


I'm using SFML version 1.6.

thanks

2
General / How to install SFML 1.6 with Code::Blocks ?
« on: March 14, 2012, 04:59:04 am »
1st solution:

If you are using Linux, this had worked for me:

Quote
SFML-1.6/include/SFML(the entire folder) to /usr/include/
SFML-1.6/lib/<contents in it> to /usr/lib



2nd solution:

I think I know what you did wrong there--it stumped me too the first time.


(read the entire thing)
Quote
Leave the SFML files where you want, and setup Code::Blocks so that it can find them

Go to the Settings / Compiler and debugger menu, then to Global compiler settings / Search directories
In Compiler, add SFML-x.y\include
In Linker, add SFML-x.y\lib

Open your project's build options, then go to the Linker settings tab. In Other link options, add the SFML libraries you are using, with the "-l" directive. Here we only use libsfml-system.a, so we add "-lsfml-system". For the Debug configuration, you can link with the debug versions of the libraries, which have the "-d" suffix ("-lsfml-system-d" in this case).

This is for the dynamic version of the libraries, the one using the DLLs. If you want to link with the static version of the libraries, add the "-s" suffix : -lsfml-system-s, or -lsfml-system-s-d for the debug version.

When linking to multiple SFML libraries, make sure you link them in the right order, as it's important for MinGW. The rule is the following : if library XXX depends on (uses) library YYY, put XXX first and then YYY. An exemple with SFML : sfml-graphics depends on sfml-window, and sfml-window depends an sfml-system. The link options would be as follows :

-lsfml-graphics
-lsfml-window
-lsfml-system

Basically, every SFML library depends on sfml-system, and sfml-graphics also depends on sfml-window. That's it for dependencies.

Your program should now compile, link and run fine.



what I'm guessing is that you only followed up to the part that he had the picture of the source file. There are more instructions to follow after that.

Pages: [1]
anything