PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

N97 - Dark Screen after OnRestore

Hi,

I'm working on an application for Nokia N97 using OpenGL and the latest EDGELIB Version.

My problem is as follows: Each time I restore the application back to the foreground, the application window is displayed and over it there is a dark surface, which is a left over from the minimize that sent the application to the background.

Note that the application is responsive to touch after the restore.

I've tried out a few things (Symbian code) in order to try and solve this problem.

1. I've tried to turn on the lights of the device, with no apparent success.

2. I've noticed that locking and locking the device helps getting rid of the dark surface, so I've tried to simply unlock the device. It didn't work.

The only thing that did show some results was - Locking the device and then Unlocking it.
The problem here is that I get into a loop of OnRestore() -> Lock -> UnLock -> OnRestore() and so on..

Another important remark would be that other EDGELIB applications I've written, that don't use OpenGL, work just fine when minimized and restored.

Any suggestions on how to solve this issue ?

Thank you for your time,

Ita
Hi,

Perhaps the issue is caused by OpenGL not properly being cleared.

Could you try the following?
- Calling ecd.dsp->Resume() after OnRestore
- Calling ecd.dsp->Clear() and see if it gets rid of the black screen
- Closing and reopening the display
edge wrote:Hi,

Perhaps the issue is caused by OpenGL not properly being cleared.

Could you try the following?
- Calling ecd.dsp->Resume() after OnRestore
- Calling ecd.dsp->Clear() and see if it gets rid of the black screen
- Closing and reopening the display

Hey,

Thank you for your quick reply.

I've tried to call the Resume() and Clear() methods but nothing has changed.
As for closing and reopening the display. Can you please tell me which arguments should I open the display with ?

Thanks,

Ita
Hi Ita,

I'm affraid reopening the display isn't going to work. Can you tell me if you refresh the display every frame? Also, is the screen really black or just dimmed?
edge wrote:Hi Ita,

I'm affraid reopening the display isn't going to work. Can you tell me if you refresh the display every frame? Also, is the screen really black or just dimmed?


Hi,

The screen is not really black, it is dimmed, as you said.

I'm not so sure what do you mean by "refreshing the display".
I do not clear the display, but if it helps I can say that new images can be seen drawn under the dimmed surface.
I blt to the display every frame.

Did that answer you question ?
RapchikProgrammer · 15 Oct 2009, 15:56 UTC
Are you sure your backlight is on? if not write this line in OnFrameworkConfig:

config->backlighton = true;
RapchikProgrammer wrote:Are you sure your backlight is on? if not write this line in OnFrameworkConfig:

config->backlighton = true;


Thanks for the help with this one :)

I've set it to true but still the screen is dimmed.
Do you have any other ideas ?
RapchikProgrammer · 18 Oct 2009, 21:10 UTC
are you clearing your buffers before blitting with this:

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

it should be once at the beginning of OnNextFrame..
RapchikProgrammer wrote:are you clearing your buffers before blitting with this:

glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

it should be once at the beginning of OnNextFrame..


10x for your support.
I'm intentionally not using the clear option because I'm using a Clipper on the display in order to improve the fps.
Even though I must not clear the screen after each blt, I've tried this solution but still the display remained dimmed.
Hi Ita,

Please try the following test: when the application has just restored, try to fill the screen with a green color. Do you see a dimmed green screen, or just the previous screen? If it remains dimmed but shows a green color, there is something wrong with the backlight. If the screen doesn't change, then you can probably fix it by using the correct OpenGL functions. Let me know the results.
Hi Edge and thank you for your support,

I've tried your suggestion and inserted the following code into OnRestore()
Code:
#if defined(EGL_SYMBIAN)
glClearColorx(0, 19968, 38912, 65536);
#else
glClearColor(0, 0.3f, 0.6f, 1);
#endif
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);


The result:
After I restored the app the screen was dimmed blue ( I know you've asked for green but I just couldn't resist myself :) )
I should mention that once I got the OnRestore() I needed to disable my own OnNextFrame() drawing process, in order to be able to see the blue screen.

What's next ?
Hi Ita,

The best way to proceed forward is to investigate why the backlight won't come on on this specific device. Perhaps there are others who have the same issue. Also try existing (OpenGL-enabled) games on this device and see if it has the same issue with the backlight.

You may also try to disable the backlighton setting in the EDGELIB configuration (it may sound funny, but perhaps this fixes your issue).
Hey,

I took your advice and did some extra resource.
First I tried to change the backlight configuration, which didn't solve the issue.

Second I searched for some OpenGLES based applications and installed it.

The problem of the dimmed display haven't repeated itself.

The application I've used is called "GLBenchmark 1.1" and here is a link to download it.
http://www.ipmart-forum.com/showthread.php?t=400436

I've also tested the same issue on another game that I suspect uses OpenGLES, and still the problem didn't recurred.

Where do we go from here ?
Hi Ita,

I think the last thing you can do is to run the EDGELIB Animate3D sample, and check if it's an EDGELIB issue or not (if the sample is working correctly with the backlight, then it's something in your own application).

You can also try to download the latest firmware and test your application on other Symbian devices.
Hi,

Thank you for your time.

I've installed the Animate3D on N97 and the problem persist. (I'm using the latest firmware for this device)

I've also tried my own application on the Nokia5800 device and the same goes for this device.

This seems like a problem which is unique to EDGELIB.

Ita