Beta Little Gles Pandora Test


Farox

Certified Guru
Joined
Jan 8, 2009
Messages
2,430
Age
56
Location
Italy
Website
rbnet.it
Hi to all
I have setup my toolchain with Codesurcery 2009q3 on Windows and wanna test something if it's builded correctly but don't have my Pandora... :pandora2ut4:

I was looking at this thread by darkblu
So inspired by this, i have made, a new Codeblock project with this darkblu's code and compiled two version of this example:

1) basic compilation option " -Wall -O2 " ---> file Test_GLES_Pandora.bin

2) Neon optimized option "-Wall -O3 -mcpu=cortex-a8 -ftree-vectorize -mfloat-abi=softfp -mfpu=neon" ----> file Test_GLES_Pandora_new.bin

I have included the source and project files ...so let me know if they work or i have made somthing wrong.

Thanks

Updated with the new code by darkblu

11/09/2010
Updated with proper Paeryn code suggestion ..Please test it
 
Last edited by a moderator:
Thank Gruso :)
If you could try to run on a terminal...so to see if something wrong .
 
Here's the entire output:

Code:
eglInitialize() succeeded; major, minor: 1, 4.
egl vendor, version, extensions:
Imagination Technologies
1.4 build 1.4.14.2514
EGL_KHR_image EGL_KHR_image_base EGL_KHR_gl_texture_2D_image EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image EGL_KHR_vg_parent_image EGL_IMG_context_priority 

config i: 0
EGL_BUFFER_SIZE 0x00000010
EGL_ALPHA_SIZE 0x00000000
EGL_BLUE_SIZE 0x00000005
EGL_GREEN_SIZE 0x00000006
EGL_RED_SIZE 0x00000005
EGL_DEPTH_SIZE 0x00000018
EGL_STENCIL_SIZE 0x00000008
EGL_CONFIG_CAVEAT 0x00003038
EGL_CONFIG_ID 0x00000001
EGL_LEVEL 0x00000000
EGL_MAX_PBUFFER_HEIGHT 0x00000800
EGL_MAX_PBUFFER_PIXELS 0x00400000
EGL_MAX_PBUFFER_WIDTH 0x00000800
EGL_NATIVE_RENDERABLE 0x00000000
EGL_NATIVE_VISUAL_ID 0x00000021
EGL_NATIVE_VISUAL_TYPE 0x000af910
EGL_SAMPLES 0x00000000
EGL_SAMPLE_BUFFERS 0x00000000
EGL_SURFACE_TYPE 0x00000065
EGL_TRANSPARENT_TYPE 0x00003038
EGL_TRANSPARENT_BLUE_VALUE 0x00000000
EGL_TRANSPARENT_GREEN_VALUE 0x00000000
EGL_TRANSPARENT_RED_VALUE 0x00000000
EGL_BIND_TO_TEXTURE_RGB 0x00000001
EGL_BIND_TO_TEXTURE_RGBA 0x00000000
EGL_MIN_SWAP_INTERVAL 0x00000000
EGL_MAX_SWAP_INTERVAL 0x00000003
EGL_LUMINANCE_SIZE 0x00000000
EGL_ALPHA_MASK_SIZE 0x00000008
EGL_COLOR_BUFFER_TYPE 0x0000308e
EGL_RENDERABLE_TYPE 0x00000003
EGL_CONFORMANT 0x00000003

config i: 1
EGL_BUFFER_SIZE 0x00000010
EGL_ALPHA_SIZE 0x00000000
EGL_BLUE_SIZE 0x00000005
EGL_GREEN_SIZE 0x00000006
EGL_RED_SIZE 0x00000005
EGL_DEPTH_SIZE 0x00000000
EGL_STENCIL_SIZE 0x00000000
EGL_CONFIG_CAVEAT 0x00003038
EGL_CONFIG_ID 0x00000002
EGL_LEVEL 0x00000000
EGL_MAX_PBUFFER_HEIGHT 0x00000800
EGL_MAX_PBUFFER_PIXELS 0x00400000
EGL_MAX_PBUFFER_WIDTH 0x00000800
EGL_NATIVE_RENDERABLE 0x00000000
EGL_NATIVE_VISUAL_ID 0x00000021
EGL_NATIVE_VISUAL_TYPE 0x000af910
EGL_SAMPLES 0x00000000
EGL_SAMPLE_BUFFERS 0x00000000
EGL_SURFACE_TYPE 0x00000065
EGL_TRANSPARENT_TYPE 0x00003038
EGL_TRANSPARENT_BLUE_VALUE 0x00000000
EGL_TRANSPARENT_GREEN_VALUE 0x00000000
EGL_TRANSPARENT_RED_VALUE 0x00000000
EGL_BIND_TO_TEXTURE_RGB 0x00000001
EGL_BIND_TO_TEXTURE_RGBA 0x00000000
EGL_MIN_SWAP_INTERVAL 0x00000000
EGL_MAX_SWAP_INTERVAL 0x00000003
EGL_LUMINANCE_SIZE 0x00000000
EGL_ALPHA_MASK_SIZE 0x00000008
EGL_COLOR_BUFFER_TYPE 0x0000308e
EGL_RENDERABLE_TYPE 0x00000003
EGL_CONFORMANT 0x00000003

config i: 2
EGL_BUFFER_SIZE 0x00000010
EGL_ALPHA_SIZE 0x00000000
EGL_BLUE_SIZE 0x00000005
EGL_GREEN_SIZE 0x00000006
EGL_RED_SIZE 0x00000005
EGL_DEPTH_SIZE 0x00000018
EGL_STENCIL_SIZE 0x00000008
EGL_CONFIG_CAVEAT 0x00003038
EGL_CONFIG_ID 0x00000003
EGL_LEVEL 0x00000000
EGL_MAX_PBUFFER_HEIGHT 0x00000800
EGL_MAX_PBUFFER_PIXELS 0x00400000
EGL_MAX_PBUFFER_WIDTH 0x00000800
EGL_NATIVE_RENDERABLE 0x00000000
EGL_NATIVE_VISUAL_ID 0x00000021
EGL_NATIVE_VISUAL_TYPE 0x000af910
EGL_SAMPLES 0x00000004
EGL_SAMPLE_BUFFERS 0x00000001
EGL_SURFACE_TYPE 0x00000065
EGL_TRANSPARENT_TYPE 0x00003038
EGL_TRANSPARENT_BLUE_VALUE 0x00000000
EGL_TRANSPARENT_GREEN_VALUE 0x00000000
EGL_TRANSPARENT_RED_VALUE 0x00000000
EGL_BIND_TO_TEXTURE_RGB 0x00000001
EGL_BIND_TO_TEXTURE_RGBA 0x00000000
EGL_MIN_SWAP_INTERVAL 0x00000000
EGL_MAX_SWAP_INTERVAL 0x00000003
EGL_LUMINANCE_SIZE 0x00000000
EGL_ALPHA_MASK_SIZE 0x00000008
EGL_COLOR_BUFFER_TYPE 0x0000308e
EGL_RENDERABLE_TYPE 0x00000003
EGL_CONFORMANT 0x00000001

config i: 3
EGL_BUFFER_SIZE 0x00000020
EGL_ALPHA_SIZE 0x00000008
EGL_BLUE_SIZE 0x00000008
EGL_GREEN_SIZE 0x00000008
EGL_RED_SIZE 0x00000008
EGL_DEPTH_SIZE 0x00000018
EGL_STENCIL_SIZE 0x00000008
EGL_CONFIG_CAVEAT 0x00003038
EGL_CONFIG_ID 0x00000004
EGL_LEVEL 0x00000000
EGL_MAX_PBUFFER_HEIGHT 0x00000800
EGL_MAX_PBUFFER_PIXELS 0x00400000
EGL_MAX_PBUFFER_WIDTH 0x00000800
EGL_NATIVE_RENDERABLE 0x00000000
EGL_NATIVE_VISUAL_ID 0x00000000
EGL_NATIVE_VISUAL_TYPE 0x00003038
EGL_SAMPLES 0x00000000
EGL_SAMPLE_BUFFERS 0x00000000
EGL_SURFACE_TYPE 0x00000061
EGL_TRANSPARENT_TYPE 0x00003038
EGL_TRANSPARENT_BLUE_VALUE 0x00000000
EGL_TRANSPARENT_GREEN_VALUE 0x00000000
EGL_TRANSPARENT_RED_VALUE 0x00000000
EGL_BIND_TO_TEXTURE_RGB 0x00000001
EGL_BIND_TO_TEXTURE_RGBA 0x00000001
EGL_MIN_SWAP_INTERVAL 0x00000001
EGL_MAX_SWAP_INTERVAL 0x00000001
EGL_LUMINANCE_SIZE 0x00000000
EGL_ALPHA_MASK_SIZE 0x00000008
EGL_COLOR_BUFFER_TYPE 0x0000308e
EGL_RENDERABLE_TYPE 0x00000003
EGL_CONFORMANT 0x00000003

config i: 4
EGL_BUFFER_SIZE 0x00000010
EGL_ALPHA_SIZE 0x00000000
EGL_BLUE_SIZE 0x00000005
EGL_GREEN_SIZE 0x00000006
EGL_RED_SIZE 0x00000005
EGL_DEPTH_SIZE 0x00000018
EGL_STENCIL_SIZE 0x00000008
EGL_CONFIG_CAVEAT 0x00003038
EGL_CONFIG_ID 0x00000005
EGL_LEVEL 0x00000000
EGL_MAX_PBUFFER_HEIGHT 0x00000800
EGL_MAX_PBUFFER_PIXELS 0x00400000
EGL_MAX_PBUFFER_WIDTH 0x00000800
EGL_NATIVE_RENDERABLE 0x00000000
EGL_NATIVE_VISUAL_ID 0x00000000
EGL_NATIVE_VISUAL_TYPE 0x00003038
EGL_SAMPLES 0x00000000
EGL_SAMPLE_BUFFERS 0x00000000
EGL_SURFACE_TYPE 0x00000061
EGL_TRANSPARENT_TYPE 0x00003038
EGL_TRANSPARENT_BLUE_VALUE 0x00000000
EGL_TRANSPARENT_GREEN_VALUE 0x00000000
EGL_TRANSPARENT_RED_VALUE 0x00000000
EGL_BIND_TO_TEXTURE_RGB 0x00000001
EGL_BIND_TO_TEXTURE_RGBA 0x00000000
EGL_MIN_SWAP_INTERVAL 0x00000001
EGL_MAX_SWAP_INTERVAL 0x00000001
EGL_LUMINANCE_SIZE 0x00000000
EGL_ALPHA_MASK_SIZE 0x00000008
EGL_COLOR_BUFFER_TYPE 0x0000308e
EGL_RENDERABLE_TYPE 0x00000003
EGL_CONFORMANT 0x00000003

config i: 5
EGL_BUFFER_SIZE 0x00000010
EGL_ALPHA_SIZE 0x00000004
EGL_BLUE_SIZE 0x00000004
EGL_GREEN_SIZE 0x00000004
EGL_RED_SIZE 0x00000004
EGL_DEPTH_SIZE 0x00000018
EGL_STENCIL_SIZE 0x00000008
EGL_CONFIG_CAVEAT 0x00003038
EGL_CONFIG_ID 0x00000006
EGL_LEVEL 0x00000000
EGL_MAX_PBUFFER_HEIGHT 0x00000800
EGL_MAX_PBUFFER_PIXELS 0x00400000
EGL_MAX_PBUFFER_WIDTH 0x00000800
EGL_NATIVE_RENDERABLE 0x00000000
EGL_NATIVE_VISUAL_ID 0x00000000
EGL_NATIVE_VISUAL_TYPE 0x00003038
EGL_SAMPLES 0x00000000
EGL_SAMPLE_BUFFERS 0x00000000
EGL_SURFACE_TYPE 0x00000061
EGL_TRANSPARENT_TYPE 0x00003038
EGL_TRANSPARENT_BLUE_VALUE 0x00000000
EGL_TRANSPARENT_GREEN_VALUE 0x00000000
EGL_TRANSPARENT_RED_VALUE 0x00000000
EGL_BIND_TO_TEXTURE_RGB 0x00000001
EGL_BIND_TO_TEXTURE_RGBA 0x00000001
EGL_MIN_SWAP_INTERVAL 0x00000001
EGL_MAX_SWAP_INTERVAL 0x00000001
EGL_LUMINANCE_SIZE 0x00000000
EGL_ALPHA_MASK_SIZE 0x00000008
EGL_COLOR_BUFFER_TYPE 0x0000308e
EGL_RENDERABLE_TYPE 0x00000001
EGL_CONFORMANT 0x00000001

config i: 6
EGL_BUFFER_SIZE 0x00000010
EGL_ALPHA_SIZE 0x00000000
EGL_BLUE_SIZE 0x00000005
EGL_GREEN_SIZE 0x00000006
EGL_RED_SIZE 0x00000005
EGL_DEPTH_SIZE 0x00000018
EGL_STENCIL_SIZE 0x00000008
EGL_CONFIG_CAVEAT 0x00003038
EGL_CONFIG_ID 0x00000007
EGL_LEVEL 0x00000000
EGL_MAX_PBUFFER_HEIGHT 0x00000800
EGL_MAX_PBUFFER_PIXELS 0x00400000
EGL_MAX_PBUFFER_WIDTH 0x00000800
EGL_NATIVE_RENDERABLE 0x00000000
EGL_NATIVE_VISUAL_ID 0x00000021
EGL_NATIVE_VISUAL_TYPE 0x000af910
EGL_SAMPLES 0x00000000
EGL_SAMPLE_BUFFERS 0x00000000
EGL_SURFACE_TYPE 0x00000064
EGL_TRANSPARENT_TYPE 0x00003038
EGL_TRANSPARENT_BLUE_VALUE 0x00000000
EGL_TRANSPARENT_GREEN_VALUE 0x00000000
EGL_TRANSPARENT_RED_VALUE 0x00000000
EGL_BIND_TO_TEXTURE_RGB 0x00000000
EGL_BIND_TO_TEXTURE_RGBA 0x00000000
EGL_MIN_SWAP_INTERVAL 0x00000000
EGL_MAX_SWAP_INTERVAL 0x00000003
EGL_LUMINANCE_SIZE 0x00000000
EGL_ALPHA_MASK_SIZE 0x00000008
EGL_COLOR_BUFFER_TYPE 0x0000308e
EGL_RENDERABLE_TYPE 0x00000006
EGL_CONFORMANT 0x00000006

config i: 7
EGL_BUFFER_SIZE 0x00000010
EGL_ALPHA_SIZE 0x00000000
EGL_BLUE_SIZE 0x00000005
EGL_GREEN_SIZE 0x00000006
EGL_RED_SIZE 0x00000005
EGL_DEPTH_SIZE 0x00000000
EGL_STENCIL_SIZE 0x00000000
EGL_CONFIG_CAVEAT 0x00003038
EGL_CONFIG_ID 0x00000008
EGL_LEVEL 0x00000000
EGL_MAX_PBUFFER_HEIGHT 0x00000800
EGL_MAX_PBUFFER_PIXELS 0x00400000
EGL_MAX_PBUFFER_WIDTH 0x00000800
EGL_NATIVE_RENDERABLE 0x00000000
EGL_NATIVE_VISUAL_ID 0x00000021
EGL_NATIVE_VISUAL_TYPE 0x000af910
EGL_SAMPLES 0x00000000
EGL_SAMPLE_BUFFERS 0x00000000
EGL_SURFACE_TYPE 0x00000064
EGL_TRANSPARENT_TYPE 0x00003038
EGL_TRANSPARENT_BLUE_VALUE 0x00000000
EGL_TRANSPARENT_GREEN_VALUE 0x00000000
EGL_TRANSPARENT_RED_VALUE 0x00000000
EGL_BIND_TO_TEXTURE_RGB 0x00000000
EGL_BIND_TO_TEXTURE_RGBA 0x00000000
EGL_MIN_SWAP_INTERVAL 0x00000000
EGL_MAX_SWAP_INTERVAL 0x00000003
EGL_LUMINANCE_SIZE 0x00000000
EGL_ALPHA_MASK_SIZE 0x00000008
EGL_COLOR_BUFFER_TYPE 0x0000308e
EGL_RENDERABLE_TYPE 0x00000006
EGL_CONFORMANT 0x00000006

config i: 8
EGL_BUFFER_SIZE 0x00000010
EGL_ALPHA_SIZE 0x00000000
EGL_BLUE_SIZE 0x00000005
EGL_GREEN_SIZE 0x00000006
EGL_RED_SIZE 0x00000005
EGL_DEPTH_SIZE 0x00000018
EGL_STENCIL_SIZE 0x00000008
EGL_CONFIG_CAVEAT 0x00003038
EGL_CONFIG_ID 0x00000009
EGL_LEVEL 0x00000000
EGL_MAX_PBUFFER_HEIGHT 0x00000800
EGL_MAX_PBUFFER_PIXELS 0x00400000
EGL_MAX_PBUFFER_WIDTH 0x00000800
EGL_NATIVE_RENDERABLE 0x00000000
EGL_NATIVE_VISUAL_ID 0x00000021
EGL_NATIVE_VISUAL_TYPE 0x000af910
EGL_SAMPLES 0x00000004
EGL_SAMPLE_BUFFERS 0x00000001
EGL_SURFACE_TYPE 0x00000064
EGL_TRANSPARENT_TYPE 0x00003038
EGL_TRANSPARENT_BLUE_VALUE 0x00000000
EGL_TRANSPARENT_GREEN_VALUE 0x00000000
EGL_TRANSPARENT_RED_VALUE 0x00000000
EGL_BIND_TO_TEXTURE_RGB 0x00000000
EGL_BIND_TO_TEXTURE_RGBA 0x00000000
EGL_MIN_SWAP_INTERVAL 0x00000000
EGL_MAX_SWAP_INTERVAL 0x00000003
EGL_LUMINANCE_SIZE 0x00000000
EGL_ALPHA_MASK_SIZE 0x00000008
EGL_COLOR_BUFFER_TYPE 0x0000308e
EGL_RENDERABLE_TYPE 0x00000006
EGL_CONFORMANT 0x00000004

eglChooseConfig() picked EGL_CONFIG_ID: 0x00000008

gl vendor, version, renderer, extensions:
Imagination Technologies
OpenGL ES 2.0
PowerVR SGX 530
GL_OES_rgb8_rgba8 GL_OES_depth24 GL_OES_vertex_half_float GL_OES_texture_float GL_OES_texture_half_float GL_OES_element_index_uint GL_OES_mapbuffer GL_OES_fragment_precision_high GL_OES_compressed_ETC1_RGB8_texture GL_OES_EGL_image GL_OES_required_internalformat GL_OES_get_program_binary GL_OES_standard_derivatives GL_EXT_multi_draw_arrays GL_EXT_texture_format_BGRA8888 GL_IMG_shader_binary GL_IMG_texture_compression_pvrtc GL_IMG_texture_stream2 GL_IMG_texture_npot GL_IMG_texture_format_BGRA8888 GL_IMG_read_format GL_IMG_program_binary 
GL_MAX_TEXTURE_SIZE: 2048
GL_MAX_CUBE_MAP_TEXTURE_SIZE: 2048
GL_MAX_VIEWPORT_DIMS: 2048, 2048
GL_MAX_RENDERBUFFER_SIZE: 2048
GL_MAX_VERTEX_ATTRIBS: 8
GL_MAX_VERTEX_UNIFORM_VECTORS: 128
GL_MAX_VARYING_VECTORS: 8
GL_MAX_FRAGMENT_UNIFORM_VECTORS: 64
GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS: 8
GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS: 8
GL_MAX_TEXTURE_IMAGE_UNITS: 8

texture bitmap 'rockwall_NH.raw' 64 x 64 x 3 bpp, 12288 bytes
texture bitmap 'rockwall.raw' 256 x 256 x 3 bpp, 196608 bytes
bad shader source length for 'phong_bump_tang.glslv'.
bad shader source length for 'phong_bump_tang.glslf'.
number of vertices: 2143
number of indices: 11904
 
I think have understand what is not working ..(or loading in this case )..

bad shader source length for 'phong_bump_tang.glslv'.
bad shader source length for 'phong_bump_tang.glslf'.

The app will try to load these 2 files *.glslv and *.glslf but this are zero lenght.
If you substitute the files (and rename *.glslv & *.glslf) with the other *.glslv.back & *.glslf.back (or the *.new version ) it should work .

Thank you for your patience B)

Anyway now i know that my toolchain is working...this is good ;)
 
Disclaimer: I've just woken up, I may not be thinking properly yet.

I tried renaming (the *.bak files, then the *.new files), now when it's run the window pops up and closes straight away. I tried capturing some output but the terminal quits too. I sent the output to a file, it creates the file but there's nothing in it!
 
Thank you very much Gruso for your time..

Maybe i could build an SDL project to test my toolchain...or an already working app...before trying something like this.
 
More ....i've just asked some help from the original author's thread...
 
hey Farox,

for some reason the reading of the shader source files fails. Here's the respective line in the code:
https://code.google.com/p/test-es/source/browse/app.cpp#693

(i do advise you to use this codebase, btw: https://code.google.com/p/test-es/ )


Make sure you have proper read permissions on these files. Also, Gruso can run an strace session from a ssh terminal (real-time feedback FTW) or to a log, and see what happens with file I/O:

Code:
DISPLAY=:0.0 strace ./test_es -frames 1
 
Thank you darkblu :)

I have updated the code with the new version and submitted a new package (version 2) at first post.
 
Running it in gdb on Pandora, I see it SEGFAULT'ing at:

0x40391f90 in __printf_fp() from /lib/libc.so.6


I tried to build the app with the included sources, but I get eglCreatWindowSurface() failed, EGL_BAD_NATIVE_WINDOW .. not sure if that has to do with the way I build it, though ..
 
Thank for testing torpor.
I dont know is is important but looking at the original thread i found this from paeryn :
I also changed the width and height to 256x256 as the pandora can't do a height of 512.

So if you could change this
Code:
int main(int argc, char** argv)
{
        unsigned frames = -1U;
        unsigned skip_frames = 0;
        [b]unsigned w = 512, h = 512;[/b]

        bool cli_err = false;
to this ......................
Code:
int main(int argc, char** argv)
{
        unsigned frames = -1U;
        unsigned skip_frames = 0;
        unsigned w = 256, h = 256; //change to 256*256 

        bool cli_err = false;
 
Farox said:
Thank for testing torpor.
I dont know is is important but looking at the original thread i found this from paeryn
<snip>
alternatively, you could just run it with the -screen parameter, which humbly resizes the app window on pandora ; )

topror, is that what you get when building under bullocks? can you add debug options to the build and check the backtrace in gdb?
edit: ah, bad window surfice is what you get, i originally misread you. do you have a eglGetDisplay(x11Display /*EGL_DEFAULT_DISPLAY*/) in the version you're compiling?

btw, as i'm still as pandora-less as i was when i originally posted the app, i cannot be of much help here with actual pandora lore.
 
Last edited by a moderator:
darkblu: I do have that code, yes .. it appears there is something wrong with the setup of the window. I can't debug it now (working@real job) but I'll have another go at it tonight, since this is a topic that seriously interests me .. ;)
 
Last edited by a moderator:
Sorry ...i'm just a poor newbe...i'm just try to make it work but surely GL/GLES is out of my skills.. :)

If someone have some suggestion let me know.. personally i think that before make some other change i will wait for my Pandora and test for myself .

I someone need it i will restore the version 2 of my package..let me know.
 
Farox, no doubt working 'virtually', without the hw can be extra tricky, perhaps prohibitively so if one is new to the field. But once you have your pandora i really doubt EGL or ES will be out of your skills. Just don't try to take it 'head on' - whenever in doubt, use the API documentation. For every function unclear to you (and even those that seem clear, but are new to you), don't hesitate to go here or here. Both APIs (ES2 and ES1) offer very concise and condensed philosophy to low-level 3D graphics, just from slightly different perspectives.
 
Back
Top