Introduction
This is a translation of Tom's Glass demo from Pascal code to C++ code using GLUT. The original code used ARBvp1.0 and ARBfp1.0 and some nVidia extensions.
This one uses non-extended ARBvp1.0 and ARBfp1.0 and also GLSL 1.00 (to compare performance)
It uses FBO for Render_To_Texture instead of p-buffer.

This program requires GL 2.0 at least.

The extensions needed are :

  • GL_ARB_vertex_program
  • GL_ARB_fragment_program
  • GL_EXT_framebuffer_object

The Source

The files included are :

  • glass_delphi3d.cpp (The main CPP file)
  • glass_delphi3d.h (The main H file, with GL entry point declarations)
  • global.h (Some type declaractions)
  • MemoryManagement.h (Memory management functions used by the OBJ loader)
  • TOBJFile.cpp and TOBJFile.h(My OBJ loader class)
  • StringFunctions.h (Some string functions used my OBJ loader)
  • nv_tga.cpp and nv_tga.h (Nvidia tga loader)
  • v_glass.txt f_glass.txt (ARBvp1.0 and ARBfp1.0 for glass effect)
  • v_depthmap.txt f_depthmap.txt (ARBvp1.0 and ARBfp1.0 for writing depth to float Render_To_Texture)
  • glass_delphi3d.vert glass_delphi3d.frag (GLSL 1.00 version of above)
  • depthmap_delphi3d.vert depthmap_delphi3d.frag (GLSL 1.00 version of above)
  • Visit www.delphi3d.net for the original code


Download
glass_delphi3d.zip (117 KB)

These are the GLSL shaders used in HTML format. Text hilighting is used!
glass_delphi3d_vert.html
glass_delphi3d_frag.html
depthmap_delphi3d_vert.html
depthmap_delphi3d_frag.html


Screenshots








This page is http://www.oocities.org/vmelkon/glass_delphi3d.html
This page is http://ee.1asphost.com/vmelkon/glass_delphi3d.html
Copyright (C) 2004 Vrej M. All Rights Reserved.