• 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 1 Guest are viewing this topic.

Petr Schreiber

#135
Patrice,

that is cool plugin again!

I attach here slightly tweaked version - why ask users to bother with driver and turn V-Sync on manually ? ;)
We can do it via extension ( but safely ). When plugin is de-initialized it will turn V-Sync off again.

wglGetProcAddress will give us the magic key ( pointer to proc ) to wglSwapIntervalEXT. It is safe to use, as implemented even on very old systems. In worst case it simply won't turn V-Sync on, if hardware/OS fails to support it.

It is fact plugin 007 is quite fillrate killer, I would not like to see it on Intel onboard beasts :-X
As the rendering is blending based, you really need faster card. But major slow down should be noticable only in case you look at angle, when all particles are in row.


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

psch.thinbasic.com

Charles Pegge

Stick Dance

Here is a replacement for PLUG003 including a wood texture to drop into the Texture file.

Patrice Terrier

Petr,

Thank you for the tip!

I didn't know it.

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

Patrice Terrier

--Charles

Thank you for the update of plug003, it will be put in the next patch, the one with Keyboard support ;)
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Petr Schreiber

Nice Charles,

it is hypnotizing scene!


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

psch.thinbasic.com

Patrice Terrier

I don't know why, but the new plug003 makes me think to alloween, perhaps related to this period of the year  ;D
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Charles Pegge

Thank you both. Already there is a wealth of material in all the plugins, so I hope we will be able to establish some interesting cross-breeds and encourage others to join in.

Patrice Terrier

#142
This is the BassBox version with Plugin keyboard support.


BassBox kernell GLWindowProc


FUNCTION GLWindowProc (BYVAL hWnd AS LONG, BYVAL Msg AS LONG, BYVAL wParam AS LONG, BYVAL lParam AS LONG) EXPORT AS LONG
    LOCAL hResource AS LONG, ps AS PAINTSTRUCT, rc AS RECT
    LOCAL BBP AS BBPLUGIN
   
    SELECT CASE LONG Msg
    CASE %WM_ERASEBKGND
         FUNCTION = 1: EXIT FUNCTION
    CASE %WM_KEYDOWN TO %WM_UNICHAR
         BBP.Msg    = %BBP_KEYBOARD
         BBP.WinMsg = Msg
         BBP.wParam = wParam
         BBP.lParam = lParam
         CALL BBP_Plugin(BBP)   
    CASE %WM_MOUSEMOVE TO %WM_XBUTTONDBLCLK
         BBP.Msg    = %BBP_MOUSE
         BBP.WinMsg = Msg
         BBP.wParam = wParam
         BBP.lParam = lParam
         CALL BBP_Plugin(BBP)
    CASE %WM_PAINT
         CALL BeginPaint(hWnd, ps)
         CALL EndPaint(hWnd, ps)
         FUNCTION = 0: EXIT FUNCTION
    END SELECT
    FUNCTION = DefWindowProc (hWnd, Msg, wParam, lParam)
END FUNCTION




And it is up to you to handle the %BBP_KEYBOARD message in your plugin.


    CASE %BBP_KEYBOARD
         '// Handle all Windows keyboard messages there
         Msg = BBP.WinMsg: wParam = BBP.wParam: lParam = BBP.lParam
         SELECT CASE LONG Msg
         CASE %WM_KEYDOWN
         CASE %WM_KEYUP
         END SELECT


See below BassPatch36.zip

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

Kent Sarikaya

I love seeing all these updates, thanks Guys great Job !!!

I hope someday to add a plug in, but still got a lot to learn. Till then really enjoy what all you guys are doing.

Patrice Terrier

#144
Do you remember AMIGA's time?

Then you will enjoy this new version of BassBox that provides full support for SoundTracker audio files:
IT / XM / S3M / MTM / MOD / UMX / MO3

To try it, drag the provided "BackToRoots.mod" either on the BassBox desktop icon or on the player if it is already running.

If anyone here has a server with some free space on it, then I could upload my private SoundTracker collection there?

By the way you can find many places over the NET where you can download mega bytes of them.

See below the attached BassPatch37.zip

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

Kent Sarikaya

The mod format is so nice, perfect for size to quality. I don't know why we don't see it being used these days. I still think it is more than adequate as a music file format for so many situations. Do any of you guys recommend a good Mod Creation program? I want to make music for use in games and even compared to mp3's you can get so much music for so little space.

Patrice Terrier

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

Charles Pegge

#147
Here is a replacement for Plugin005, making use of Patrice' mouse, keyboard and fft extensions.

Use the mouse to change the orientation (left button) and distance (right button) of the circles.

The space bar will reset the orientation of the circles. (PS: but only on single tracks so I'll use another key next time)

Patrice Terrier

#148
--Charles,

Please use the MakeTexture procedure below, to create the texture and to be more cooperative with other plugins.


SUB MakeTexture(zPathToTexture AS ASCIIZ)
    LOCAL nRet, xSize, ySize AS LONG
    DIM Texture(0) AS STATIC LONG

    REDIM PixelArray(0) AS BYTE
    IF BBP_CreateGLTextureFromFile(zPathToTexture, xSize, ySize, PixelArray(), 1) THEN
       CALL glDeleteTextures(1, Texture(0))
       CALL glGenTextures(1, Texture(0)): nRet = glGetError()
       IF nRet = 0 THEN
          CALL glBindTexture(GL_TEXTURE_2D, Texture(0))
          CALL glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
          CALL glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
          CALL glTexImage2D(GL_TEXTURE_2D, 0, 4, xSize, ySize, 0, GL_RGBA, GL_UNSIGNED_BYTE, PixelArray(0))
       END IF
    END IF

END SUB



and use it like this is the %BBP_INIT message


         CALL ColorInit()
         glEnable GL_TEXTURE_2D
         CALL MakeTexture ($BBP_PLUGIN_FOLDER + "Texture\mask72.jpg")



And if you want to handle keyboard messages, then you should put the focus onto the OpenGL control, when the user click on the left mouse button, because the Kernell doesn't do it.

[PseudoCode]
IF LeftMouseButtonDown and GetFocus <> BBP.ParentWindow THEN SetFocus(BBP.ParentWindow)
[/PseudoCode]

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

Charles Pegge

Patrice,

I will adopt the technique of pre-deleting the texture list before setting up new ones. Like you do. But in this case the disturbance was caused by using

         glTexParameteri GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_NEAREST
putting it back to:

         glTexParameteri GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR

fixes the problem but you get more texture scaling artefacts.


None of the keyboard messages seem to be getting through to the %BBP_KEYBOARD, though the spacebar will sometimes reinitialise the Plugin (which gave me the impression it was working). I will trace through the message processing to see where the blockage might be. I have tried SETFOCUS as you suggested but I don't think that is the problem.