|
Blog | Tags | Archives | Projects | Stats | Contact
Tags: Algorithms, Image retargeting
I came up with a neat way to retarget images using a mesh that is transformed by rotating and doing an ortographic (non-perspective) projection. This is generally quite interesting since it can be done using a mesh and simple transformations and so can be done almost completely on the GPU. Even using a mesh can [...]
Read more...
Tags: C, GCC, OpenGL
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...
Tags: C, Memory, Windows
It’s a common practice not to check what malloc() or new returns, since in an ideal world you will never run out of memory and so allocating memory will never fail. With a reasonably sized page file that is mostly true. When using a page file, this wouldn’t be a problem since if there is [...]
Read more...
Tags: Algorithms, Collision detection, Game programming, OpenGL, Source code, Video games
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...
Tags: Search algorithms, SQL
In Viewer2, there is a feature that allows fast text searches on huge databases with tens of thousands of filenames. Here’s how I did it.
Read more...
|