Pandora Sdl 1.3, Glu And Nehe Opengl Tutorials For The Pandora


No, there is nothing related. When i talk about a pandora video driver, i mean an SDL pandora video driver. This apply only to SDL 1.3 applications.
 
Excellent work Cpasjuste. It's worth knowing that TI mentioned to me that the hardware is slow if you want to do large blits, maybe it's worth doing a comparison to see just how slow (slower than software?).

By 'large' I'm not sure what they mean (possibly desktop sized blits), I'm going to see if I can get Monty in here to speak about it.
 
fettouhi posted on May 30 2009 at 12:57 PM said:
Does this mean that we also can run a 3D accelerated desktop, i.e. compiz?

Regards

André
Compiz has nothing to do with SDL right ?
If I remember right I think I've read on the forum that compiz doesn't support OpenGL ES so I don't see compiz as too likely.
 
Last edited by a moderator:
, I'm going to see if I can get Monty in here to speak about it.
I think they may talk about large textures. And yes i saw that i loose a large amount of frame per seconds when using 1024*1024 textures ( around 10 fps less ). It's why i'm adding tiles support in my GLES 2D library, so we can do great 2D platformer backgrounds without loosing on the framerate. But for others textures size, it's great. If i remember correctly, i did a test with 512 textures (32*32) with scaling, blending and rotation at around 30 fps .
 
Last edited by a moderator:
Cpasjuste posted on May 30 2009 at 02:09 PM said:
No, there is nothing related. When i talk about a pandora video driver, i mean an SDL pandora video driver. This apply only to SDL 1.3 applications.
I got confused about that ;). I was thinking about the SGX driver for some reason.

Regards

André
 
Last edited by a moderator:
I'm very Enthusiast about my openGL ES 2D library based on SDL 13. It's already in an usable state, it's cross platfrom (it run either on the pandora or any openGL linux desktop), it has texture rotation, scaling, blending, bitmap fonts rendering and TTF font rendering and touchscreen support. I'm actually adding a simple colision system and tiles support (almost done). All that in a very simple way. I really hope people will like it and use it for cool 2d games and applications. Here is a simple exemple code, showing how it look like for now :

CODE
int main(int argc, char *argv[])
{
/* Init openGL(ES) display in fullscreen with Full Screen Anti Aliasing */
if ( ! GLES2D_InitVideoMode( 800, 480, 1, 1) )
exitError("Error : GLES2D_InitVideoMode failed\n");

/* Print rendering informations */
GLES2D_PrintRenderInfo();

/* Load textures in memory */
background = GLES2D_LoadTexture( "../data/backg.png" );
logo = GLES2D_LoadTexture( "../data/logo.png" );
smiley = GLES2D_LoadTexture( "../data/smiley32.png" );

/* Load a bitmap font in memory */
bmpFont = GLES2D_LoadBmpFont( 16, "../data/font.bmp" );

/* Check if all data are loaded correctly */
if ( !background || !logo || !smiley || !bmpFont)
{
exitError("Error : data loading failed\n");
}

/* Main loop */
while ( ! done )
{
/* Handle events ... */
handleEvents();

if ( isActive )
{
/* Draw a texture */
GLES2D_DrawTextureSimple( background, 0, 0 );

/* Draw a scaled texture */
GLES2D_DrawTextureScaled( logo, 10, 10, logo->w / 2, logo->h / 2 );

/* Draw a centered and scaled texture */
GLES2D_DrawTextureScaledCentered( logo, 400, 240, logo->w * scale_factor, logo->h * scale_factor);

/* Draw another texture */
GLES2D_DrawTextureSimple( smiley, 800 - 32, 480 - 32 );

/* Draw some bitmap text */
GLES2D_DrawBmpText( bmpFont, 5, 400, "F1 : Enable/disable texture filtering");
GLES2D_DrawBmpText( bmpFont, 5, 415, "Up : Scale +");
GLES2D_DrawBmpText( bmpFont, 5, 430, "Down : Scale -");
GLES2D_DrawBmpText( bmpFont, 5, 445, "Left : Transparency -");
GLES2D_DrawBmpText( bmpFont, 5, 460, "Right : Transparency +");

/* Swap buffers (render to screen) */
GLES2D_SwapBuffers();
}
}

/* Free all data */
GLES2D_FreeTexture( background ); background = NULL;
GLES2D_FreeTexture( logo ); logo = NULL;
GLES2D_FreeTexture( smiley ); smiley = NULL;
GLES2D_FreeBmpFont( bmpFont ); bmpFont = NULL;

/* Exit properly... */
GLES2D_Quit();

return 0;
}



I may release the desktop ( Linux/openGL) version very soon, maybe on sunday.
Actually i would like to find someone with a good windows devel knowledge to compile SDL 13 for windows (maybe it's already done somewhere) to be able to compile my library and use it to code on Windows platforms.
 
, and old fashioned "newbie" glBegin/glEnd calls to draw textured blended quads.

If I switch to SDL1.3, do I just use it's internal "draw quad" functionality, and get all the GLES stuff handled for me? Will I still need to use SDL_Image for the png loading?

Also, can someone point me at a set of ready built Win32 binaries for SDL1.3? Last time I looked I could only find source repositories, that I got in a muddle trying to get to build!
In fact i just saw what you are doing right now ( your lerp project) and i must say that it's very impressive. I would be very happy if we could work together to make my library better.
 
Last edited by a moderator:
Adventus posted on May 29 2009 at 05:41 AM said:
QUOTE
I have heard that the SGX on the OMAP is not good at 2D things, is this right?
A TBDR doesn't really gain you anything without a zbuffer because the fragment shader will still run on nonvisible fragments. Its still much quicker than software, you just don't get the zero overdraw advantage.
Sure you do, a TBDR works just as fine with or without a zbuffer. The only difference is that with the zbuffer present , you don't have to worry about back-to-front sorting of your geometry. If you submit your geometry in the correct order, even without the zbuffer present, it will still cull nonvisible fragments.
 
Last edited by a moderator:
Sounds very impressive, even if I don't understand any of the techno-babble here. :D

This Open GL ES (1 and 2) is a nice thing for 3D Games like we all know from the "classical" OpenGL for the PC. But how good is this stuff for classical 2D Pixel-Games? Cpasjuste mentioned tile-support, sounds good to me. How can OpenGl (ES) also help in 2D games and/or Emulators? Faster scrolling? More animated Sprites? More Parallax-Layers and Hardware calculated Graphic Effects like explosions, flares, flashes etc...? ^_^
 
You don't have to blit with the CPU anymore - the GPU can "blit" and also rotate, scale etc. your graphics. Besides that you get hardware accelerated alpha blending and other features.
Pixel shaders are interesting too, you could do bump mapping for example. Or you could blend between 2D and 3D which also offers alot of cool things if done right.
In OpenGL ES 2.0 there is no real difference between 2D and 3D - you have to project 3D objects to the screen, instead of that you can also just send 2D coordinates and skip transformation (which is done in the vertexshader. There is no default shader and you MUST create one, so if you only want 2D you only output the input values, if you want 3D you multiply it by a so called projection-matrix before)
 
JayFoxRox posted on May 31 2009 at 10:47 PM said:
You don't have to blit with the CPU anymore - the GPU can "blit" and also rotate, scale etc. your graphics. Besides that you get hardware accelerated alpha blending and other features.
Pixel shaders are interesting too, you could do bump mapping for example. Or you could blend between 2D and 3D which also offers alot of cool things if done right.
In OpenGL ES 2.0 there is no real difference between 2D and 3D - you have to project 3D objects to the screen, instead of that you can also just send 2D coordinates and skip transformation (which is done in the vertexshader. There is no default shader and you MUST create one, so if you only want 2D you only output the input values, if you want 3D you multiply it by a so called projection-matrix before)

I hope this is easy enough to programm, so many coders can squeeze this power out of the Pandora easily. :) Suddenly I have a sidescrolling Jump'n Run in mind where you can turn the entire retro Graphic from 2D view in 3D..."FEZ" anyone? ^_^
 
Last edited by a moderator:
also help in 2D games and/or Emulators? Faster scrolling? More animated Sprites? More Parallax-Layers and Hardware calculated Graphic Effects like explosions, flares, flashes etc...? ^_^
Not much help in terms of emulating ( although sometimes it can be helpful) but for regular 2d games there is simply no comparison ... and don't forget about all of this being done on the GPU which means you get it all almost for free... which in turn means you can dedicate your CPU time to all sorts of other cool things ( enhanced AI, physics etc)
 
Last edited by a moderator:
also help in 2D games and/or Emulators? Faster scrolling? More animated Sprites? More Parallax-Layers and Hardware calculated Graphic Effects like explosions, flares, flashes etc...? ^_^
Put simply, you can draw stuff a lot faster using OGL than you can in software. When I was doing everything in software, my game's engine could only just manage about 30fps (scaling, rotating and drawing all the images.) Since I moved to OGL, I've got it capped at 60fps, which uses about 8% of the total CPU time (or about 200fps maxed out). Obviously mileage will vary, but pretty much anything that involves drawing lots of stuff to screen will benefit greatly - especially if it needs to do any zooming, rotation, or alpha blending
 
Last edited by a moderator:
How stable is 1.3 now? It's still in development from what I can see. I'm having trouble finding a release date for it. Most of the "release date", and "bug hunt" info dates from December of last year. It's great that it'll offer 3d optimizations of 2d events. It looks like some of the "simple" 2d stuff will fall back to software if you don't have 3d drivers and may be less efficient than 1.2. Not a problem for the Pandora - but for multi-platform development that may be an issue.

Another question. There don't really seem to be "production" 3d drivers for the Beagleboard yet. You still have to contact T1 for it. The Beagleboard uses the same omap3 chipset as the Pandora. We won't have to go through a song and dance to get the 3d drivers installed on the Pandora will we? What about getting a development environment up and running for it?

Thanks,
wardred
 
wardred posted on May 31 2009 at 04:19 PM said:
Another question. There don't really seem to be "production" 3d drivers for the Beagleboard yet. You still have to contact T1 for it. The Beagleboard uses the same omap3 chipset as the Pandora. We won't have to go through a song and dance to get the 3d drivers installed on the Pandora will we?
I believe they're packaging all the drivers with the OS. For the beagleboard, you have to build your own OS.

Judging by all the people that have 3D stuff working (craigix, Pickle, Cpasjuste, et all), I doubt there'll be any hassle or song and dance. ;)
 
Last edited by a moderator:
Ok. I'm a little out of my depth here but I'll do my best. :) As you probably know, XBMC was recently ported to Beagleboard. It's currently running in SDL. I got in touch with McGeagh (who did the port) to let him know about Cpasjuste's new OpenGL ES driver. His response:

QUOTE
After looking at the work being done for the ES for SDL1.3, I believe its not the holy grail i was hoping for. This is mainly due to 2 factors...

1. Its for SDL 1.3, and xbmc currently uses SDL 1.2. Although it may or may not be difficult to change xbmc to 1.3, its still time consuming.

2. It only supports ES 1.1. xbmc requires shaders, so i need a version of ES with ESSL (ES's equivalent to GLSL) i.e ES 2.0

I definately will consider this as an option though!

Finally, do you know where they got the SGX driver from? Is it the same beta driver from TI that people use on the beagleboard? Atm, that driver can only do 16bpp, so I am interested in finding a driver that can do 24bpp.

Obviously I can't answer these questions. I'm hoping he signs up over here, but in the meantime I'm happy to play clueless middleman. Any clues would be appreciated. :)

( Just as an aside, XBMC project manager Gamester17 signed up the other day and posted some detailed info for devs, including source links: http://www.gp32x.de/board/index.php?s=&am...st&p=730216 )
 
Last edited by a moderator:
PowerVR guys said that the next driver (should be out this month i think) should allow 32bpp, but i don't think/know if it will support 24bpp.
 
Back
Top