Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 21 Sep 2005
Offline Last Active Apr 05 2014 08:46 AM

Posts I've Made

In Topic: What free c++ IDE has the best syntax highlighting? ( not including VS2012 )

08 October 2012 - 02:22 AM

I vote for Qt Creator. It's open source and cross platform (win, linux, mac).

The syntax highlighting is very decent. For example highlighting of a symbol under cursor highlights it correctly inside its scope, not just the same word in the whole editor. Code completion just works (unlike Visual Studio's Intellisense).

I like also small refactoring features, like changing declaration of a method in a header file will automatically sync the change to the implementation in the .cpp file. The code editor has also features like follow symbol (Ctrl+click), find usages, switch between definition and declaration, etc. These things in Qt Creator just work, while in other IDEs I've tried, only work sometimes.

Although the IDE is not as customizable as Visual Studio or Eclipse (forget dockable panels), it's organized quite ergonomically and it's very fast (unlike eg. Eclipse).

You can download the SDK installer here: http://qt-project.org/downloads

It's worth to mention, that the Qt Creator IDE was designed to work with the Qt libraries, which itself is a great cross platform application toolkit for writing any kind of app imaginable. It literally runs everywhere, eg. besides desktop platforms also ARM and embedded platforms, Android, soon iOS. You can of course use Qt Creator and not use the Qt libraries if you don't need them. However if you are into C++ and cross-platform development, I strongly recommend looking into Qt itself.

In Topic: Confused about char types.

26 June 2010 - 03:56 AM

Unicode text files usually (but not necessarily) start with a byte sequence, called the Byte order mark or BOM. This is a sequence of 2, 3, or 4 bytes which tells you which unicode encoding is the file saved in on the disk.

If you use .Net/CLI you can use the StreamReader class to read your text files. It automatically detects the byte order mark and chooses the correct unicode encoding to translate bytes to characters.

In Topic: Specular problem solved

07 February 2010 - 06:51 PM

Clearly this is problem of the mesh, not the shader, as Ashaman73 pointed out. The surface normal continuity is broken where the specular seam appears. When dealing with smooth surfaces, one way to avoid such artifacts is to share vertices (and thus share normals and texcoords) between adjacent triangles. I.e. store each vertex of the mesh just once and use indexes to form triangles.

In Topic: Game Programing Books.

07 February 2010 - 08:01 AM

If you already know a programming language and want an introduction to game programming, then I would recommend Core Techniques and Algorithms in Game Programming by Daniel Sanchez-Crespo Dalmau - http://www.amazon.com/Core-Techniques-Algorithms-Game-Programming/dp/0131020099

It won't teach you how to program Crysis-looking game, but it will give you a decent introduction into what's going on inside a game.

In Topic: 2D UI Transformations

06 February 2010 - 05:27 AM

I found out, that for me (in my D3D9 based engine) it best works to use one dynamic vertex buffer for all ingame GUIs and fill it every frame with GUI quads. That way I have total control over the quads. I can update the quads every frame and animate their position, color/alpha and texture coordinates very easily. Vertex updates are really fast if you use a dynamic vertex buffer along with D3DLOCK_DISCARD or D3DLOCK_NOOVERWRITE. In my case there was almost no performance difference between the two approaches:
- update GUI quads every frame using dynamic VB.
- cache GUI quads in a static VB once, draw them many times
So I would naturally opt for the first way - fill the VB every frame.

To your second question: scaling operation works relative to the origin of the coordinate system (in fact every transformation works relative to the origin). Say, your quad has screen coordinates (left,top,right,bottom) = (2,4,8,6), then scaling them by uniform scale coeficient 3.0 will result in new coordinates (6,12,24,18). So yes, the quad would seem to be translated too. What you want to do, is to translate the quad by the negative value of its absolute center position before scaling, then scale and then translate by the same value back. Of course you can combine these 3 operations into a single transformation matrix and perform the operation in one step.

Hope that helped a little.