Register
Site Login
Site Search
Forums
Advertisement
Welcome to PocketMatrix. PocketMatrix is dedicated to providing the best online community for mobile device developers and enthusiests. What's new?

N97 - Dark Screen after OnRestore


N97 - Dark Screen after OnRestore

Postby itaita » Oct 8, 2009 @ 5:53pm

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
itaita
pm Member
 
Posts: 10
Joined: Apr 23, 2009 @ 9:41am


Postby edge » Oct 9, 2009 @ 7:54am

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
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby itaita » Oct 11, 2009 @ 9:43am

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
itaita
pm Member
 
Posts: 10
Joined: Apr 23, 2009 @ 9:41am


Postby edge » Oct 15, 2009 @ 1:04pm

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?
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby itaita » Oct 15, 2009 @ 2:45pm

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 ?
itaita
pm Member
 
Posts: 10
Joined: Apr 23, 2009 @ 9:41am


Postby RapchikProgrammer » Oct 15, 2009 @ 4:56pm

Are you sure your backlight is on? if not write this line in OnFrameworkConfig:

config->backlighton = true;
RapchikProgrammer
pm Member
 
Posts: 56
Joined: Oct 18, 2008 @ 7:08am


Postby itaita » Oct 18, 2009 @ 2:43pm

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 ?
itaita
pm Member
 
Posts: 10
Joined: Apr 23, 2009 @ 9:41am


Postby RapchikProgrammer » Oct 18, 2009 @ 10:10pm

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
pm Member
 
Posts: 56
Joined: Oct 18, 2008 @ 7:08am


Postby itaita » Oct 21, 2009 @ 2:38pm

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.
itaita
pm Member
 
Posts: 10
Joined: Apr 23, 2009 @ 9:41am


Postby edge » Oct 23, 2009 @ 8:21am

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.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby itaita » Oct 25, 2009 @ 5:57pm

Hi Edge and thank you for your support,

I've tried your suggestion and inserted the following code into OnRestore()
Code: Select all






        #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);
6 lines; 4 keywds; 10 nums; 20 ops; 0 strs; 0 coms    Syntactic Coloring v0.4 - Dan East  


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 ?
itaita
pm Member
 
Posts: 10
Joined: Apr 23, 2009 @ 9:41am


Postby edge » Oct 26, 2009 @ 9:30am

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).
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby itaita » Oct 26, 2009 @ 12:39pm

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 ?
itaita
pm Member
 
Posts: 10
Joined: Apr 23, 2009 @ 9:41am


Postby edge » Oct 28, 2009 @ 10:26am

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.
EDGELIB: Cross-platform mobile development at your fingertips
http://www.edgelib.com
User avatar
edge
pm Member
 
Posts: 1180
Joined: Aug 22, 2005 @ 3:42pm
Location: The Netherlands


Postby itaita » Oct 29, 2009 @ 3:07pm

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
itaita
pm Member
 
Posts: 10
Joined: Apr 23, 2009 @ 9:41am


Return to EDGELIB


Sort


Forum Description

Powerful and affordable C++ middleware solution covering true multi-platform 2D, 3D and network features for Apple iPhone, Windows Mobile, Symbian S60, UIQ, Linux and Windows desktop.

Moderator:

edge

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum