Page 1 of 1

EDGELib try for iPhone

PostPosted: Jan 28, 2009 @ 5:02pm
by Orion_
Hello,

I'm currently trying EDGELib before buying it for an iPhone game project.
I've some troubles with the sound engine, using hekkus on PC with VC++2008 I've a delay of 1 second before the sound actually plays using ecd.snd->PlaySound(0);
On the iPhone side I've 2 malloc/free error showing in the console when exiting the application whenever I use the ecd.snd->Open(); function and even if I do not call ecd.snd->Close(); (The error is about freeing not aligned pointers)
Also, I've a question about 2DSurface, Is there any function or trick to use paletted surfaces and with the ability to dynamically change or swap some colors of the palette ?

Thanks.

PostPosted: Jan 29, 2009 @ 8:46am
by edge

PostPosted: Jan 29, 2009 @ 1:01pm
by Orion_
Thank you !

That fixed all my problems :)

PostPosted: Feb 9, 2009 @ 3:54pm
by Orion_
Hi again,
Finally I've switched to OpenGL ES because the palette mode or even the default framebuffer mode was too slow on iPhone.
So, my question is, how can I do some realtime tint or color change with BltFast with OpenGL ES ?
Or something like that for the DrawFont function for example, the default edgelib internal font is White, how can I draw text using another color ? I tried glColor3f but it does nothing :/

edit: Another question, is there any function to unload a texture uploaded with display->UploadTexture function ? can my_surface.Free(); do the job ?

edit2: I noticed that the orientation flag doesn't work in OpenGL mode. Do you plan to implement it ?

Thanks.

PostPosted: Feb 11, 2009 @ 9:07am
by edge

PostPosted: Feb 11, 2009 @ 12:13pm
by Orion_

PostPosted: Feb 12, 2009 @ 9:55am
by edge

PostPosted: Feb 27, 2009 @ 11:10am
by Orion_
Just a quick question, I was surprised that all the graphics I was displaying on iPhone device with edgelib was converted to 16bits, I thought that the iPhone screen was actually 16bits, then I tried to draw a texture using native iPhone SDK code and the graphics appeared smooth like if it was 24bits, so I found a flag to change in EDGELib to get the same result, and it worked but I don't know if it's the right way to do it and if it's not getting slower because of this flag (even if it's rendered using OpenGL)
here is what I used in the OnDisplayConfig function:
config->emulvideotype = EDSP_TRUE32;
config->videotype = EDSP_TRUE32; // not sure if this one is effective

PostPosted: Mar 2, 2009 @ 9:48am
by edge
Hi Orion,

The best solution to force your textures in a specific color format, is to specify it in the CreateSurface call. Pass EST_DSPTRUE32_INV as the flag parameter.

Using EST_DSPTRUE32_INV is faster than EST_DSPTRUE32, because it swaps the red and blue color channels when loading the image (to make it in the same internal format as OpenGL).