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

Pages: [1]
1
General discussions / Re: Can vlc work on SFML window?
« on: March 16, 2024, 07:18:06 pm »
I've no idea how VLC can be integrated into other applications.

Have you followed the Getting Started section: https://sfemovie.yalir.org/latest/start.php

I had trouble building sfeMovies. That's why I had to look for some libraries else.

2
General discussions / Can vlc work on SFML window?
« on: March 15, 2024, 07:24:36 pm »
I tried mciSendString, but it created a new window to play the video.
Besides, I don't quite understand how to install sfeMovies in my project(CMake, CLion)

3
General discussions / Something about playing video.
« on: March 07, 2024, 04:34:05 pm »
Hi, I want to play videos on SFML window, but I don't know a proper way.
Does anyone know a library that fits to SFML and easy to use?

4
General / problem with mingw
« on: November 03, 2023, 07:34:22 pm »
Hi, I'm using CLion with mingw64.

My exe needs libgcc_s_seh-1.dll, libstdc++-6.dll and libwinpthread-1.dll.

I was wondering how can I statically link mingw?

5
The dll that SFML project needs is kind of large. openal32, sfml-audio-d-2, sfml-graphics-d-2, sfml-network-d-2, sfml-system-d-2, sfml-window-d-2, six dlls are totally 13.7 MB.
Besides, font file is approximately 20MB, can sf::Font load from system fonts?
I'm using CLion, by the way.

6
General / Problem with dll
« on: October 13, 2023, 09:33:40 am »
Hi to all,
I configured SFML in CLion on my computer through the tutorial, but the generated program shows that the dll is missing on other computers. What should I do?

7
Graphics / Re: Issue with display of pictures
« on: October 04, 2023, 07:06:40 am »
In your setSprite function, you make a texture and assign it to the sprite. But the texture is just a local variable, so when the function ends the texture is deleted and the sprite now contains an invalid pointer to where the texture used to be.
Textures need to have at least the same lifetime as a sprite, since sprites don't make a copy of the texture.
Thank you. Problem solved. :D

8
Graphics / Issue with display of pictures
« on: October 03, 2023, 09:29:26 pm »
Dear Community,
I don't know how to express this problem explicitly..
I set a class like this:
class Image {
public:
void init();
void show();
private:
Sprite spr;
};
and a vector like vector <Image*> pics;
init() could initialize spr and pics.push_back(this) and show() is just window.draw(spr); and window.display();.
Here comes the problem. When it comes to pics[0]->show();, the screen becomes whole white.
I'm sure the problem is from the sentence pics[0]->show();, because when I delete it and put show() at the bottom of init(), everything works fine.
I hope you can understand what I was saying according to the attaching sceenshots, because my expression was really poor.

Best regards.

9
Graphics / Re: Issue with cache of pictures
« on: October 02, 2023, 06:46:50 am »
Sorry guys. I found out that it was the loop's fault. Problem solved.

10
Graphics / Re: Issue with cache of pictures
« on: October 02, 2023, 06:38:14 am »
I just tested your first version, it works fine. (I usually use texture pointers in my resource system map, but textures work too)
Are you sure that's the part causing the crash?
I wrote this and the program crashed here:
textureCache[string("animation\\") + fileinfo.name].loadFromFile(string("..\\graphics\\animation\\") + fileinfo.name);

11
Graphics / Re: Issue with cache of pictures
« on: October 01, 2023, 10:06:26 pm »
That's really confusing. I'm sure the file is existed.😥

12
Graphics / Issue with cache of pictures
« on: October 01, 2023, 09:26:03 pm »
I wanted to cache pictures at the beginning, using map<string, Texture>cache to store the info of the image. I wrote the code
cache[filename].loadFromFile(xxx);
but the program crashed.
I also used the ways below.
Texture temp;
temp.loadFromFile(xxx);
cache[filename]=std::move(temp);
Still did not work.
Seems like the Texture kind object cannot use '='?

Pages: [1]
anything