×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Apr 2003
    Location
    Spain
    Posts
    7

    linear framebuffer

    Hi all. My intention is to make some kind of screensaver for the Nokia 7650.

    My problem is that i want to draw the effects from my buffer to the screen. Is there any way of doing this with something similar to a liner framebuffer? or do i have to play with creating a bitmap(with the bitmap clases in symbian API), drawing it to the screen and updating it every frame?

    I don't need any function from the API to produce the efects, i just want to blit the content of my buffer to the screen in a fast way.

    Thanks.
    Last edited by artblanc; 2003-04-02 at 17:49.

  2. #2
    Registered User
    Join Date
    Jun 2003
    Location
    ronneby, sweden
    Posts
    11
    see iDirectScreenAccess, or do a search for ScreenInfo in the forum.
    A word of warning though, I have followed these advices and are having problems with the code when run on the actual device.
    Hopefully someone will be kind enough to provide an actual skeleton sourcecode that provides a screenbuffer pointer and handles everything with the windowserver (correcly on emulator AND device) so all us graphicsfreaks can go directly to our business. =)

  3. #3
    Registered User
    Join Date
    Apr 2003
    Location
    Spain
    Posts
    7

    thanks

    Thanks for the reply, i'm going to see what i find there. I gave it up last month and start using its clases to handle bitmaps and just limited myself to sprites doing.

  4. #4
    Registered User
    Join Date
    Mar 2003
    Posts
    26
    I think better way to do this is to access directly to CFbsBitmap memory and then blit it to the screen. Look CFbsBitmap::DataAddress()

  5. #5
    Registered User
    Join Date
    Jun 2003
    Location
    ronneby, sweden
    Posts
    11
    well, drawing to an intermediate bitmap does work, but it wastes alot of cpu and so, it is subobtimal..
    Here some citations from other posts in this forum that I have saved, I think they both are from a Nokia representative:

    -----post 1 ------
    The tics in the emulator are 1/10 seconds and they are 1/64 in the device. That's why wait
    makes it very slow in the emulator.

    Note that you do not necessarily need to work in an offscreen bitmap. You can use the screen
    buffer for double buffering. Once you have drawn in the screen buffer what you wanted, then use
    iDirectScreenAccess->ScreenDevice()->Update();

    You save a lot of time that way.

    Screen buffer is not flushed until you do it. Only when using window server, it would update
    the screen from the screen buffer automatically. Window server flush is not needed, unless you
    are using Window server drawing commands. To make it fast, you should not.


    ---- post 2 ------


    From the Direct Screen Access classes you get only the Graphics context. If that does not serve
    you, you can get the screen buffer address with ScreenInfo and handle the window server
    interruptions with the Direct Screen Access framework. This way you get the best of the both
    worlds: Draw directly to the screen and still won't interfere the window server. In this case
    you just have to make sure you are using the whole screen - or use only the areas that you
    reserve from the window. You also have to stop drawing whenever DSA clips region.. So in a
    way you are a bit more restricted... But this works.

    ------ back to my comments----

    ...but I can not get this to work correctly on the device itself. I guess alot of us have that problem.

  6. #6
    Super Contributor
    Join Date
    Apr 2003
    Location
    Czech Republic
    Posts
    915
    ----------citation-------------
    Note that you do not necessarily need to work in an offscreen bitmap. You can use the screen
    buffer for double buffering. Once you have drawn in the screen buffer what you wanted, then use
    iDirectScreenAccess->ScreenDevice()->Update();
    ------ end citation-------------

    I don't think so. I've tried it and it doesn't work (at least I haven't found a way to do it). But if I create offscreen bitmap and than Bitblt it whole on the screen in one go (using CDirectScreenAccess) I'm able to do 32fps without problems (on Nokia 3650 if I don't do too much computation during creating bitmap). If I count it correctly...:-)
    Tom

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •