beddu
Posts: 21
Joined: Thu May 18, 2017 8:29 am

Rendering works only on development platform

Tue May 23, 2017 11:43 am

Hello everybody!
I have a Raspberry PI 3B and a Raspberry PI Zero W, each one has its own SD card, on both SD cards I have the same Raspbian Jessie image (with Pixel).
On raspi 3B I installed Code::Blocks ide and developed a simple OGLES program. Let's call the SD card with code::blocks "development" and the other one "runtime". The program i made renders a white screen with a logo in the middle. It is compiled and it works. I moved only the executable file and the logo texture file to the runtime sd card, setted the permissions, checked that the program actually opens and loads the texture file by printing info on shell, but, i get the white screen without logo. I tried booting the raspi ZeroW with the development sd card, started the program, it works well. I tried booting the raspi 3B with the runtime sd card, no logo...

I am confused, there must be something that I dont (yet) know. How is possible that two clones behave in different ways regardless the hardware below them? Is maybe code::blocks making a difference?

Help!

SkyRise
Posts: 150
Joined: Tue Jan 24, 2012 1:20 pm

Re: Rendering works only on development platform

Tue May 23, 2017 11:47 am

Are you in the same directory on both Pi's?
Does your code reference a relative or static path for the image?

beddu
Posts: 21
Joined: Thu May 18, 2017 8:29 am

Re: Rendering works only on development platform

Tue May 23, 2017 11:52 am

SkyRise wrote:Are you in the same directory on both Pi's?
Does your code reference a relative or static path for the image?
The full path is not the same, but i have a folder with two folders inside: "bin" and "res". The executable is inside bin, texture inside res, and I load the texture by choosing "../res" as current path and then opening "logo.tga". Of course i start the executable file from the bin dir.

SkyRise
Posts: 150
Joined: Tue Jan 24, 2012 1:20 pm

Re: Rendering works only on development platform

Tue May 23, 2017 12:01 pm

Try printing out the path to the terminal just before you read the image file to debug.
You may have different environments set up which is causing the issue.

beddu
Posts: 21
Joined: Thu May 18, 2017 8:29 am

Re: Rendering works only on development platform

Tue May 23, 2017 12:17 pm

Unfortunately I have already something similar, in case the file was not loaded correctly I print out an error message, so I am quite sure that there are no problems from that point of view. I tried to intentionally start the program from a different path and the error messages are displayed correctly. I will make a new similar test again just to be 100% sure, but I'm still thinking about what else could be... No any other idea? Usually when a "ghost" like this comes out, it's always due to a very stupid mistake... :lol:

SkyRise
Posts: 150
Joined: Tue Jan 24, 2012 1:20 pm

Re: Rendering works only on development platform

Tue May 23, 2017 12:30 pm

The only other thing I can think of is that perhaps you installed something on the first Pi to interpret .tga files which you haven't installed on the other. I would expect this to throw an error of some sort, but you don't seem to be getting any errors...

User avatar
Paeryn
Posts: 1681
Joined: Wed Nov 23, 2011 1:10 am
Location: Sheffield, England

Re: Rendering works only on development platform

Tue May 23, 2017 12:43 pm

Have you got the GPU mem set too low on the "runtime" SD? Does your program check for any OpenGLES (and EGL) errors? If the textured polygon isn't showing but otherwise the program appears to work it could be that there wasn't enough GPU memory for the texture.
She who travels light — forgot something.

beddu
Posts: 21
Joined: Thu May 18, 2017 8:29 am

Re: Rendering works only on development platform

Tue May 23, 2017 12:51 pm

Paeryn wrote:Have you got the GPU mem set too low on the "runtime" SD? Does your program check for any OpenGLES (and EGL) errors? If the textured polygon isn't showing but otherwise the program appears to work it could be that there wasn't enough GPU memory for the texture.
You got it!! Finally!! :lol: my gpu mem was too low, on development sd I raised it, but I did not do that on runtime sd. Moreover, I am not checking for errors after texture loading... Double mistake.

Thank you guys! I am an happy man now!

Return to “OpenGLES”

Who is online

Users browsing this forum: No registered users and 1 guest