Simflex Image Gallery - Full Free Flex Image Gallery
I am releasing my source code for a full fledged Flex 3 image gallery along with a PHP based Minimal Image file manager page with upload, delete and automatic thumbnail generation features. I had made this while learning Flex, but it is very usable in many projects.
To see it in action, download, extract and put the bin-debug folder under your web server. There is a folder called "Admin" inside "bin-debug" folder which has the PHP part responsible image upload, XML file generation and auto thumbnail code. To manage the images, use filelist.php in admin folder. Tested with JPG and PNG images.
Download Source code - 8.78 MB (along with sample images)
Please drop me a line if you are using this anywhere.
Posted by
Quakeboy
on
12/20/2009 04:47:00 AM
Labels: AS3, Flex, PHP, Source code
3d Tunnel OpenGL Source code - iPhone OpenGL ES compatible !
I am releasing source code of the iPhone OpenGL ES compatible Never-Ending Tunnel Source Code. The code is done using SDL on Windows only. But the OpenGL elements use only Triangle strips and all OpenGL ES compatible functions and porting to iPhone is a cakewalk.
I have searched on the web and never found a ES compatible version which is easily portable, so here we go enjoy. I have intentionally left a small glitch in Texture Coordinate generation, which actually looks pretty according to me. If you need I can help you to fix is easily.
Some important notes :-
- No Models present - The Tunnel is a torus which is completely procedurally generated.. so the torus properties can be changed easily.
- The Texture generation part is platform dependent. The files RTexture.h and RTexture.cpp is almost completely copy-paste reusable :D
- DO NOT REMOVE - #define QUAKEBOY_IS_AWESOME (!)
Download Source code (along with SDL Library and Binaries included - 1.36 MB)
Posted by
Quakeboy
on
12/19/2009 10:55:00 PM
Labels: iPhone, OpenGL, OpenGL ES, Source code
Andre Michelle's Tile based Scrolling ported to AS 3
Update:- I have found something that has to be added to the existing code. The SWF embedded here runs only @ around 60 FPS on a Safari or Firefox on a Mac. I will work on a more consistent render loop code adding some timer calculation elements soon.
I have ported the Tile based scrolling in Flash code by Andre Michelle to use Actionscript 3.0
Main challenge I faced was the tearing issue which was removed after I used Timer Event and updateAfterEvent() method. Thanks to 8bitRocket site for the tip.
I am getting a blazing 160 FPS in browser.. OMG Flash rocks ! If anyone wants me to provide comments and documentation for the code. I will happily do it on request.
Click here to get the full source code.
P.S. If its slow, its because you might be having the static noise swf playing below (scroll page down). View on the post page by click the title to ensure it plays smoothly.
Posted by
Quakeboy
on
9/26/2009 04:15:00 AM
Labels: Flash, Flex, Game Programming, Source code
Creating Static TV Noise in Flash using AS3
bgdata.noise(Math.random() * 1000, 0, 255, 7, true);did the trick :)
You can modify,use this code where ever you want, without giving credits. But please just let me know in the comments if it helped you.
Posted by
Quakeboy
on
9/15/2009 11:55:00 AM
Labels: AS3, Flash, Flex, Source code
XCode code comes to center of screen problem
Today I had a strange error with code alignment when using XCode. After I pressed ENTER key, the next line begins from the center of screen. Each time I have to manually press the backspace and it was annoying.
Solution
- Select All
- Right Click/Ctrl Click
- Select "Re-Indent Selection"
- Now examine the full file by scrolling from top to bottom.
- If the code starts aligning itself strangely from a particular line, the problem is with the previous line. You might have probably missed out a bracket (which was the case with me) or something else too..
Posted by
Quakeboy
on
7/09/2009 10:58:00 PM
Labels: iPhone Mac XCode
iPhone OpenGL ES Extensions List
On the Simulator
iPhone 3.0 SDK with Simulator 3.0
GL_OES_compressed_paletted_texture
GL_OES_draw_texture
GL_OES_mapbuffer
GL_OES_matrix_palette
GL_OES_point_size_array
GL_OES_read_format
GL_OES_stencil8
GL_OES_texture_mirrored_repeat
GL_OES_point_sprite
GL_OES_framebuffer_object
GL_OES_blend_subtract
GL_EXT_texture_lod_bias
GL_EXT_texture_filter_anisotropic
GL_OES_depth24
GL_OES_rgb8_rgba8
GL_IMG_read_format
GL_IMG_texture_compression_pvrtc
GL_IMG_texture_format_BGRA8888
GL_APPLE_texture_2D_limited_npot
On the Device
iPhone 3G with OS 3.0
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_lod_bias
GL_IMG_read_format
GL_IMG_texture_compression_pvrtc
GL_IMG_texture_format_BGRA8888
GL_OES_blend_subtract
GL_OES_compressed_paletted_texture
GL_OES_depth24
GL_OES_draw_texture
GL_OES_framebuffer_object
GL_OES_mapbuffer
GL_OES_matrix_palette
GL_OES_point_size_array
GL_OES_point_sprite
GL_OES_read_format
GL_OES_rgb8_rgba8
GL_OES_texture_mirrored_repeat
On the Device
iPod Touch 2nd Gen with OS 3.0
GL_EXT_texture_filter_anisotropic
GL_EXT_texture_lod_bias
GL_IMG_read_format
GL_IMG_texture_compression_pvrtc
GL_IMG_texture_format_BGRA8888
GL_OES_blend_subtract
GL_OES_compressed_paletted_texture
GL_OES_depth24
GL_OES_draw_texture
GL_OES_framebuffer_object
GL_OES_mapbuffer
GL_OES_matrix_palette
GL_OES_point_size_array
GL_OES_point_sprite
GL_OES_read_format
GL_OES_rgb8_rgba8
GL_OES_texture_mirrored_repeat
Thanks to Jeff Lamarche
Code to get all OpenGL ES extensions
NSString *extensionString = [NSString stringWithUTF8String:(char*)glGetString(GL_EXTENSIONS)];
NSArray *extensions = [extensionString componentsSeparatedByCharactersInSet:[NSCharacterSet whitespaceCharacterSet]];
for (NSString *oneExtension in extensions)
NSLog(oneExtension);
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Conclusion:- There is no difference in OpenGL ES Extensions between an iPhone and iPod touch versions used in tests above. But in Simulator, it has everything supported by Device + Extra Extensions too.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Posted by
Quakeboy
on
7/09/2009 12:39:00 AM
Labels: iPhone
Android keyCodes list
a - z
29 - 54
"0" - "9"
7 - 16
BACK BUTTON - 4
MENU BUTTON - 82
UP, DOWN, LEFT, RIGHT
19, 20, 21, 22
SELECT (MIDDLE) BUTTON - 23
SPACE - 62
SHIFT - 59
ENTER - 66
BACKSPACE - 67
Posted by
Quakeboy
on
4/13/2009 11:46:00 PM
Labels: Android
How to take Screenshot in Android Emulator with Eclipse
I used to use PrintScreen > MSPAINT > Ctrl+V combination to capture screen of Android Emulator. Recently discovered that we can get a neat screen shot inside Eclipse using the Devices View.
If the Devices panel is not visible, on the menu bar click Window > Show View > Other. In the newly opened dialog box, under Android category, select Devices.
Now on the Devices panel, Click the button as shown in the Image and your screenshot is ready.
tags:- android screen capture, android screenshot, android emulator screenshot.
Posted by
Quakeboy
on
4/05/2009 11:57:00 PM
Labels: Android
OpenGL texture upside down in Android ?
Yes....
The texture co-ordinates in Android for OpenGL ES has been to be calculated with upper left as origin 0,0 as opposed to the traditional OpenGL where bottom left is the origin (0,0)
Remember upper left/ top left is the origin (0,0)
Posted by
Quakeboy
on
2/11/2009 02:42:00 AM
How to load a texture in Android OpenGL ES
Here is how you can easily load a texture from any image format - PNG, BMP, JPG etc.. in OpenGL ES in Android.
**Before you begin the code, you need to import your images into your project's /res/drawable/ folder. Just right click the project in eclipse and select import to do that.**
//First setup the integer array to hold texture numbers which OpenGL generates
int texture[] = new int[1];
//Generate and bind to the texture (gl is my GL10 object)
gl.glGenTextures(1, texture, 0);
gl.glBindTexture(GL10.GL_TEXTURE_2D, texture[0]);
//Setup the texture co-ordinates
float texCoords[] = {
0.0f, 0.0f,
1.0f, 0.0f,.......};
FloatBuffer texcoords = FloatBuffer.wrap(texCoords);
gl.glTexCoordPointer(2, GL10.GL_FLOAT, 0, texcoords);
Bitmap wood = BitmapFactory.decodeResource(this.getContext().getResources(), R.drawable.myimagefilenamewithoutextension);
//Setup optional texture parameters
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MIN_FILTER, GL10.GL_LINEAR);
gl.glTexParameterf(GL10.GL_TEXTURE_2D, GL10.GL_TEXTURE_MAG_FILTER, GL10.GL_LINEAR);
//Set the texture image
GLUtils.texImage2D(GL10.GL_TEXTURE_2D, 0, wood, 0);
//Enable texture related flags (Important)
gl.glEnable(GL10.GL_TEXTURE_2D);
gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);
Hope that helped you.. please let me know any problems
Posted by Quakeboy on 2/09/2009 05:39:00 AM 1 comments
Labels: Android, OpenGL, Source code

