Indeed. A strength of FreeBasic graphic mode is that it could use all these modes, and it happens under the hood: this helps portability, because when the developers use the ScreenRes command, they don't need to care if the screen mode will be set using a VGA BIOS call, or the most advanced API.marcov wrote: There are multiple directions to go with drawing. Directly on a canvas, via a widget set, or via opengl/directx/vulkan. And of course plain sad old framebuffer and even older VESA 1.x VGA.
One of my patches in the source was to allow the use of OpenGL mode in the same way, so GPU shaders can be used on the FreeBasic graphic, too
Have you ever had a look at Vulkan? I really, really hope it won't go mainstream, at least not in its current form, because it looks terrible, for a developer. Look at one example:Which one to chose? The one with the most future potential, Vulkan ?
https://github.com/krOoze/Hello_Triangl ... iangle.cpp
More than 1600 lines... just to draw one triangle! Something that in OpenGL 1.0 was done with three or four commands. OpenGL 2.0 already made it much harder (I saw it, when I adapted OpenB3D).... Vulkan seems to aim to make it impossible.
No API dependent mess? And how are you supposed to play the generated files? You would still need to call the API to play a .WAV file (unless you try to play it with the SHELL command, that would be the worst solution). Both Windows and Linux sound API supports the option to play a buffer from memory, so there is no need to save the sound on the hard disk and reload it to play it, when you can play it directly.If you can generate it to play directly, you can generate it on install or first run too. No downloads and no hardware or API dependent mess.
@jj2007
Your syntax is too ambiguous: what if I want to play a sound file that is called "200" (a perfectly valid file name)?. Sound "200" would refer to a frequency, or to that file? Never use strings in place of numeric parameters.
My idea is something like:
Code: Select all
sound PulseWave(100),3
sound TriangleWave (200),8
Code: Select all
Dim MyBuffer(200000) as short
LoadWav "File.wav", @MyBuffer(0)
playbuffer @MyBuffer(0),200000