Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your help!

We need 1 more developer from Canada and 12 more from Australia to help us complete a research survey.

Support our site by taking a quick sponsored survey and win a chance at a $50 Amazon gift card. Click here to get started!


Member Since 24 Mar 2001
Offline Last Active Today, 02:14 AM

Posts I've Made

In Topic: C++ Operator Overloading: Bitwise Operators & If-Check

02 August 2015 - 10:21 PM

I suspect it was supposed to be (f & uf) != 0, since the other version is definitely not equivalent. It prevents the implicit cast from unsigned to bool and all the potential compiler warnings that come with it (in VS it's usually something about runtime performance).


I do not know what his intention was, however typically if you're testing flags and you want to ensure that all of the flags you are testing are set, you want (flags & flagsToTestFor) == something, as otherwise only having some of the flags in flagsToTestFor set can still return non-zero.

In Topic: Multithreading problem when reloading a D3D model on user input

19 July 2015 - 02:44 PM

Lets get started here:

  1. Why aren't you using std::thread?
  2. The function you're passing to CreateThread MUST be __stdcall (WINAPI). Microsoft goes to a lot of effort to detect when people do bad things like pass in cdecl or similar calling conventions. All that work is overhead you inherit when you do it wrong.
  3. Having a function called "createThreadFunction" that takes a VOID POINTER as a function parameter is just flat out wrong. Don't do this.
  4. bool, and std::atomic<bool> are not mutexes. You can use std::mutex if you need mutex like behavior.
  5. While std::atomic<bool> does enforce a memory barrier, it does not prevent multiple pieces of the same code from running at once.

In Topic: How do game designers communicate?

13 July 2015 - 02:25 PM

How do they communicate?

With Flowdock of course.

In Topic: D3DXCreateTextureFromFileInMemoryEx in a thread failing

13 July 2015 - 08:26 AM

Did you create your device with D3DCREATE_MULTITHREADED specified?

In Topic: Is Haxe used much professionally?

12 July 2015 - 10:38 PM

Here are some questions I've started using before bothering to evaluating the use of any more languages:

1. How much of the AST is available to tools. I'm thinking: Auto-complete tools that don't have to do source analysis, tools for profiling, etc.

2. What does the development environment look like: What kind of immediate debugging tools are available for both stand alone development AND embedded development. Debugging tools that only work on the stand alone code are, frankly, useless.

3. Why should I use this? What problems does it solve that existing mature scripting languages don't solve well. Is it's tool environment that much better? Does it have a significant performance advantage?

4. What does it look like from the embedded perspective. How hard is it to integrate? Are we talking C like bindings? Boost python? How hard is it to control it, how much control do I have over things like the libraries it includes by default, memory management, etc?