Zanir » OpenGL

Archive for the ‘OpenGL’ Category

Program 21 – Collision

07.08.2002

014_dxf_loaderI use detection collision from www.gametutorials.com, there is this field good explained.

source code (without jpeg.lib) and executable – 230kB

Program 20 – Projected textures

03.08.2002

020_projected_texturesTexture projected on objects is interesting effect. This makes it possible do interesting lighting of scene, example uses light through stained glass.

source code (without jpeg.lib) and executable – 245kB

Program 19 – Sphere mapping

26.07.2002

019_sphere_mappingSphere mapping is technique of environment mapping. This uses a sphere map. A sphere map is a single texture of a perfectly reflecting sphere in the environment where the viewer is infinitely far from the sphere.

source code (without jpeg.lib) and executable – 342kB

Program 18 – Radial blur

17.07.2002

018_radial_blur

source code and program – 77kB

Program 17 – Motion blur

09.07.2002

017_motion_blurUnlike cine-camera where fast moving objest are blurred, each image rendered in OpenGL is sharp. This causes discontinuous motion also above FPS.

source code (without jpeg.lib) and executable – 80kB

Program 16 – Shadows by render to texture

06.07.2002

016_shadow_used_render_to_textureShadows are make with light maps. Light maps are created with render to texture. Light map was creat for each wall, so camera is moved to light position and draw with dark color all objects which cast shadows. This technique is possible used only shadows which cast to planar surfaces.

source code (without jpeg.lib) and executable – 222kB

Program 15 – Render to texture

03.07.2002

015_render_to_textureRendering to texture is interesting technique. That makes it possible to creates various effects: motion blur, radial blur, …
This works simple: uses glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 0, 0, size, size, 0); to copy data from screen to texture.

source code and program – 93kB

Program 14 – dxf loader

26.06.2002

014_dxf_loaderThese files export AutoCad or CADKEY. I load only quadrilateral surfaces – data from 3DFACE sections. Name of level uses for texture name.

source code (without jpeg.lib) and executable – 212kB

Program 13 – 3ds loader

26.06.2002

013_3ds_loader3ds files is possible export from 3ds max. In files are store texture coordinations and texture names.

source code (without jpeg.lib) and executable – 410kB

Program 12 – Emboss Bump-mapping

02.06.2002

012_bump_mapping012_bump_mapping_mars

source code (without jpeg.lib) and executable – 670kB