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

Pages: [1]
1
Window / Window/fullscreen mouse pointer position discrepancy
« on: August 24, 2011, 03:53:18 pm »
Quote
you added them where ? How did you compile SFML ? If you follow the tutorial about CMake everything should be fine.


Yes, well, I generally prefer to work with full source code, so I added the SFML code to my project. It makes it easier to do builds for several combinations of windows/macos/linux, 32/64 bits, debugging on/off, etcetera

It works perfectly fine as long as you add the correct frameworks and libraries.

As for the OSX cursor problem, here's a quick patch I coded that appears to solve the issue.
http://pastebin.com/YreF20zC

2
Graphics / 32bit png image saving
« on: August 24, 2011, 01:34:54 pm »
Damned, the bug is not in SFML, but in the bloody image viewer. Irfanview was reporting 24bpp and not showing the alpha channel at all.

Sorry for this stupid mistake.

3
Graphics / 32bit png image saving
« on: August 24, 2011, 11:19:24 am »
Ok, example code:

Code: [Select]
sf::Image img ;
img.Create( 256 , 256 ) ;
for( int x = 0 ; x < 256 ; ++x )
for( int y = 0 ; y < 256 ; ++y )
img.SetPixel( x , y , sf::Color( x , y , 255 , (256+x-y)%256 ) ) ;

img.SaveToFile( "C:/test.png" ) ;


This code produces a 24bpp png file, and not a 32bpp one. I've been looking at the code, and I don't see a way to specify this.
I'm even wondering if stb_image supports writing the alpha channel at all...

Any ideas?

Thanks in advance!

4
Window / Window/fullscreen mouse pointer position discrepancy
« on: August 23, 2011, 07:53:18 pm »
Ok, found another problem, now using the latest snapshot on MacOS 10.6.6

When setting window.ShowMouseCursor(false), the mouse is hidden even if it gets out of the window, but if you make it show by changing the focus to another app, then it doesn't autohide again when entering the SFML window.

Is this expected and should I handle this manually checking the mouseleave/enter events?

Edit: just checked on windows, and the same code displays the normal behaviour: mouse disappears when entering SFML window, and reappears when getting out of it, so I'm guessing it's an SFML bug...

5
Window / Window/fullscreen mouse pointer position discrepancy
« on: August 23, 2011, 07:31:48 pm »
It took a while, but I managed to update to the latest snapshot. I confirm the bug is gone in this version ;)

Btw, had to add several frameworks to get SFML compiling: IOKit, AGL and Carbon. The first two I understand, but I thought Carbon was deprecated and not really needed anymore to do anything on MacOS...?

6
Window / Window/fullscreen mouse pointer position discrepancy
« on: August 23, 2011, 02:32:33 pm »
OS is Mac OS X 10.6.6.

As for the SFML version, it's a snapshot of 2.0 taken about six months ago. I'll try to update it to the latest snapshot and see if it's fixed...

7
Window / Window/fullscreen mouse pointer position discrepancy
« on: August 23, 2011, 01:44:17 pm »
Hi there,

I've got a little problem here. I'm doing an in-game editor, and I've found that when the window has a titlebar, the mouse position is given relative to the top of the titlebar, while when it doesn't have one it's given relative to the window origin.

Biggest problem is having to check wether you are in fullscreen mode or not, to compensate for the titlebar or lack of it (and having to offset the mouse position an ad-hoc and non-portable distance).

Is this a known problem, and are there solutions around it?

Thanks a lot in advance

Pages: [1]
anything