Differences with version 1.0
- Perspective correction support.
- Dynamic lightening.
- Alpha
transparency.
- Mini OpenGL functions set to works with Triangles, Quads, and
Vertex Array.
- BSP and functions for 1st person camera games.
-
Landscape mode support.
- Performances increase:
- 95% more fast on iPAQ.
- 18% more fast on
Cassiopeia.
- 5 New tutorials showing :
- Alpha
transparency.
- Dynamic lights.
- Mesh
deformation.
- Use of mini OpenGL functions to draw triangles, quads,
and vertex array.
- How to display a Quake like scene, define fixed
lights, and use a 1st person camera.
PocketGL 1.1 specifications
Axis Description : Direct orient, same as OpenGL

Camera is centered on (0, 0, 0) and look to -z
All triangles must be
textured.
All vertex have a light intensity level.
Because renderer used fixed point calculation, following constraint have to be respected to avoid overflow:
Range of vertex coordinates range must be in [-23170..-23170]
Texture tile
max must be < TEX_TILE_MAX (defined to 32)
Perspective Correction:
Rasterization of faces using perspective correction is more slow than without. Perspective correction can be activated never, always, or auto. In automatic mode, renderer evaluate perspective disformation, and apply correction if required. The maximum allowed disformation can be defined by user.
Transparency:
There are 2 alpha modes:
Binary mode:
- A given color is defined as transparent
(ALPHA_KEY = black). This color is not drawn, and Z buffer is not
modified.
Alpha Mode:
- The final color will be the sum
between alpha texture color and screen background color. For optimization
reasons, the transparency ratio is fixed to 50%. So final color is always 50% of
backgroud color + 50% of texture color.
The renderer automatically z sort alpha faces and draw them at scene end for correct alpha rendering.
Mixed mode:
- It is a mix between Binary mode and Alpha
mode. Pixel with color different of ALPHA_KEY will be drawn in Alpha mode.
The rendering mode (Binary Alpha, Alpha, Mixed, Opaque) is a texture parameter.
Textures: - The actual code can import only uncompressed TGA files for textures.
- The texture can be only 24 bits depth only.
- X an Y size must be a 2^n
multiple. (exemple : 16*32, 32*64, 64*64 ... etc. max is 128*128)
- Texture coordinates are integer values
and define directly texture size.(ex 0..64). (On floating point systems, texture
coordinates are floats generaly between 0 to 1 (if not tiled)).
Rotations: Units for angles are not degree, or radian, but an integer value between 0 to ANGLE2PI (set to 2048).
Dynamic Lights:
Up to 16 dynamic lights can be defined. Each light can have 2 lightening
mode:
- Omni mode : light intensity will depend directly of mesh
faces orientations.
- Diffuse Mode : Smooth lightening mode.
Fog:
The fog color is always blacks.
There are 2 fog modes:
-
Linear fog: attenuation of mesh intensity depend of the distance.
- Z2
fog: attenuation of mesh intensity depend of the square of the distance.
The fog mode and depth can be defined by user.
MiniGL:
A set of OpenGL instructions allow to works with Triangles, Quads, or Vertex Arrays. The purpose of these functions is to allow learning 3d with OpenGL tutorials.
BSP: (binary space partition)
A bsp function allow to draw faster fixed objects of a scene.
The scene is cutted into blocks, when rendering, PocketGL check if a block is visible on screen. If yes, the block is Z sorted, a test is done to know if block is not hidden by another one (to avoid drawing hidden blocks). If block very near of camera, perspective correction is applyed.
The BSP cut parameters can be defined by user, depending of scene size.
Unzip the PocketGL.zip file in C:\PocketGL folder
The directory structure must be as follow, with demo version
some folders are missing

The CasioTutorialsExe directory contain
compiled tutorials plus requested dlls for Casio Cassiopeia.
The Data
directory contain datas for tutorials, 3dsmax scenes, and requested
textures. It contain too the ExportPGL.exe program.
The
ExportPGL directory contain sources and project
workspace of ExportPGL program (full version only).
The GApi
directory contain standard gapi lib and dll for pocket pc games.
The
IpaqTutorialsExe directory contain compiled tutorials plus
requested dlls for iPAQ.
The LibAndDLL directory contain
PocketGL librairy and dlls for Pc and PPc.
The Pc folder
directory contain renderer project workspace for PC (full version only).
The
PcDemo directory project workspace for tutorials running on
Pc.
The PPcDemo directory project workspace for tutorials
running on Pocket PC.
The Src directory contain sources
of tutorials, and for full version, a sub directory with sources or
renderer.
The WinCe directory contain renderer project workspace for Pocket PC (full version only).
The demo programs can be compiled with Visual C++ 6 (Target = PC) and Embedded Visual C++ 3 (Target = Pocket PC).
Create on you pocket PC a '/PocketGL' directory on root.
Copy from directory 'Data' on the PC the requisted datas used by tutorials.
The requested files are : ( .p3d, .Tex, .Tga files, other not requested)
(tutorial 1)
DEMO1 TGA 12 306 16/09/01 10:43 Demo1.tga
(tutorial 2)
LEMMERGE P3D 38 076 28/11/01 19:26 LemMerge.P3d
LEMMERGE
TEX 69 804 28/11/01 19:26 LemMerge.Tex
(tutorial 3-4)
LEM P3D 41 516 28/11/01 19:26 Lem.P3d
LEM TEX 168 132
28/11/01 19:26 Lem.Tex
(tutorial 5)
SOLAR P3D 28 564 28/11/01 19:26 Solar.P3d
SOLAR TEX 49
300 28/11/01 19:26 Solar.Tex
(tutorial 6)
ALPHA P3D 3 836 28/11/01 19:27 Alpha.P3d
ALPHA TEX 24
628 28/11/01 19:27 Alpha.Tex
(tutorial 7)
LIGHTSCENE P3D 77 756 28/11/01 20:04 LightScene.P3d
LIGHTSCENE TEX 32 868 28/11/01 20:04 LightScene.Tex
(tutorial 8)
WATER P3D 23 676 28/11/01 19:26 Water.P3d
WATER TEX 53
444 28/11/01 19:26 Water.Tex
(tutorial 9, textures for cube faces)
FNT0 TGA 12 306 21/11/01 16:23
Fnt0.tga
FNT1 TGA 12 306 21/11/01 16:24 Fnt1.tga
FNT2 TGA 12 306
21/11/01 16:24 Fnt2.tga
FNT3 TGA 12 306 21/11/01 16:24 Fnt3.tga
FNT4 TGA
12 306 21/11/01 16:24 Fnt4.tga
FNT5 TGA 12 306 21/11/01 16:24 Fnt5.tga
(tutorial 10, Quake3 map)
QMAP2 P3D 289 252 28/11/01 14:31 qMap2.P3d
QMAP2 TEX 278 420 28/11/01 14:30 qMap2.Tex
Dlls
Copy gx.dll from /GApi/Mips or GApi/Arm.
Copy
Board3d.dll from /LibAndDLL/LibMips or /LibAndDLL/LibArm
(PocketGL Rasterization dll)
(Make sure your folder option do not hide dll files)
Then now you are ready to compile and test tutorials.
If you want in a first time to quickly test tutorials without loading
projects and compiling, you can use compiled tutorials in CasioTutorialsExe or
iPaqTutorialsExe.
Note: these directory contain too, requested gx.dll and
Board3d.dll
Copy these files in /PocketGL directory to test them (Datas and dll must be present, as describe before).
- Load the project file PocketGLDemo.dsw in the PcDemo folder with visual C++ 6
- Load the project file PocketGLDemo.vcw in the PPcDemo
folder with embedded visual C++ 3
There Are 10 tutorials programs : Demo1 to Demo10. To activate a given demo, edit the define.h file and set DEMOx define value to 1 depending of the demo program you want to run. Activate only one demo at a time.
On pocket PC, when program is compiled, copy it in the /PocketGL folder and run it directly with pocket PC.
Tutorial1

Draw only a quad containing 2 faces with a texture. Show how to init geometry with code, and activate perspective correction.
Tutorial2

Draw a lunar module defined as a single object. Show how to import data.
Tutorial3

Draw a lunar module defined as multiple objects. Show how to import multiple meshs. Show too, how to use transparency.
Tutorial4

Draw lunar module, show how to use texture animation, object scaling, and matrix stack. The module can be controled with up arrow key.
Tutorial5

Draw solar system.
Show how to:
- use matrix
stack to define relative moves.
- modify dynamically vertex color
intensity.
- Define a landscape mode
-Write directly in virtual screen (background stars).
Tutorial6

Draw stained glass with alpha transparency.
Show how to define alpha mode.
Tutorial7

Draw a scene using 2 dynamic lights.
Show how to create dynamic lights, and how to change lightening mode.
Tutorial8

Draw a scene with animated water surface.
Show how to dynamically deform a mesh.
Tutorial9

Show use of MiniGL functions.
Top Cube use GL_QUADS, Bottom cube use GL_TRIANGLES, and 3rd cube use Vertex array.
Tutorial10

Display a Quake3 scene.
Show how to:
- Display a Quake like scene.
- Create a 1st person camera
- Define
fixed lights (different of dynamic lights)
- Create lightening effects
-
Create a BSP.
- Draw with BSP.
To import data in renderer you need 2 files
- a xxxxx.P3d file
containing geometrie
- a xxxxx.Tex file containing textures
a/ Create your scene/objects with 3dsmax.
Take care that object sizes are
not too small. Because renderer use only integers, vertex coordinate will be
converted to integer. In the Data directory you will find 3dsmax example showing
valid dimentions.
b/ Always do a 'reset xform' on objects scaled or rotated. Geometric transformations defined in object matrix, except position, are not exported.
c/ - Define Vertex color for every objects. If not defined, export will define default vertex color values to white.
e/ - Export you scene in text ASE format. The ASE export options are shown in following picture.

f/ Use the 'ExportPGL.exe'. (Dos program)
This program read xxx.ASE file and create 2 files
xxxxxx.P3d
xxxxxx.Tex
This files can be imported directly in renderer (refer to C++
code examples)
See the following picture for Program command line. It take
lem.ASE file, and create lem.P3d and Lem.Tex files.
Source code of this program is included in full version.

Do not disable faces culling (activated by default), this allow to draw only faces oriented to camera. (disable culling only for dual sided faces).
Use Bsp if scene is big and lot of the scene is out of the field of view.
Activate perspective correction only if required. Generaly it is necessary only if faces are very near of the camera. (Quake scene). For mario style camera (Ex: Ghost World), perspective correction is not required. Refer to tutorial 10 to see how to set perspective correction activation level (auto mode).
If scene contain lot of faces hidden by others, then you can z sort all the faces (function to sort all faces is included), and use HRS (hidden remove surfaces) mode. This mode check with Zbuffer if the face will be visible before to draw. This take some time to check, but avoid drawing hidden faces. Generaly rendering is more fast in this mode (even is faces are not z sorted).
In full version :
- Source code of
renderer is included (C and C++). Allow to modify rendering parameters , and to customize it depending of
application. However the source code of rasterization DLL (Board3d.dll) is not
provided.
- ExportPGL
program source code.
- Royalties free for commercial
application.
In demo version :
- PocketGL
is a static librairy, some parameters can not be changed without rebuilding.
- Only tutorials sources
- The demo
version is for personal or freeware use only.
A message forum is active at :http://pub41.ezboard.com/fsundialsoftpocketpcfrm1
For bug report, or questions, email to pierrel5@free.fr