topleft
topright

Latest Poll

Your favorite Asphyre package?
 

Who's Online

Texture Mapping PDF Print E-mail
Written by Yuriy Kotsarenko   
Tuesday, 04 December 2007

Icon This page contains an open-source Delphi project, which demonstrates several texture mapping algorithms, 3D rendering pipeline and PQ Torus Knot runtime generation. The project comes with compiled binary and full source code.


Although OpenGL and Direct3D both have hardware implementation of texture mapping, there are systems where such implementation is not available. The code can be converted to FreePascal/Lazarus with minimal effort and can be particularly useful on embedded systems like PocketPC with Windows CE.


The project uses several pieces from Asphyre Casual Framework to simplify tasks such as image loading and software rendering canvas. All the required units were included in the package to make it self-contained.


  • The application generates a 3D mesh in run-time based on PQ Torus Knot explanation written on Jim Scott's blog.

  • The software 3D pipeline uses SIMD/SSE vector transformation routines originally published embedded in C/C++ by Cort Stratton in 2002. The code was adapted to work with Delphi.

  • The application contains Affine Texture Mapping code originally written in C/C++ and published in "fatmap2.zip" package by Mats Byggmastar in 1997. The code was ported to Delphi.

  • In addition, the application uses Perspective Texture Mapping code originally written in C/C++ by Chris Hecker and published in his articles. The code was ported to Delphi and is available with the kind permission of the author.

  • In order to render triangles properly on the screen, the application uses an implementation of Sutherland-Hodgman algorithm for clipping polygons with optional perspective correction.


The project and its source code are protected by Mozilla Public License 1.1. You can recompile the project using Delphi 2006 and later.


Download Package (04-Dec-2007):

TexMap2.zip - ZIP package (990 Kb)
TexMap2.7z - 7z package (800 Kb)


Last Updated ( Tuesday, 04 December 2007 )
 

Call for content

We are constantly looking to add new content to our site. If you have anything you want to be published here, please contact us. Advertising solutions are also available for those who are interested.

Asphyre Casual Framework

A new framework has been released for those developers, who are interested in creating 2D casual games. It has all 2D capabilities of previous Asphyre versions, but is completely based on DirectX 7.0. Read more about it here.

Projects Section

This site will also feature projects section, where you can download projects and their source code. You can contact us if you want your project to be added as well.

Joomla Template by Joomlashack
Joomla Templates by JoomlaShack Joomla Templates