homeBlog | Tags | Archives | Projects | Stats | Contact

OpenGL, Static Arrays and glMaterialfv

Jul 19, 2009

no comments
Popularity:

I stumbled upon weird behavior of OpenGL: I was setting material properties with glMaterialfv and for some reason this did not change the parameters if done multiple times in succession. I.e. when I drew two versions of the same object on the screen side by side with different material parameters, they both looked the same.

Read more...

Collision Detection with Occlusion Queries Redux

Jul 23, 2008

4 comments
Popularity:

Here we describe a method for checking collisions between arbitrary objects drawn by the GPU. The objects are not limited to any shape, complexity or orientation. The objects that are checked for collisions can be the same objects that are drawn on the screen. The algorithm is pixel perfect but without further refining is limited to 2D collisions.

Read more...

Hardware-accelerated 2D collision detection in OpenGL

Jul 11, 2007

no comments
Popularity:

NB: Here is a better post about the below algorithm. Includes source code. The idea Did you know you can do pixel accurate collision detection using the OpenGL stencil buffer and occlusion queries? I got this idea while working on a 2D/3D game engine (think of a side-scroller but with 3D objects). A proof that [...]

Read more...