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

Pages: 1 2 [3] 4 5 ... 26
31
Window / Re: WM_NCHITTEST / WM_SETCURSOR
« on: March 06, 2014, 01:21:48 pm »
Thanks Laurent, I'll check it out now.

Any ideas why it worked OK on 2.0, but not on an older 2.1?

32
General discussions / Re: Source code consistency
« on: March 06, 2014, 01:08:46 pm »
We've got 5 coders in my game dev company. All have their own style - some are very modern, camel-case, one is VERY old style (is from asm background) and whose code looks like a car crash.

This makes is quite hard for everyone else to understand what is going on, but you can't teach an old dog new tricks.

Remember the goal is to make the code smaller, more robust and easy to learn. Doing this means smaller learning curves and therefore, shorter development timescales.

Some of our guidelines:

1. Using the “broken window” theory (Google it!), poorly written code and hacks/bodges only encourages more bad code and hacks to already hacked code. Soon you end up with total spaghetti, incomprehensible and a disaster in waiting.

2. Treat all warnings as errors. This means that a build should happen without any warnings of any description – no matter how trivial. Leaving minor warnings such as signed/unsigned mismatches is sloppy and a bad example to other coders.

3. Use C++ casts instead of old style C casts – in C++ casts, the compiler checks the cast is valid and not going to cause problems at runtime (between int and char pointers especially).

4. Don’t use const char strings. This is 2014 not (C) 1989.

5. Think carefully when using default arguments. It makes code hard to read (as the function definition doesn’t match the call).

Ed

33
Window / WM_NCHITTEST / WM_SETCURSOR
« on: March 06, 2014, 12:41:21 pm »
Hi

My app has 2 windows on 2 separate monitors. When I click a button on one screen, I have to click twice to get the button to function, and again twice on the other screen, etc. So it seems that the window (cursor?) doesn't have focus and my app is getting the mouse XY for the wrong screen, as I can click one part of a screen, and it actions the button on the other screen (in the same XY position).

I have another app, on an older version of SFML (2.0) which works fine.

I have produced log files of WM_ messages, and the difference is, on the app that works OK, I am seeing this very often (every frame, I think):

WM_NCHITTEST
WM_SETCURSOR

I see the MouseMoved code is very different from 2.0 to 2.1.....but I don't think this would be the problem.

Does anyone have any ideas?

Ed


34
General discussions / Google Native Client / PNaCl
« on: March 04, 2014, 05:58:20 pm »
Hi

Has anyone seen this Google Native Client stuff? Basically, you can run C/C++ code in Chrome. Google seem to think it's the future, everyone else (Mozilla..) won't touch it.

I have a development environment setup for doing some work on this, and I was wondering how hard it would be to port SFML. I imagine it should be fairly straightforward; as all it needs is to be platform agnostic. Oh and use OpenGL ES 2.0 :D

Ed

35
Window / [SOLVED] Re: Loads of LostFocus/GainedFocus events
« on: December 11, 2013, 01:09:15 pm »
That has fixed it. You can redraw the screen, and (maybe or) just bring your window to the top/topmost on receiving this message.

36
Window / Re: Loads of LostFocus/GainedFocus events
« on: December 11, 2013, 11:27:58 am »
Capturing all Windows messages to stderr in text form revealed the difference between running the game, pressing the screen, and running the game and NOT pressing the screen shows a WM_CAPTURECHANGED message (when screen is pressed), which according to MSDN, suggests you should redraw the screen.

Watch this space.

37
Window / Re: Loads of LostFocus/GainedFocus events
« on: December 10, 2013, 01:46:20 pm »
Hi

This is a kiosk style application, so I can't update the drivers etc. But PC specs are:

Intel Core 2 Duo @ 2.6 GHZ
4GB RAM
Radeon E6460 (512MB)

Displays are 2x 1680x1050 (1 is touchable) and 1x 1680x342 (touchable)

38
Window / Loads of LostFocus/GainedFocus events
« on: December 10, 2013, 01:25:29 pm »
Hi

I am getting spammed with loads of LostFocus/GainedFocus events every second in my app. I am drawing to 3 windows (two of which are touchscreens), and generally I am getting this:

LOSE FOCUS WINDOW 1
LOSE FOCUS WINDOW 2
GAIN FOCUS WINDOW 1
GAIN FOCUS WINDOW 2

The result of this, is, the first time I touch one window, then another, the screens flicker for a short time.

Does anyone have any ideas? This is a W7 PC.

Thanks

39
General / Re: Entry Point Not Found
« on: October 24, 2013, 10:32:40 am »
Can you provide us more information about your environment? What PC, compiler, IDE, etc....and did you rebuild SFML from the source or download binaries?

40
General / Re: Multithreading question
« on: October 18, 2013, 10:24:11 pm »
Thanks Laurent, I thought as much.

After the saga of trying to use 3 monitors, 1 on another video card - I have it (almost) working, but I can only get 5fps out of the 2nd video card. Why can't life be simple and things just work.....

41
General / Multithreading question
« on: October 18, 2013, 03:13:11 pm »
Hi

I should know the answer to this, but I don't.

If I launch a thread from within my SFML app, and open a new window, load graphics, etc, is this effectively a new instance of SFML? So everything is separate from the main thread which has it's own windows etc.

Thanks!

42
Graphics / Re: sf::RenderTexture destructor causes a crash
« on: October 07, 2013, 09:59:54 pm »
What graphics hardware does this crash on? Intel are famous for poor OpenGL driver support, I am sure any problems are because of this.

We have our SFML apps on roughly 50,000 industrial PC systems using different hardware, running ~18 hrs a day, every day, and no problems - except for systems with Intel drivers where we've had to make so many changes to get it stable.

43
Graphics / Re: Alpha transparency shows white
« on: October 02, 2013, 08:07:56 am »
Unfortunately, I can't easily as it's part of a huge game engine, but I'm going to make a sandbox later and see what happens. I just wondered if anyone had seen this so I can quickly resolve it.

44
Graphics / Alpha transparency shows white
« on: October 01, 2013, 09:21:52 pm »
Hi

Has anyone ever seen graphics with alpha pixels showing as white? I have this strange behaviour on a newer Intel HD graphics device.

Thanks

45
Window / Re: wglMakeCurrent fails
« on: September 20, 2013, 04:15:46 pm »
There is something strange going on where another thread is created by something Windows does when this class is instatitated.

But, I found the problem - I was doing a display(); call from a callback function which is triggered by an external process  :-[

Hope I didn't waste anyone's time..

Pages: 1 2 [3] 4 5 ... 26
anything