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

Pages: 1 2 3 [4] 5 6 ... 626
Window / Re: Sprite can't be positioned
« on: November 30, 2019, 11:25:26 am »
The issue is probably somewhere else in your code.

Can you provide a complete and minimal example that reproduces the issue?

Graphics / Re: Updating a Specific Sprite or View
« on: November 26, 2019, 11:45:48 pm »
For large maps, especially if they're changing rarely, you may want to use a render texture and draw the map to it whenever something changes. That way you won't be updating the map as often.

Window / Re: draw on different levels
« on: November 26, 2019, 08:52:30 pm »
You really just want two views.

Set the first view, then render your game world objects.
Then set the second view and render your GUI.

The GUI view should not be modified, except to account for window resizes, and thus your GUI will always remain stationary.
While at the same time, you can move around your game world view, follow the player, zoom in on the action, etc. all while the GUI stays stationary.

See also the official view tutorial or my own view tutorial from a while back.

Graphics / Re: trying to override Drawable::draw() but no effect
« on: November 26, 2019, 08:24:54 pm »
You aren't "displaying" it on the window, but you're making sure the rendered object on the render texture are actually drawn properly. Before you use the texture of a render texture you have to call display().
See also: https://www.sfml-dev.org/documentation/2.5.1/classsf_1_1RenderTexture.php#details

Graphics / Re: trying to override Drawable::draw() but no effect
« on: November 26, 2019, 09:24:33 am »
You're never calling display on the render texture.

You can, but it's not always a good idea to do so.
For you, I'd recommend to just build SFML with SFML_STATIC_STD_LIB set in CMake.

Yes, SFML's pre-built static binaries for Visual Studio come with /MD or /MDd.

Based on that alone, static libraries can use /MD /MDd, but you can't mix the runtime types in your application. If you want to use one, the all C++ libraries need to use the runtime setting.

Graphics / Re: trying to override Drawable::draw() but no effect
« on: November 26, 2019, 12:33:32 am »
To understand what your code is doing you should learn how to use a debugger.
That way you can add a break point where ever your want your code to psss and then step through things step by step.

Are you setting the texture for the monitor sprite?
Are you setting the font on the text objects?
Does the class instance exist until display() is called on the window?

General / Re: Linking the SFML using Conan on Linux
« on: November 24, 2019, 01:31:31 pm »
I think this is more related to the ABI change for strings. You'd need to make sure that SFML is also built with the C++17 flag.

General / Re: setting SFML on Clion
« on: November 22, 2019, 06:13:53 pm »

For some reason CMake is detecting Visual Studio library files .lib instead of the MinGW library files .a
Which makes me question to what exactly you ahve put into the D:/Libraries/SFML/lib directory?

Make sure you download the matching SFML package for your compiler and delete all other, unrelated files.

Audio / Re: Using sfml-audio on Windows
« on: November 22, 2019, 06:08:50 pm »
You're using a static (and thus globally) initialized sf::Music, which is not allowed by SFML, as the initialization as well as the destruction order of global objects are undefined an since SFML too uses some globals to hide certain magic.

General / Re: setting SFML on Clion
« on: November 22, 2019, 03:56:48 pm »
Can you provide the content of @CMakeFiles\prova1.dir\linklibs.rsp?

General / Re: setting SFML on Clion
« on: November 22, 2019, 01:27:50 pm »
Don't know why, but SFML is still not being linked.

Try a verbose build output (google how you can set it up for CMake).

General / Re: setting SFML on Clion
« on: November 21, 2019, 04:39:12 pm »
It should link that way. Try to clear your CMake cache.

If it's only related to std::string it might be that you need to recompile SFML with the same C++ standard flag set.

Pages: 1 2 3 [4] 5 6 ... 626