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

Pages: [1] 2
1
Success! :) I confirm that the "bugfix/osx_cursor_hide" build fixes the cursor problem! 

After a few days outstanding I had lost hope on this one and deserted the forums a while, I'm glad it got sorted out in the end ;) thanks a lot

2
I use setMouseCursorVisible to hide to mouse cursor when it enters the SFML window. When set to false, the cursor is still visible when it hovers over the running window until it loses focus and gets it back. Only then the cursor remains hidden over the window.

Here's a small program showing this behavior on osx:
(click to show/hide)

I use the latest SFML github source.

Simply moving the mouse cursor over the dock then back over the window kicks in the cursor hide. Command+tab does the same as well.

The same issue can be observed in fullscreen video modes.

3
Graphics / Re: Card flipping animation
« on: August 27, 2014, 04:52:16 am »
I think I got the rotation around y-axis to fly but it only works on origin, which makes it rather useless.

This example generates a pattern texture sprite and rotates it on y-axis in the top left corner:
(click to show/hide)

I was not able to blend the center translation in the matrix as it is done in the Transform::rotate method, doing so might solve the problem:
(click to show/hide)

With that said, seems Transformable::getTransform() does not support rotation other than z axis:
(click to show/hide)

Was worth the shot, I need something similar in a project. Someone with math skills might make it work  :P

4
Window / Re: pollEvent crash after window re-create (osx)
« on: August 25, 2014, 11:47:33 pm »
Success! I cannot reproduce the problem anymore, I'll do further tests but it looks good  :)

It wasn't line 219 exactly but I figured you removed the autorelease.

Here's my exact change:
(click to show/hide)

Thanks a lot! :D

5
Window / Re: pollEvent crash after window re-create (osx)
« on: August 24, 2014, 12:41:05 am »
Quote
Random (most likely totally unrelated) URL
I have no idea if the autorelease wrapper is in cause or not. Either way I have no control over it.

Quote
Are you compiling in debug or release mode?
Compiling in debug or release mode yields to the same result.

Quote
The code has a lot of error messages and it's weird nothing happens before the crash.
There's a stack trace in the crash log but there are no error messages, just a general protection fault. On my end at least.

6
Window / Re: pollEvent crash after window re-create (osx)
« on: August 23, 2014, 05:11:18 pm »
Quote
It keeps recreating the window as soon as you press F once.
It doesn't, did you run the example?

Quote
Toggle must be declared in the is open loop
Toggle in this case is not a trigger, it designates state, thus is outside the loop.

Quote
and yes, the window create is (probably?) better off of the poll event loop
As mentioned, I did try this option to no avail and posted the simpler example for simplicity.

Out of due diligence, here's another complete example with the window re-create outside the event loop that still triggers the problem:
(click to show/hide)

7
Window / pollEvent crash after window re-create (osx)
« on: August 23, 2014, 06:52:31 am »
I get a crash on pollEvent after re-creating the window, immediately after I do a command+tab while moving the mouse or trackpad. It looks like input events are polled on a resource that has been deallocated upon re-creating the window.

Here's a small example that triggers the problem every single time on my macbook with these steps:
  • Run example
  • Press 'F' key to trigger a window re-create
  • Press command+tab to lose window focus while moving mouse/trackpad
Example source:
(click to show/hide)

The exception as it occurs in Xcode:
(click to show/hide)

The crash log with a test outside Xcode:
(click to show/hide)

The issue occurs even if the resolution is not changed or using different styles. I compiled SFML from source as of today. I did try to re-create the window outside the pollEvent loop but still get the crash at the next pollEvent call.

Note that doing plenty of command+tab and mouse events without window re-creation does not trigger the problem.

Am I doing something wrong here?

8
Graphics / Re: Visible border around fullscreen window (retina)
« on: August 13, 2014, 07:56:49 pm »
Quote
By 1 FPS or to 1 FPS?
By 1 FPS yes.

Quote
I put them on purpose to avoid a hard video mode switch which would result in resizing all open windows, moving items on the desktop and so on.
Thanks for the clarification.

Quote
Now, if you want to measure performance, you'll have to modify SFML internal to use a hard switch or something similar.
I won't go there. I got insight which pertains to borders in fullscreen and why it happens. I will proceed with desktop resolution in fullscreen and handle lower res in a scaled view where applicable. From there I will reassess performance.

Thanks all  :)

9
Graphics / Re: Visible border around fullscreen window (retina)
« on: August 13, 2014, 01:57:14 pm »
Quote
It is indeed the intended behaviour. If you ask for 800x600 you get 800x600. If you want to scale 800x600 to something else then use views.
Fair enough, answers my question.

Quote
Do you have proof?
Yes, with a single sprite that covers 2880x1800 I drop 1 FPS. As you stated, I will implement a view scaled up and see how it goes.

Quote
normally there should be an option in the video driver to either have black bars or to resize when using a nonfitting resolution?
I remember that setting back when I used a PC. The corresponding feature also affects the desktop on osx.

Thanks for your input!

10
Graphics / Visible border around fullscreen window (retina)
« on: August 13, 2014, 03:04:14 am »
I am testing high dpi resolution on a macbook pro retina. Windowed mode works great but I noticed that resolutions lower than desktop show up with a border in fullscreen. The window pixel size is accurate but does not scale to cover the full screen.

The following valid resolutions are affected:
  • 2560 x 1600
  • 1680 x 1050
  • 1440 x 900
  • 1280 x 800
Here's a small complete program to reproduce the problem provided you can test on a macbook pro retina. You will see a white rectangle that matches windows size yet does not take the whole screen.

#include <SFML/Graphics.hpp>

int main(int, char const**)
{
    sf::RenderWindow window(sf::VideoMode(1680, 1050), "SFML window", sf::Style::Fullscreen);
   
    sf::RectangleShape shape;
    shape.setSize(sf::Vector2f(1680, 1050));
   
    while (window.isOpen())
    {
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::KeyPressed) {
                window.close();
            }
        }

        window.clear();
        window.draw(shape);
        window.display();
    }

    return EXIT_SUCCESS;
}
 

I have compiled SFML from the latest github code and testing on osx 10.9.4. The display settings are set to default "best for display".

Is this intended behavior? is it possible to make the lower resolution scale to fullscreen? of course the fullscreen window size is fine at the native 2880x1800 but it does take hit on performance.

11
SFML projects / Re: Spine: 2D skeletal animation for games
« on: February 18, 2013, 05:45:52 am »
Very nice and polished software :) exactly what I need. Also backed ;)

12
SFML projects / Re: Blokade [source and binaries now available]
« on: February 03, 2013, 09:56:48 am »
I updated the first post with version 0.9.3 with top 5 high scores support :D

13
System / Re: isKeyPressed does not always capture input
« on: February 01, 2013, 07:53:38 am »
Quote
if I read correctly, you used IsKeyPressed, instead of the signal emmitted by SFML, so only if on that millisecond, the key is pressed down, will it return true, this may be your problem?

I changed my code last week to check if the isKeyPressed is true on this frame but it wasn't on the last frame then I process it as "pressed". It is better but I still get the issue. I'm considering using the SFML events, for the menu navigation anyway. For the gameplay itself, isKeyPressed works great.

Quote
By chance, just to rule it out, have you tried a different keyboard?

I have not tried to plug another keyboard on my macbook. Not sure if it works.

Quote
if a sleep (or heavy processing) happens before the if statement that's checking for the window closed, that might be causing it

I read the keyboard very early in the frame main loop, I don't really see a hold up.

Quote
This is the expected behaviour with real time input. If you have long processing, use sf::Event instead.

Maybe SFML events is the way to go then. Wouldn't be that much code to change.

Thanks all for your help :)

14
Window / Re: SFML window crashes
« on: January 30, 2013, 05:59:31 am »
yes, try with SFML libraries "MinGW TDM GCC 4.7.1 32bit" from eXpl0it3r's nightly builds http://sfml.my-gate.net/nightly/. The ones from the official download might not work with the latest code::blocks mingw bundle.

15
General / Re: Problem starting SFML 2.0 with CodeBlocks
« on: January 29, 2013, 06:30:40 am »
I had a similar runtime crash problem and using that same nightly build fixed it too :)

Pages: [1] 2