Examples archives content and urls (download *here*)

Started by hitchhikr, August 20, 2005, 04:11:22 PM

Previous topic - Next topic

hitchhikr

The goal is to make these archives to grow according to the questions that may be asked here, so people can see concretly how things can be implemented, the sub-forum itself will serve for the explanations of the examples (& questions that may arise).

So far, the archives contain:

---------------------------------------------------------

- Alpha_Blend_Texture
  How to display transparent surfaces.

- Base
  Just test the framework.

- Bump_Mapping
  How to create normals maps & use dot3 textures generations.

- Custom_Sound_Mixer
  How to mix sounds in real time.

- Direct_Input
  Show how to use direct input.

- Display_BMP
  How to display .bmp pictures.

- Display_DDS
  How to display .dds pictures (compressed textures).

- Display_JPG
  How to display .jpg pictures (or any other types of pictures).

- Display_TGA
  How to display .tga pictures.

- Environment_Mapping_Texture
  How to use cube map textures.

- Flat_Rendering
  Show the difference between GL_SMOOTH & GL_FLAT.

- Fog
  Distance attenuations.

- GLSL_Shaders_Toon
  Use OpenGL's high language compiler to create shaders.

- gluLookAt_Camera
  Camera handling in a spaceship simulator like.

- Hidden_Lines
  How to display non-filled inconvex objects correctly.

- Horizontal_ScrollText
  How make horizontal scrolltexts with bitmap fonts.

- Infinite_Light
  How to use an infinite lighting.

- Light_And_colored_Texture
  How to use glColor on textured objects with a light source.

- Lists_And_Glu_Primitives
  How to use compiled lists and primitive from glu32.dll.

- Local_Light
  How to use a local lighting.

- Move_Origin
  How to change the origin of a matrix.

- Multi_Textures
  How to use several textures units.

- Pixel_Shader_Simple
  How to use pixel shaders to modify textures dynamically.

- Play_Sounds
  How to mix & play .wav files in realtime.

- Render_To_Texture
  How to render a scene on a texture.

- Scissor
  How to split the screen in several parts.

- Simple_Object
  How to display an object with direct vertices functions.

- Simple_Texture
  How to display a textured object.

- Skybox_And_Camera
  How to create a skybox & setup a simple camera.

- Specular_Material
  How to use shining material.

- Sphere_Mapping_Texture
  How to use the builtin textures coordinates generation.

- Spot_Light
  How to use spot lighting.

- Sprites_Animations
  Animations & collisions of 2d sprites.

- Sprites_Collisions
  How to handle collisions between 2d sprites.

- Text_2D
  How to display a text in 2d.

- Text_3D
  How to display a text in 3d.

- Text_Bitmap_2D
  How to display a text in 2d with bitmap fonts stored in textures.

- Texture_Matrix
  How to rotate/translate/scale a texture used on an object.

- Vertex_Array_And_WaveFront_Obj
  How to use vertex arrays and how to load wavefront 3d objects.

- Vertex_Shader_Simple
  Modifying vertices and calculating some lighting with vertex shaders.

---------------------------------------------------------

This will grow with time, of course, so stay tuned for more.

The archive is organized as follow:

- Examples/*
- Each example have it's own directory + 2 batch files.

- Examples/Bin
  Contains the assembled executables files.

- Examples/Common_Src
  Contains the framework & the support routine (such as pictures loading, etc).

- Examples/Include
  Contains the translation into asm of the latest (?) opengl definitions to replace the 
  opengl32.inc of masm32, they're mandatory for any serious opengl related work
  + some other ones.

- Examples/Lib
  Contains the required static libraries.

- Media
  Contains pictures & other misc. datas that'll be necessary for the examples to run.

-------------------

The sourcecodes of each example have been reduced to the minimum & are structured as is:

- Initialize:
  Make all necessary initializations.

- Deinitialize
  Free allocated resources.

- Update
  Perform any animations.

- Draw
  Draw the stuff on screen.

All the rest is located in the framework which deals with the handling of the windows & other details, i use several home made macros to make the things a little bit more compact.

http://perso.orange.fr/franck.charlet/Ogl_Asm.zip