• Recent Tutorials

  • Free Pascal Meets SDL: Convert SDL Images to OpenGL Textures

    You ever wondered if a SDL image can be converted to an OpenGL texture?

    That would be great fun since SDL, with its system independent, easy to use graphic file loader functions, combined with those mighty image manipulation features, could prepare amazing texture effects. That is if one knows how to convert the SDL image to an OpenGL texture.

    Okay, this idea isn't new, and actually has been done before, however a simple description how to achieve this is presented in the new chapter 8a at the Free Pascal Meets SDL tutorial site. It demonstrates how to texture one face of a tetrahedron.


    As always the tutorial contents aim towards people new to SDL and OpenGL, that prefer having Pascal code to work with since there are several other tutorials that mainly use C/C++ code. This chapter is highly inspired by 'Lesson 06 - Texture Mapping' by NeHe Productions' under their OpenGL tutorials. The source for this lesson is translated to Object Pascal under a Delphi project using JEDI-SDL by Dominique Louis.

    You can read the new lesson on converting SDL images to OpenGL textures at www.freepascal-meets-sdl.net.

    To read 'Lesson 06 Texture Mapping' and other great OpenGL tutorials by NeHe go to nehe.gamedev.net.