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

Pages: [1] 2 3 ... 1286
1
General discussions / Re: Dynamic Linking on Windows
« on: October 07, 2021, 08:04:46 am »
Hi

regsvr32 is for a very specific purpose (ActiveX controls if I remember correctly). You don't have to use it to register your DLLs, they just have to be in a folder that's in the PATH environment variable.

2
Audio / Re: SFML Audio is broken in Ubuntu 20
« on: September 27, 2021, 08:11:13 am »
Hi

You've put a lot of effort into debugging your problem, that's nice. Unfortunately, this is an issue between OpenAL and the underlying audio driver, there's probably nothing much that we can do at the SFML level.

What you could do, is try a simple program or example that directly uses OpenAL, to see if the issue persists.

If it does, then you'd better ask OpenAL people for support. If not, then there might be something to do in SFML  ;)

3
Network / Re: Sending sf::Packet via asio fails partly
« on: September 10, 2021, 12:36:51 pm »
Your packet contains 2 bytes, but you're trying to read 4 (sizeof(int)). That's what the checkSize function checks, and why it fails.

If you write two uint8_t then read two uint8_t.

4
General / Re: How to build SFML on linux with a custom build folder?
« on: September 09, 2021, 07:50:17 am »
Don't "try". You should rather read the CMake documentation, or tutorials. Even just "cmake --help" would help you.

5
Audio / Re: Creating audio by pulling single samples
« on: July 27, 2021, 11:29:07 am »
If the sample storage is destroyed when the function returns (and it is, if declared locally inside the function), stream receives only garbage (noise) from onGetData.

6
Audio / Re: Creating audio by pulling single samples
« on: July 27, 2021, 07:43:34 am »
I guess you want to generate samples one by one to keep the "currentTime" variable accurate? This is not a good idea: the moments when onGetData is called, and when the samples are actually played, are unrelated. And no, providing samples one by one won't work anyway.

The samples times must be virtual, not synced to the real time. Increment time by 1/44100 at each new sample and you'll get a perfect sine wave. And now, you can generate as many samples as you want at each call.

7
General discussions / French school looking for speaker
« on: July 23, 2021, 09:28:58 am »
Hi

I got a request from a french school, Gaming Campus (https://gaming.tech/), located in Paris and Lyon. They are looking for a speaker to give a 2 or 3 week course on SFML in november. It would be in french, but if the person speaks a very good english they could be interested too.

If someone is interested, please contact me.

8
Window / Re: create a window, then close it and re-open it?
« on: July 09, 2021, 08:08:07 am »
The doc means that the C++ instance is still valid, but the OS window is really destroyed.
In C#, you should rather destroy the instance and create a new one.

Quote
I don't actually see a create() method. Is the equivalent simply the C# RenderWindow() constructor?
Yes.

Quote
If so how different is the C# version from the C++ documentation that I'm reading?
Just that (constructors instead of create/load functions).

9
Window / Re: My app is not receiving touch events.
« on: June 05, 2021, 10:46:18 am »
There's no support for touch events on Windows.

10
Graphics / Re: Help with unordered set using vertex
« on: June 01, 2021, 08:06:46 am »
Hi

Don't copy the error panel, it lacks the most important: the error message. Copy the compiler output directly. LNK2005 is the "symbol defined multiple times" linker error: your functions are defined in a header and are not declared inline; therefore, there's one separate definition in each .cpp file your header is included in, and the linker doesn't like to deal with several definitions for a single symbol.

But storing vertices in a std::unordered_set is really a bad idea in my opinion. "fast insertion and find": at what rate? How many items does your set contain? If it's not a million operations per second then it's not worth the troubles. Moreover, there are more dedicated (and more efficient) data structures for spatial search, like quad trees for example.

11
General / Re: Trouble "Compiling" with Cmake
« on: May 11, 2021, 08:02:56 am »
Why do you want to compile SFML? There are precompiled releases for MinGW on the download page. You'd have to compile SFML yourself only if none is compatible with your version of MinGW.

Once you have a working SFML, you don't need to use CMake either. CMake is just what we use to build SFML. You can write a makefile or whatever, all you have is a set of headers and libraries, like with any other C++ library.

If you know how to use it on Linux then there's nothing different on Windows with MinGW.

12
System / Re: Threads are Freezing my Window
« on: April 30, 2021, 04:28:40 pm »
Outside the game loop. But then you'll have to change the logic of the spawn() function.

But... it makes no sense to run a thread just to make it wait. To do nothing during 2 seconds, you definitely don't need a thread. Just use a sf::Timer and call the spawn() function whenever it reaches 2 seconds.

13
System / Re: Threads are Freezing my Window
« on: April 30, 2021, 08:04:56 am »
If the Thread object is created within the main loop, it is destroyed in it as well, and the destructor of class Thread blocks until the thread's function has returned.

14
The code on github is the version that works, right? It would be more relevant to show us the code that doesn't work ;)

15
Feature requests / Re: (CMake) Make BUILD_SHARED_LIBS=OFF by default
« on: April 16, 2021, 09:09:20 am »
It's probably not ideal, but what other solutions do we have? We really want SFML to build as shared libraries by default, and we want to provide an option so that users can change that easily.

As far as I understand, your request was to switch to static build by default. This is really not desired, especially on Unix platforms.

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