Switching from OpenWindowedScreen to OpenGLGadget?
Posted: Mon Jan 25, 2021 8:44 am
Need some advice...
I am busy with a third attempt to create "Pixys".
Pixys is a visualisation tool running as a VST-plugin in a DAW.
(see http://www.raxntrax.com/pixys_beta)
It is an ongoing experiment. I have started with pure GDI, then going to GDI+/canvasgadget and then to OpenWindowedScreen+Sprites.
The performance is now OK.
I can color/zoom/move/rotate* sprites with the automation data coming from the DAW.
So far, so good.
But now I am stuck.
Rotation is done with RotateSprite, which is in fact a Z-rotation.
I want to be able to do X and Y-rotation as well.
I can use TransformSprite for that and use Demivec workaround for OpenGL but it's not 100% what I am looking for.
(viewtopic.php?f=12&t=72377&hilit=Transformsprite)
Considering that I am looking for the highest possible performance and the fact that Pixys is a VST-plugin that should be as lightweight as possible, I am in doubt whether i should switch to OpenGL with the OpenGLGadget.
I can simulate sprites with textures in the OpenGLGadget but I am not sure if "OpenGL/Textures" is as fast as the "native sprite library" from purebasic.
Furthermore : switching to OpenGLGadget excludes DirectX which still is a bit faster than OpenGL (at least in this context -> Windows->VST-Plugin/DAW)
I have been searching the forums for ways to interfere directly with the sprite library, but I can't seem to find any answers.
For example: a command like opengl->glviewport() is working fine with openwindowedscreen, but i also need to be able to access the sprites with opengl.
(StartDrawing -> SpriteOutput is not an option).
(I am willing to give up on DirectX and go the OpenGL route.)
It would be great not to switch to OpenGLGadget and to be able to use glRotatef() commands on sprites created by the native sprite library....
(Or to have a TransformSprite that works exactly like glRotatef() including perspective when rotating around X and Y-axis and is very fast)
I am busy with a third attempt to create "Pixys".
Pixys is a visualisation tool running as a VST-plugin in a DAW.
(see http://www.raxntrax.com/pixys_beta)
It is an ongoing experiment. I have started with pure GDI, then going to GDI+/canvasgadget and then to OpenWindowedScreen+Sprites.
The performance is now OK.
I can color/zoom/move/rotate* sprites with the automation data coming from the DAW.
So far, so good.
But now I am stuck.
Rotation is done with RotateSprite, which is in fact a Z-rotation.
I want to be able to do X and Y-rotation as well.
I can use TransformSprite for that and use Demivec workaround for OpenGL but it's not 100% what I am looking for.
(viewtopic.php?f=12&t=72377&hilit=Transformsprite)
Considering that I am looking for the highest possible performance and the fact that Pixys is a VST-plugin that should be as lightweight as possible, I am in doubt whether i should switch to OpenGL with the OpenGLGadget.
I can simulate sprites with textures in the OpenGLGadget but I am not sure if "OpenGL/Textures" is as fast as the "native sprite library" from purebasic.
Furthermore : switching to OpenGLGadget excludes DirectX which still is a bit faster than OpenGL (at least in this context -> Windows->VST-Plugin/DAW)
I have been searching the forums for ways to interfere directly with the sprite library, but I can't seem to find any answers.
For example: a command like opengl->glviewport() is working fine with openwindowedscreen, but i also need to be able to access the sprites with opengl.
(StartDrawing -> SpriteOutput is not an option).
(I am willing to give up on DirectX and go the OpenGL route.)
It would be great not to switch to OpenGLGadget and to be able to use glRotatef() commands on sprites created by the native sprite library....
(Or to have a TransformSprite that works exactly like glRotatef() including perspective when rotating around X and Y-axis and is very fast)