Jump to content


Member Since 08 Apr 2010
Offline Last Active Dec 12 2014 03:44 AM

Topics I've Started

Order your draw calls..

14 July 2013 - 11:14 AM

Hi everyone,


Just curious I was reading http://realtimecollisiondetection.net/blog/?p=86 when I decided to think about actually implementing the system as mention, but I faced a dilema. When sorting by key, which includes depth, what depth is that? The centroid of the renderable based on camera position? How do you deal with overlapping objects which centroids are properly sorted? Isn't that a problem? how are you supposed to handle those kind of issues?


In fact I was thinking how does this handles concave objects that wrap other objects within. My first guess was about splitting object into smaller sub meshes and then form the drawcall on the fly by combining those meshes, but seems quite suboptimal.


Any hints would be greatly appreciated, thanks.

Shadow Mapping Issue

19 September 2010 - 09:10 AM

Hello all,

I am trying to learn how to use shadow mapping technique. While learning basis from "OpenGL: Programming book" and "More OpenGL Game programming", I've been able to reproduce such technique on hardware using GLSL.

My problem comes with this image:

Where does that razor behavior comes from and how to correct it? My guess is that it is a polygon offset issue as round object seems to struggle with it. But how are we supposed to overcome this issue.

Image uses per pixel lighting and shadows are created by displaying only 50% of the original color. Per-vertex lighting seems to correct this issue as the polygon color smooths a way better thanks to vertex interpolation, but that is not an acceptable solution.


Gameplay "big enviromental objects" destruction question

14 July 2010 - 01:43 PM

Hi all,

This is a lack of knowledge question about how to handle in-game assets destruction animation for buildings and similar stuff.

I am completely clueless on how do people handle that. I know that you do not calculate them in real time as it is an expensive calculation and results might not be what you had in mind (ignoring Havok Destruction or Physx APEX). Most games have pre-calculated animations for destruction that they activate on events.

The real question is: Is that a bone animation? or Morph animation? or what is it?

Appreciate any hint on that subject.

P.S: Building destruction on current RTS is what I am looking for.

DevIL ilLoadImage/iLoad failure

28 June 2010 - 11:48 PM

Hi all,

I am posting as I am unable to find the problem myself nor on the internet. I hope someone can enlighten me a bit on this issue.

I am trying to load images using DevIL as loading library ( Freeimage is an option I have in mind, yet I like DevIL style ).

My DevIL code is as follows:

ilGenImages( textures.size(), ilTexID);
ilBindImage( ilTexID[i] );

std::wstring fn( textures[i].length(), L'' );
std::copy( textures[i].begin(), textures[i].end(), fn.begin() );

if( ilLoadImage( fn.c_str() ) ) {
ilDeleteImages( textures.size(), ilTexID);

NOTE: ilInit is done a way early on in the process.

The problem I am facing is that ilLoadImage(...) always return IL_INVALID_EXTENSION and when trying instead ilLoad( ... ) and specifying the image format I get a IL_COULD_NOT_OPEN_FILE. If I use ilLoadF(...), I get a segmentation fault, yet the FILE* is correct (tested by asking a ftell after a fseek(...,SEEK_END) for a file size ), thus confirming that the file address is right.

Anyone has a hint on this issue?


EDIT: Several formats have been tested, JPG, BMP, TGA...all of them failing.

[Edited by - kilah on June 29, 2010 6:06:36 AM]