• Welcome to Theos PowerBasic Museum 2017.

BassBox

Started by Patrice Terrier, October 08, 2007, 10:57:44 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Emil Weiss

#525
Quote from: Patrice Terrier on June 16, 2008, 08:16:57 PM
I confirm that your code changes the setting.

try it with the option "with GenBitmap" then you will see that previous state is not restored.

...
no understand what make Vista

on my system the flag is of.. show pic
and restore settings when change buttondown to up

think vista make any problems and very slow system ;) or I :) hehehehee

EDIT:
That is the reason that I'm not using it

greets Emil

Patrice Terrier

Emil

VISTA is a wonderful OS for advanced graphic applications, believe me  8)

If you can give a try to BassBox on a VISTA computer, then switch to either "Blur" or "Crystal" mode and look at the aspect of the BassBox interface while you move the window hover the desktop or any other applications. I guess you will be amazed.

Also note that there is no FPS loss while moving the window hover the desktop.

See the screen shot there:
http://www.jose.it-berater.org/smfforum/index.php?topic=1372.0

And for XP see it there:
http://www.jose.it-berater.org/smfforum/index.php?topic=1283.0
http://www.jose.it-berater.org/smfforum/index.php?topic=1263.0
http://www.jose.it-berater.org/smfforum/index.php?topic=1314.0
http://www.jose.it-berater.org/smfforum/index.php?topic=1580.0
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Emil Weiss

show good .. on vista ;)
I wonder why opengl with bassvis with you running so slow on Vista
and fery fast on XP

hmm .. can nothing do for it  :'(

greets Emil

Patrice Terrier

Emil

Quotehmm .. can nothing do for it 
Yes you can, look closely in the BassBox source code at the InitOpenGL function.

Also very important in VISTA is to use this:
          CALL SwapBuffers(glDC)
          CALL zUpdateWindow(glCtrl, 0) '// <---- to force DWM to update the video buffer
instead of this
          CALL wglSwapBuffers(glDC)


And the other solution is to disable the VISTA AERO mode, but not very friendly i think  ;)

I am reporting this to you because other users of BassVis may experience the same behaviour while running on VISTA, and I think it would be hard to tell them to switch back to XP.

My previous multimedia player has been totaly broken by all the VISTA changes, and i first wrote BassBox as a kind of laboratory to experiment with.

And I have shared here, what i have learned the hard way about VISTA and without the help of MSDN that was only prolific with DotNET managed documentation ...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Emil Weiss

QuoteTo make the progress bar like this winamp example, take a look at the "Impulse" plugin source code (the part that is drawn on top, and consider just the left or right channel part).
not work by me ;)

look in to can nothing do with it
Songtext and Time now work..

greets Emil

Emil Weiss

QuoteAlso very important in VISTA is to use this:
          CALL SwapBuffers(glDC)
          CALL zUpdateWindow(glCtrl, 0) '// <---- to force DWM to update the video buffer
instead of this
          CALL wglSwapBuffers(glDC)

ahhhh Thanks i will check this ;)
if this the same as UpdateWindow(Handle) ?

greets Emil

Patrice Terrier

'// To perform immediate redraw of any Windows control.
SUB zUpdateWindow (BYVAL hWnd AS LONG, BYVAL FlagMode AS LONG)
    CALL InvalidateRect(hWnd, BYVAL 0&, FlagMode)
    CALL UpdateWindow(hWnd)
END SUB
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Emil Weiss

#532
Quote from: Patrice Terrier on June 16, 2008, 09:49:23 PM
'// To perform immediate redraw of any Windows control.
SUB zUpdateWindow (BYVAL hWnd AS LONG, BYVAL FlagMode AS LONG)
    CALL InvalidateRect(hWnd, BYVAL 0&, FlagMode)
    CALL UpdateWindow(hWnd)
END SUB


thanks ;)
i have found it in to zSkins

i have make fellow ..
    // Refresh display
    if SwapBuffers(glDc) = True then
      Result := True;

    zUpdateWindow(glCtrl, Bool(0));
    ReleaseDC(glCtrl, glDc);


can check OS System think not necessary
use this for XP and Vista

ok i make fellow
remove SetFullWindowDrag from Example Exe
and change Screen Resolution then send back for you a new Sample.

EDIT:procedure zUpdateWindow (Handle : integer; FlagMode : LongBool);
begin
    InvalidateRect(Handle, nil, FlagMode);
    UpdateWindow(Handle);

end;


greets Emil

Emil Weiss

#533
here a new sample ;)
hope it is any faster as befor

remove SetFullWindowDrag
remove change Desktop resolution

added zUpdateWindow

greets Emil

Patrice Terrier

Emil,

It is better.
However without using yourself a VISTA computer, it is like shooting in the dark.

...

Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Emil Weiss

Quote from: Patrice Terrier on June 17, 2008, 02:36:02 PM
Emil,

It is better.
However without using yourself a VISTA computer, it is like shooting in the dark.

...


yes you have right ;)

greets Emil

Emil Weiss

#536
Patrice

one question
activate WM_PAINT
not used befor ..

      WM_PAINT:
      begin
        BeginPaint(WndHandle, ps);
        EndPaint(WndHandle, ps);
        Result := 0;
        exit;
      end


is this faster or slower under Vista?
have added a temp FPS .. on XP 40 Frames with 1280x1024

greets Emil

Patrice Terrier

It all depends how you create the OpenGL window container.

If you use zsRegisterVisualClass then yes, it could help to perfrom a wm_paint do nothing.

On VISTA and on XP, with the latest BassBox version, the FPS rate is limited to 34.
It was 66 FPS with the previous version, but this was using more CPU resources because the real time oscilloscope and the two peak meters are drawn with GDIPLUS.

I have been told that BassBox works very well even on a little Eee PC.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Emil Weiss

QuoteBassBox works very
yes work great ;)

thanks for the information.

greets Emil

Emil Weiss

i have aktivate VSync now think this is better for Vista


procedure VBL2(vsync : TVSyncMode);
var
   i : Integer;
begin
   if WGL_EXT_swap_control then
   begin
      i := wglGetSwapIntervalEXT;
      case VSync of
         vsmSync    : if i<>1 then wglSwapIntervalEXT(1);
         vsmNoSync  : if i<>0 then wglSwapIntervalEXT(0);
      else
         Assert(False);
      end;
   end;

end;


greets Emil