Jump to content


Photo

Little Gles Pandora Test


  • Please log in to reply
17 replies to this topic

#1 Farox

Farox

    GP Mania

  • GP Guru
  • 491 posts
  • Gender:Male
  • Location:Italy
  • Interests:Pandora
    GP2X
    Caanoo

Posted 02 September 2010 - 11:14 PM

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

Edited by Farox, 10 September 2010 - 11:13 PM.


#2 Gruso

Gruso

    thunderbox

  • X-treme Team
  • 5538 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 03 September 2010 - 06:25 AM

Gave it a go, it opened a window but only displayed black.

#3 Farox

Farox

    GP Mania

  • GP Guru
  • 491 posts
  • Gender:Male
  • Location:Italy
  • Interests:Pandora
    GP2X
    Caanoo

Posted 03 September 2010 - 10:13 AM

Thank Gruso :)
If you could try to run on a terminal...so to see if something wrong .

#4 Gruso

Gruso

    thunderbox

  • X-treme Team
  • 5538 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 03 September 2010 - 11:07 AM

Here's the entire output:

Spoiler


#5 Farox

Farox

    GP Mania

  • GP Guru
  • 491 posts
  • Gender:Male
  • Location:Italy
  • Interests:Pandora
    GP2X
    Caanoo

Posted 03 September 2010 - 06:45 PM

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 ;)

Edited by Farox, 03 September 2010 - 06:47 PM.


#6 Gruso

Gruso

    thunderbox

  • X-treme Team
  • 5538 posts
  • Gender:Male
  • Location:Sydney, Australia

Posted 04 September 2010 - 12:40 AM

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!

#7 Farox

Farox

    GP Mania

  • GP Guru
  • 491 posts
  • Gender:Male
  • Location:Italy
  • Interests:Pandora
    GP2X
    Caanoo

Posted 04 September 2010 - 10:13 AM

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.

#8 Farox

Farox

    GP Mania

  • GP Guru
  • 491 posts
  • Gender:Male
  • Location:Italy
  • Interests:Pandora
    GP2X
    Caanoo

Posted 04 September 2010 - 10:30 AM

More ....i've just asked some help from the original author's thread...

#9 darkblu

darkblu

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 569 posts

Posted 05 September 2010 - 08:36 PM

hey Farox,

for some reason the reading of the shader source files fails. Here's the respective line in the code:
https://code.google....wse/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:

DISPLAY=:0.0 strace ./test_es -frames 1


#10 Farox

Farox

    GP Mania

  • GP Guru
  • 491 posts
  • Gender:Male
  • Location:Italy
  • Interests:Pandora
    GP2X
    Caanoo

Posted 05 September 2010 - 11:09 PM

Thank you darkblu :)

I have updated the code with the new version and submitted a new package (version 2) at first post.

#11 torpor

torpor

    hack hack hack, the little machines fight back

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2377 posts
  • Gender:Male
  • Location:vienna, austria

Posted 06 September 2010 - 07:34 PM

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 ..

#12 Farox

Farox

    GP Mania

  • GP Guru
  • 491 posts
  • Gender:Male
  • Location:Italy
  • Interests:Pandora
    GP2X
    Caanoo

Posted 06 September 2010 - 08:03 PM

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
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 ......................
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;


#13 darkblu

darkblu

    Mega GP Mania

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 569 posts

Posted 07 September 2010 - 02:34 AM

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.

Edited by darkblu, 07 September 2010 - 02:38 AM.


#14 torpor

torpor

    hack hack hack, the little machines fight back

  • GP32 Hardcore
  • PipPipPipPipPipPip
  • 2377 posts
  • Gender:Male
  • Location:vienna, austria

Posted 07 September 2010 - 07:13 AM

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 .. ;)

#15 Farox

Farox

    GP Mania

  • GP Guru
  • 491 posts
  • Gender:Male
  • Location:Italy
  • Interests:Pandora
    GP2X
    Caanoo

Posted 10 September 2010 - 11:16 PM

New package version 3 .
I found that Paeryn code suggestions (see it at http://www.gp32x.com...post__p__874167
and open the first Spoiler ) was lost on the new version of Darkblu code.

I have readded it ...so Please test and report . Thanks