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 ... 642
1
Graphics / Re: Loading large textures
« on: October 22, 2020, 09:57:33 am »
 Reading data from disk is slow, as such you'll always have some time spent in the loading function.

If you really need it to be on the fly, you could do the load of an sf::Image in a separate thread and then call copyFromImage on a texture in the main thread.
You might still get a frame rate dip due to the amount of data, but it shouldn't necessarily cause too noticeable lag. This could be further refined, by splitting up the large image into multiple smaller ones and loading one after the other.

On the other hand, loading the images up front and keeping them in memory can make things easier and it's not like your PC couldn't handle a few MB or RAM usage. ;)

2
General / Re: SFML Draw method leaking memory?
« on: October 22, 2020, 09:50:17 am »
It's not uncommon that reporting tools provide false positives, e.g. if they don't account for the destruction of some objects at application termination.

But if there really is an issue with SFML, then it should be reproducible in a few lines of code.
Given that you're doing manual memory management with raw pointers, I'd claim, that the leaks are originating somewhere from your own code. I highly recommend using unique_ptr (or if necessary shared_ptr) and not do any manual memory management.

3
Sounds like you link SFML dynamically, yet you defined SFML_STATIC.
If you link SFML dynamically, don't define SFML_STATIC.

4
General / Re: Use console and the game window at the same time
« on: October 21, 2020, 02:52:04 pm »
You can't easily use both at once. Console input is a blocking operation, while rendering something needs a continued operation.

Personally, I suggest to just create your own small text input field with SFML. You can get text input with the TextEntered event.

Alternatively,  but this might be even more complex, is to use an existing GUI library, like Imgui-SFML.

5
Audio / Re: The program crashes when I use "sf::Music"
« on: October 15, 2020, 10:34:41 am »
If you build the examples that SFML comes with, do they work?

0xc000007b is often an indication of mixing x64 and x86, so make sure you're using the same compiler target for both building SFML and using SFML.

6
General / Re: Problems when sending a project to someone else.
« on: October 14, 2020, 09:02:29 pm »
It's also part of all SFML release packages. ;)

7
General / Re: Problems when sending a project to someone else.
« on: October 14, 2020, 06:16:29 pm »
If you send them the example pong application, does it run fine?

8
General / Re: CMAKE error missing dependencies of SFML
« on: October 14, 2020, 06:12:07 pm »
Looks like you don't have static libraries built.

9
General / Re: How to setup CMake in Visual Studio?
« on: October 14, 2020, 06:07:53 pm »
If you build SFML as part of your CMake project you don't need to find_package it, as CMake already kowns the SFML targets. Instead you can just add SFML as subdirectory and then link sfml-<module>

10
The error code translates into 0xC00000FD which is connected to a stack overflow error. Try using a std::vector instead of an array, so the data is dynamically allocated on the heap instead of the stack.

11
Window / Re: Automatic Graphics Switching
« on: October 14, 2020, 10:57:46 am »
There's the GpuPreference #define that is used to encourage the system to use the discrete graphics card, as one usually wants, due to better graphics support, but I'm not even sure if this has an effect on macOS...
Other than that, I'm not sure if there's even a way to define the mode, as this seems mostly defined from the OS itself.
You could try and use something like gSwitch to better handle the enabling/disabling of the discrete graphics card.

12
General / Re: Vulkan
« on: October 14, 2020, 10:50:08 am »
You can already create Vulkan surfaces on SFML windows.
There's also a complete example. ;)

As for the sfml-graphics backend, there are plans for multi-backend support. OpenGL (ES) is still the most popular and most used graphics API, so this has still a very good future ahead of itself.

13
Audio / Re: Song Not Playing
« on: October 07, 2020, 09:18:41 pm »
So if it's running on a different machine entirely, how do you expect to hear any audio on your end?

14
Audio / Re: Song Not Playing
« on: October 06, 2020, 08:57:33 am »
Stupid question, but do you have the correct audio device set as default?
And does the file play in a media player (like VLC)? :D

15
Graphics / Re: Problem to set cursor image
« on: October 06, 2020, 08:55:26 am »
We recently had some changes in that area for Linux, I'd suggest you grab the master branch and build SFML from source.

Pages: [1] 2 3 ... 642
anything