As a registered user of PocketGL ( a shareware 3D toolkit $49 ) and a user of PocketFrog I have started to look at how to merge both toolkits. Obviously anything I do can only be of real use to people who have registered PocketGL as I can't rip off Pierre's source & give it away.
PocketGL creates an offscreen bitmap as it's back buffer & has it's own GAPI which works for the iPaq 36/38 & Casio devices only. The bitmap is created as:-
The contents of this buffer are then blitted to the screen as required once all the 3D rendering has been done.
My questions are inter-related.
1. Can this bitmap buffer be Blitted in it's current form using PocketFrog's display update function
2. if not & I create a surface 240 x 320 what do I need to know about a PF surface to allow me to re-write the function which sets the pixels in bitmap so it will write correctly to a surface.
3. Would I be able to simply utilise the existing code having removed it's GAPI initialisation stuff leaving PocketFrog's GAPI untouched?
Note: I'm still working out how the code works as I have only used the 3D functions up till now & not looked at the engine. There is a Z-Buffer in use which I still dont understand fully but it looks like it's controlling how deep into the screen to draw.
I'm planning to use the original version of PocketGL as it's simpler than later versions so I have less stuff likely to conflict.
PocketGL creates an offscreen bitmap as it's back buffer & has it's own GAPI which works for the iPaq 36/38 & Casio devices only. The bitmap is created as:-
- Code:
// Create the offscreen bitmap used as a secondary surface to build next image.
OffscreenBitmap.bmWidth = DISP_X;
OffscreenBitmap.bmHeight = DISP_Y;
OffscreenBitmap.bmBitsPixel = 16;
OffscreenBitmap.bmPlanes = 1;
OffscreenBitmap.bmBits = NULL; // (unsigned short *)malloc(DISP_X * DISP_Y * 2);
The contents of this buffer are then blitted to the screen as required once all the 3D rendering has been done.
My questions are inter-related.
1. Can this bitmap buffer be Blitted in it's current form using PocketFrog's display update function
2. if not & I create a surface 240 x 320 what do I need to know about a PF surface to allow me to re-write the function which sets the pixels in bitmap so it will write correctly to a surface.
3. Would I be able to simply utilise the existing code having removed it's GAPI initialisation stuff leaving PocketFrog's GAPI untouched?
Note: I'm still working out how the code works as I have only used the 3D functions up till now & not looked at the engine. There is a Z-Buffer in use which I still dont understand fully but it looks like it's controlling how deep into the screen to draw.
I'm planning to use the original version of PocketGL as it's simpler than later versions so I have less stuff likely to conflict.