Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 26 Mar 2002
Offline Last Active Aug 11 2016 12:03 PM

Posts I've Made

In Topic: Beginner - DirectX and C++

19 June 2015 - 02:52 PM

For inputs you have 2 options:

  • Listen for WM_KEYDOWN and WM_KEYUP events.
  • Use Direct Input. (my recommendation). it is keyboard agnostic so WASD will be mapped to the same keys even on AZERTY keyboards.

Google around for Direct Input tutorials.


If you need text input, don't use neither of those. use the WM_CHAR event.

In Topic: (Super) Smart Pointer

11 July 2014 - 10:16 AM

We call this a "Weak Reference".

I don't have examples at hand, but that's the term you want to search for smile.png


Edit: What BitMaster said. std::weak_ptr


21 May 2014 - 03:24 PM


If the shape is 2D, and you've manually moved the top two verts closer together, you'll get the image in the middle. D3D/GL cannot magically fix this for you.

Exactly, this is the purpose for the original question. It seems that this GL Hint does 'magically' fix it.


I highly doubt OpenGL can fix this also.


The hint is called "PERSPECTIVE". Which means it doesn't work for 2D. It needs the z (depth) value to calculate this correctly. In 2D no such things. The GPU can not know the context of that triangle in a 2d environement. And doesn't understand it is a quad at low level.


If all 4 points have the same z value in your 2D render (let say, 0), and GL gives you the right picture, then the driver or opengl is wrong. What about I want to skew a rectangle on the side?

In Topic: A good engine for GameDev...

20 May 2014 - 04:17 PM

If you don't want to do a lot of coding, like you say. And you already know C#. Then Unity3D is your choice.


XNA is certainly enough to make interesting games. Tons of games on Steam use it. And I did pretty amazing stuff with it.


I'm personally not a big fan of "Engines" per say. I prefer having a set of libraries that do certain jobs for you: Load images, draw fonts, do inputs, etc. Like SDL or SFML.

Then you build the "game engine" around it.

In Topic: Questions for all programmers.

16 May 2014 - 01:01 PM

1) What was the first programming language you studied?

QBasic in DOS


2) Did you have any Computer Science background before your first language (ie: boolean algebra, memory organisation, algorithms)?



3) The first language you studied was it self-taught, formal instruction, or both?



4) Was the Computer-Science background self-taught, formal instruction, or both?



5) When you started to study Computer Science did it help your understanding of the language you first learned?

I never studied Computer Science. But my game programming courses didn't help much as I had already learned everything by myself. But my background helped me get good grades.


6) What kind of environment did you first program in (ie: the IDE or text editor, and the OS)?

QBasic had it's own text editor in DOS