OpenGL & Direct3D Tutorials
These tutorials aim to show the common stuffs (and differences...) between the two most frequently used API in real time 3D. It is not about saying that one is better than the other, which is a nonsense. Those libraries are just tools for transforming our imagination into something visible on the screen. Using one API instead of the other is just a question of feeling, and maybe also of technical constraints (OpenGl would be more suitable for developing a 3D application on Unix for example). In my opinion, I prefer OpenGL because of its simplicity and Direct3D because of its speed (on Windows ...).
Tutorials relating to Direct3D have been developed with the DirectX 8.0 SDK. They can be converted quite easily into the latest 9.0 version.
And now, have a nice code!
JeGX
Note: the following tutorials do not use oZone3D engine. They are coded directly with OpenGL and Direct3D API .
http://www.ozone3d.net/opengl_direct3d_tutorials.php
| Tuto 01 OpenGL This tutor shows how to render in gouraud-shading mode a simple triangle.
|
|
| Tuto 01 Direct3D This tutor shows how to render in gouraud-shading mode a simple triangle.
|
|
| Tuto 02 OpenGL This tutor shows how to render a mesh in wireframe.
|
|
| Tuto 02 Direct3D This tutor shows how to render a mesh in wireframe.
|
|
| Tuto 03 OpenGL This tutor shows how to render a mesh with lighting.
|
|
| Tuto 03 Direct3D This tutor shows how to render a mesh with lighting.
|
|
| Tuto 04 OpenGL This tutor shows how to render a mesh with texturing.
|
|
| Tuto 04 Direct3D This tutor shows how to render a mesh with texturing.
|
|
| Tuto 05 OpenGL This tutor shows how to render a mesh with texturing and lighting and shows how to render specular highlights with multipass-rendering. The specular highlights can be rendered in one pass with a specfic OpenGL extension but this subjet will be seen in another tutor.
|
|
| Tuto 05 Direct3D This tutor shows how to render a mesh with texturing and lighting. Direct3D can render the specular highlights in one pass.
|
|
| Tuto 07 OpenGL This tutor shows the basis of Blending to make transparent faces and shows how to fill the Vertex Buffer manually.
|
|
| Tuto 07 Direct3D This tutor shows the basis of Blending to make transparent faces and shows how to fill the Vertex Buffer manually.
|
|
| Tuto 08 OpenGL This tutor show how setup Multitexturing (with an OpenGL extension) in order to achieve some kind of lightmapping effect.
|
|
| Tuto 08 Direct3D This tutor show how setup Multitexturing (it is a native feature of Direct3D) in order to achieve some kind of lightmapping effect.
|
|
| Tuto 09 OpenGL This tutor shows the use of the Stencil Buffer and how to play with the viewport.
|
|
| Tuto 09 Direct3D This tutor shows the use of the Stencil Buffer and how to play with the viewport.
|
|
| Tuto 10 OpenGL This tutor shows the Sphere Mapping texGen and the use of the Stencil Buffer.
|
|
| Tuto 10 Direct3D This tutor shows the Sphere Mapping texGen and the use of the Stencil Buffer.
|
|
| Tuto 11 OpenGL Speed up the FPS: EXT_swap_control extension. This tutor shows how to setup the OpenGL extension that allows us to control the vertical synchronization (vsync) in order to increase the fps.
|
|
| Tuto 11 Direct3D Speed up the FPS: no extension needed. By default, Direct3D has the vsync disabled
|
|
| Tuto 12 OpenGL This tutor shows how to discard pixels with Alpha Testing
|
|
| Tuto 13 OpenGL This tutor shows how to setup and use the DevIL Image Libraryto load various image formats. For details about this cool library, seehttp://openil.sourceforge.net
|
|
| Tuto 14 OpenGL This tutor uses the LynX 3D Viewer Lite for loading a 3D model and exporting it to a C code (teapot.c). This code is directly used in the project. The mesh exported contains the normals (for lighting) then the loading is straightforward. The tutor shows how to render specular highlights in one pass usingGL_EXT_separate_specular_color extension. The texture is loaded using DevIL Image Library.
|
|
| Tuto 15 OpenGL This tutor shows how to load a compressed texture in the O3TC format using the glCompressedTexImage2D function. This texture format is described in detail in the following tutorialNormal Map Compression. The O3TC format has the same features than the DDS and is really simple to load. This tutor shows also how to setup the trilinear filtering.
|
|
| Tuto 16 OpenGL This tutorial shows the use of OpenGL VBO (Vertex Buffer Objects) and the GLSL (OpenGL Shading Language).
Tuto |
|