José Roca Forum
Web Site
News: Version 4.0.14 of the TypeLib Browser released
 
*
Welcome, Guest. Please login or register. September 09, 2010, 02:43:18 PM


Login with username, password and session length


PowerBASIC is a trademark of PowerBASIC, Inc.
This is not an official PowerBASIC site and we are not affiliated with PowerBASIC, Inc.
DISCLAIMER: The software and accompanying documentation are provided "as is" and without warranties as to performance or merchantability or any other warranties whether expressed or implied. Because of the various hardware environments into which the software may be used, no warranty of fitness for a particular purpose is offered. The user must assume the entire risk of using the software. In no case shall any of the contributors to this project be liable for any incidental, special or consequential damages or loss, including, without limitation, lost profits or the inability to use equipment or access data. This is true even if we are advised of the possibility of such damages. We also don't have any obligation of fix eventual bugs or to add new features.
Pages: 1   Go Down
  Print  
Author Topic: WinScape (pushing the limits)  (Read 1977 times)
0 Members and 1 Guest are viewing this topic.
Patrice Terrier
Global Moderator
Hero Member
*****

Karma: 36
Offline Offline

Gender: Male
Posts: 1353


WWW
« on: February 04, 2009, 07:49:51 PM »

This is another attempt to push the Windows window limits.

By the way the next step would be to play AVI or Flash animation in the background.
I shall have a look at José's COM example to play a flv file.
If you know of a nice, smooth, FLV animation, something like clouds moving slowly or lights effects, please let me know.

...
Logged

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com
Eros Olmi
Sr. Member
****

Karma: 12
Offline Offline

Gender: Male
Posts: 372



WWW
« Reply #1 on: February 04, 2009, 09:55:13 PM »

Patrice,

this is one of the best effect I've seen since a lot of time.

Great!
« Last Edit: February 04, 2009, 10:24:52 PM by Eros Olmi » Logged

thinBasic Script Interpreter - www.thinbasic.com | community.thinbasic.com
Win7Pro 64bit - 8GB Ram - Intel i7 M620 2.67GHz - NVIDIA Quadro FX1800M 1GB
Patrice Terrier
Global Moderator
Hero Member
*****

Karma: 36
Offline Offline

Gender: Male
Posts: 1353


WWW
« Reply #2 on: February 04, 2009, 10:23:09 PM »

Eros,

Thank you.
Logged

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com
Petr Schreiber
Sr. Member
****

Karma: 9
Offline Offline

Posts: 420


« Reply #3 on: February 05, 2009, 10:04:09 AM »

Hi Patrice,

very hypnotic demo as usual.
I just changed %TIMER_DELAY to 20, making it run at 50FPS, and it still uses just 10% CPU power!

But there is one mystery I cannot solve - where in code do you perform the image shifting? Smiley


Thanks,
Petr
Logged

AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com
Patrice Terrier
Global Moderator
Hero Member
*****

Karma: 36
Offline Offline

Gender: Male
Posts: 1353


WWW
« Reply #4 on: February 05, 2009, 12:52:46 PM »

Quote
But there is one mystery I cannot solve - where in code do you perform the image shifting?

See the WinScape's dedicated zaniskin.inc file.

New API(s):
Code:
FUNCTION zAnimResetXX(BYVAL N AS LONG, BYVAL RW AS LONG) AS LONG
    STATIC WasN AS LONG
    IF RW THEN WasN = N
    FUNCTION = WasN
END FUNCTION

FUNCTION zAnimUseStretchMode(BYVAL N AS LONG, BYVAL RW AS LONG) AS LONG
    STATIC WasN AS LONG
    IF RW THEN WasN = N
    FUNCTION = WasN
END FUNCTION

Modified API: zMoveBackground
Code:

             CALL zComputeAspect(800, 600, rc.nRight, rc.nBottom, xP, yP, xS, yS)
             STATIC FlipMove AS LONG
             IF zAnimUseStretchMode(0, 0) THEN
                CALL GdipDrawImageRectRectI(graphics, Img, xP, yP, xS, yS, xx, 0, 800 * ((ImgW - xx) / 800), 600, %UnitPixel, ImgAttr)
             ELSE
                CALL GdipDrawImageRectRectI(graphics, Img, xP, yP, xS, yS, xx, 0, 800, 600, %UnitPixel, ImgAttr)
             END IF
             IF zAnimResetXX(0, 0) THEN xx = 0: CALL zAnimResetXX(0, 1)
             IF FlipMove = 0 THEN
                xx += 1: IF xx > imgW - 800 THEN FlipMove = -1
             ELSE
                xx -= 1: IF xx < 0 THEN FlipMove = 0: xx = 0
             END IF
 

...
« Last Edit: February 05, 2009, 01:05:14 PM by Patrice Terrier » Logged

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com
Patrice Terrier
Global Moderator
Hero Member
*****

Karma: 36
Offline Offline

Gender: Male
Posts: 1353


WWW
« Reply #5 on: February 05, 2009, 02:56:34 PM »

Petr,

Quote
I just changed %TIMER_DELAY to 20, making it run at 50FPS, and it still uses just 10% CPU power!

How much when running in stretched mode, and also how much in full screen mode with or without stretching?
and tell me if you use XP or your new VISTA 32x?

...
 
Logged

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com
Petr Schreiber
Sr. Member
****

Karma: 9
Offline Offline

Posts: 420


« Reply #6 on: February 05, 2009, 07:03:40 PM »

Hi Patrice,

I had chance to test it only on XP box so far, as it is mine. The Vista one is not in common perimeter of my influence Smiley
Interesting observation - in 800x600 those 2 effects differ, in fullscreen they are both quite demanding - probably reaching some system component bottleneck?

When I render OpenGL quad with scrolling images you use, I get easily 0% even at 1280x1024, so I guess CPU/Memory is not fast enough on my PC.

Quote
WinScape test
==============

PC: AMD Sempron 64 3400+ (1.8GHz); 1GB 533 RAM; GeForce 9500GT 512 DDR3;Windows XP SP2

TIMER_DELAY 20
--------------

Windowed 800x600:
Shift 0-10%
Stretch 50%

Maximized to 1280x1024:
Shift 99% but still smooth
Stretch 99% but still smooth

TIMER_DELAY 40
--------------

Windowed 800x600:
Shift 0-2%
Stretch 33%

Maximized to 1280x1024:
Shift 67%
Stretch 67%

TIMER_DELAY 80
--------------

Windowed 800x600:
Shift 0-2%
Stretch 17%

Maximized to 1280x1024:
Shift 31%
Stretch 31%

TIMER_DELAY 100
---------------

Windowed 800x600:
Shift 0-2%
Stretch 14%

Maximized to 1280x1024:
Shift 28%
Stretch 28%
« Last Edit: February 05, 2009, 07:15:16 PM by Petr Schreiber » Logged

AMD Sempron 3400+ | 1GB RAM @ 533MHz | GeForce 6200 / GeForce 9500GT | 32bit Windows XP SP3

psch.thinbasic.com
Patrice Terrier
Global Moderator
Hero Member
*****

Karma: 36
Offline Offline

Gender: Male
Posts: 1353


WWW
« Reply #7 on: February 05, 2009, 07:48:41 PM »

Ok, Petr, thank you for the detailed feedback.

On my HP HDX18 running VISTA X64 and using the Sky background in full HD mode (1920 x 1080),
it ranges between 18-24, whatever the stretch mode being turned on or off.

This means, better to use the full screen mode with a horse race powered computer Wink

As a matter of comparison, on the same computer, MovieBox, playing a full HD MKV movie, ranges between 27-36.

...


Logged

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com
Pages: 1   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC

IMPRESSUM
Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
Page created in 0.066 seconds with 19 queries.