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

Pages: [1] 2
1
General discussions / Re: Experimental internal-context-less branch
« on: April 26, 2016, 08:30:49 pm »
I ran into another deadlock with this branch. It didn't occur on my machine so I can't reproduce it unfortunately, but if/when I have more details I'll add them.

2
General discussions / Re: Experimental internal-context-less branch
« on: April 25, 2016, 11:00:14 pm »
I'm not able to reproduce any deadlocks with the latest version, nice work.

I'll be doing some more testing of this branch on some non-trivial code today, but it looks good so far for the cases I think of at least.

3
General discussions / Re: Experimental internal-context-less branch
« on: April 20, 2016, 03:11:57 am »
Thanks for the update. Trying out the updated branch, I still run into a deadlock, but in a different part of the code.

Here's an updated minimal example that reproduces the issue on my machine:
#include <SFML/Graphics.hpp>
void createSomeTextures()
{
    for (unsigned i = 0; i < 100; i++)
    {
        sf::RenderTexture texture;
        texture.create(100, 100);
        sf::RectangleShape shape({ 50, 50 });
        texture.draw(shape);
        printf("Thread: %d\n", i);
    }
}
int main(int argc, char** argv)
{
    sf::Thread thread(&createSomeTextures);
    thread.launch();

    for (unsigned i = 0; i < 100; i++)
    {
        sf::RenderTexture texture;
        texture.create(100, 100);
        sf::RectangleShape shape({ 50, 50 });
        texture.draw(shape);
        printf("Main: %d\n", i);
    }
    thread.wait();
    return 0;
}

And the locked callstack:
Code: [Select]
> sfml-system-d-2.dll!sf::priv::MutexImpl::lock() Line 52 C++
  sfml-system-d-2.dll!sf::Mutex::lock() Line 57 C++
  sfml-system-d-2.dll!sf::Lock::Lock(sf::Mutex & mutex) Line 39 C++
  sfml-window-d-2.dll!sf::priv::GlContext::setActive(bool active) Line 423 C++
  sfml-window-d-2.dll!sf::Context::setActive(bool active) Line 60 C++
  sfml-window-d-2.dll!sf::Context::~Context() Line 53 C++
  [External Code]
  sfml-graphics-d-2.dll!sf::priv::RenderTextureImplFBO::~RenderTextureImplFBO() Line 68 C++
  [External Code]
  sfml-graphics-d-2.dll!sf::RenderTexture::~RenderTexture() Line 47 C++
  stand.exe!createSomeTextures() Line 11 C++

4
General discussions / Re: Experimental internal-context-less branch
« on: April 18, 2016, 11:53:24 pm »
Compiled using MSVC 2015 on Windows 10.

Main call stack:
Code: [Select]
> sfml-system-d-2.dll!sf::priv::MutexImpl::lock() Line 52 C++
  sfml-system-d-2.dll!sf::Mutex::lock() Line 57 C++
  sfml-system-d-2.dll!sf::Lock::Lock(sf::Mutex & mutex) Line 39 C++
  sfml-window-d-2.dll!sf::priv::GlContext::setActive(bool active) Line 427 C++
  sfml-window-d-2.dll!sf::priv::GlContext::releaseTransientContext() Line 253 C++
  sfml-window-d-2.dll!sf::GlResource::TransientContextLock::~TransientContextLock() Line 101 C++
  sfml-graphics-d-2.dll!sf::Texture::~Texture() Line 100 C++
  sfml-graphics-d-2.dll!sf::RenderTexture::~RenderTexture() Line 48 C++
  stand.exe!main(int argc, char * * argv) Line 24 C++

Other thread callstack:
Code: [Select]
> sfml-system-d-2.dll!sf::priv::MutexImpl::lock() Line 52 C++
  sfml-system-d-2.dll!sf::Mutex::lock() Line 57 C++
  sfml-system-d-2.dll!sf::Lock::Lock(sf::Mutex & mutex) Line 39 C++
  sfml-window-d-2.dll!sf::priv::GlContext::create() Line 272 C++
  sfml-window-d-2.dll!sf::Context::Context() Line 44 C++
  sfml-graphics-d-2.dll!sf::priv::RenderTextureImplFBO::create(unsigned int width, unsigned int height, unsigned int textureId, bool depthBuffer) Line 88 C++
  sfml-graphics-d-2.dll!sf::RenderTexture::create(unsigned int width, unsigned int height, bool depthBuffer) Line 81 C++
  stand.exe!createSomeTextures() Line 9 C++
  stand.exe!sf::priv::ThreadFunctor<void (__cdecl*)(void)>::run() Line 39 C++
  sfml-system-d-2.dll!sf::Thread::run() Line 83 C++
  sfml-system-d-2.dll!sf::priv::ThreadImpl::entryPoint(void * userData) Line 86 C++

The problematic sections of code seem to be:
GlContext.cpp: Line 264

    Lock lock(mutex);

    GlContext* context = NULL;

    {
        Lock sharedContextLock(sharedContextMutex); // The thread waits until sharedContextMutex.unlock() is called.
 

GlContext.cpp: Line 252
    sharedContext->setActive(false); // This calls Lock lock(mutex), which blocks because other thread has it locked already
    sharedContextLocked = false;
    sharedContextMutex.unlock();

5
General discussions / Re: Experimental internal-context-less branch
« on: April 18, 2016, 10:50:50 pm »
I tried out this branch, and I've run into a deadlock when creating two RenderTextures in different threads. Here's my attempt of a minimal example that recreates the issue on my machine:

#include <SFML/Graphics.hpp>
void createSomeTextures()
{
    for (unsigned i = 0; i < 100; i++)
    {
        sf::RenderTexture texture;
        texture.create(100, 100);
        printf("Thread: %d\n", i);
    }
}
int main(int argc, char** argv)
{
    sf::Thread thread(&createSomeTextures);
    thread.launch();

    for (unsigned i = 0; i < 100; i++)
    {
        sf::RenderTexture texture;
        texture.create(100, 100);
        printf("Main: %d\n", i);
    }
    thread.wait();
    return 0;
}

Apologies if this has already been addressed elsewhere.

6
Feature requests / Re: XInput support in SFML?
« on: April 07, 2016, 08:39:15 pm »
It looks like force feedback is doable cross-platform, based on this thread: http://en.sfml-dev.org/forums/index.php?topic=19665.0

Regarding detecting and having full support (fixed L2/R2 triggers) for XInput gamepads, I'm not sure if that's possible. There are cross-platform driver solutions for XInput controllers like xboxdrv and 360Controller, but I don't know how one would go about integrating that into SFML.

7
Feature requests / Re: XInput support in SFML?
« on: April 07, 2016, 09:52:27 am »
What are the alternatives for the other OS (Linux, OS X, ...)?

That's a good question. I'm honestly not sure how one would go about adding XInput support on Linux/OSX. I assumed that the Linux/Mac implementations wouldn't have to change.

8
Feature requests / XInput support in SFML?
« on: April 07, 2016, 02:05:10 am »
I'm currently implementing XInput and DirectInput support for our game, and I was wondering if XInput support belongs in SFML. If so, I wouldn't mind submitting a pull request when I'm done.

The current sf::Joystick uses the Windows Multimedia API, which works decently for most use cases. But having official support for XInput adds some useful things.
  • It fixes the annoying bug of not being able to press L2 and R2 at the same time.
  • It lets us easily detect and use a standardized controller configuration, instead of manually checking against a long list of different product ids and vendor ids.
  • It allows us to send controller vibration events if SFML ever decides to add them.
Because XInput doesn't support certain controllers, it needs to be implemented alongside winmm or DirectInput for full gamepad support.


As a side note: my preliminary testing using DirectInput over winmm seems to indicate improved performance. It looks like winmm's joyGetPosEx(...) occasionally takes a lot of time to execute, but I need to do more testing to see what's going on.

9
I realize this is an old topic, but it doesn't look like this feature has been implemented so I figured I'd chime in with my relevant use case.

When players play our game with a usb gamepad without using keyboard or mouse, the computer sleeps automatically while they're playing. It'd be nice for some way to prevent this by disabling the automatic sleep while the window is open.

10
General discussions / Re: SFML 2.2 Released!
« on: December 18, 2014, 08:55:55 am »
Props to the SFML team! Super happy that you guys are making great progress. I love checking in on the github and seeing the issues disappear.

Been looking forward to the new blend mode stuff. Also, crossing my fingers that this fixes some of my issues with sf::sleep weirdness.

11
SFML projects / Re: Vagante is now on Kickstarter!
« on: August 29, 2014, 01:54:34 am »
Just to confirm, you mean that "tey" rhymes with "day", right?

Yep!

Though to be honest, I don't think there's really a proper way to say it, as it's a real word in three different languages. So long as you don't pronounce it "Va-jant"  :P

12
SFML projects / Re: Vagante is now on Kickstarter!
« on: August 29, 2014, 01:47:19 am »
My first question: how do you pronounce its name?  ;D

Vah - gahn - tey :)

13
SFML projects / Vagante is now on Kickstarter!
« on: August 29, 2014, 12:40:01 am »


Trailer:

Website (Free Demo Download): http://vagantegame.com/

Kickstarter: https://www.kickstarter.com/projects/nukenine/vagante

I first discovered SFML four years ago and I fell in love. I was still a student back then, but I used it in many small projects over the years.

About one year ago, I quit my software development job to make games full-time as an independent game developer. We've been working on our first title, Vagante, for over nine months now. It goes without saying that we're using SFML  :)

It's difficult to find many big games that use SFML, so I'm happy to answer any questions about our game or our use of SFML. ;D

14
SFML projects / Re: The Hallowed Orb
« on: December 30, 2013, 03:14:15 am »
Got to the wave 10 few times... Each time he kills me mercilessly. Would be changing some variables in the source code considered cheating? ;D

I wouldn't consider it cheating, haha.

I didn't really have time to balance the game during Ludum Dare. If you come up with some good and fair changes, consider submitting a pull request :)

15
SFML projects / Re: The Hallowed Orb
« on: December 23, 2013, 04:27:19 am »
thanks for the feedback! :D

It's awesome! And bloody hard too! I've got to the wave 7, it seemed less difficult than the previous one, swarming with shielded frogs, but I had only 1 life left and failed... Still trying to overpass my record. Is there a finite number of levels? I guess there are 10 or less, and there is a boss in the last one. I want to finish this game so bad :D I've spent so much time on it already, but I can't help it, it's so addicting ;D

Yep there's only 10 levels, with a boss on the last one. The game is indeed really tough, please let me know if you successfully beat it! :)

Pages: [1] 2