Page 1 of 1

DirectX 11/OpenGL 4 Support

Posted: Mon Jun 22, 2015 5:17 pm
by Steve Elliott2
As far as I can see Pure BASIC Doesn't support the latest versions of DirectX or OpenGL features.

This means it's great for backward compatibility, but as each new operating system appears, the current Pure BASIC engine is less efficient on those new Operating Systems.

Re: DirectX 11/OpenGL 4 Support

Posted: Mon Jun 22, 2015 5:47 pm
by STARGĂ…TE
DirectX11 is supported as sub system.
You can enter it into the compiler settings.

Re: DirectX 11/OpenGL 4 Support

Posted: Mon Jun 22, 2015 6:06 pm
by Steve Elliott2
So you type DirectX 11 into the Library Subsystem box??

Re: DirectX 11/OpenGL 4 Support

Posted: Mon Jun 22, 2015 7:12 pm
by infratec
directx11
Bernd

Re: DirectX 11/OpenGL 4 Support

Posted: Mon Jun 22, 2015 7:29 pm
by Steve Elliott2
Thanks guys! It seems Pure BASIC has hidden depths...A drop down menu might be an idea there!

[Edit]
DirectX 11 is actually slower by some margin. I've seen this from other systems too.

My game runs at 2850 FPS in DirectX 9 and 1988 in DirectX11 (slower by 862 FPS).

Re: DirectX 11/OpenGL 4 Support

Posted: Mon Jun 22, 2015 8:26 pm
by Samuel
Not sure what you're planning on using DirectX 11 for, but just a heads up that it's only for the 2D side of Purebasic.
For the 3D side you're limited to DirectX 9.0c and OpenGL 2.1.

Newer versions of Ogre have DirectX 11 and OpenGL 3.x/4.x render systems, but I'm not sure when Purebasic will be updated with it, if at all.

Re: DirectX 11/OpenGL 4 Support

Posted: Mon Jun 22, 2015 8:32 pm
by Steve Elliott2
It's just that Windows throws old systems into the 'emulation bin'. So things run slower. Well that's good for me because I love 2D :D

Hmm, now that *is* a request. I aim to do some 3D work in Pure too. I hope the 3D side gets updated too.

Re: DirectX 11/OpenGL 4 Support

Posted: Mon Jun 22, 2015 9:11 pm
by Samuel
I'm sure it will be added to Purebasic but Ogre 2.1 (which has those features) isn't at a stable release yet.
I think Fred and Comtois probably don't want to add it until it's stable.

I personally didn't want to wait so I went a different route for 3D features in Purebasic, but I still plan on using Ogre 2.1 once it's been implemented into Purebasic.

Re: DirectX 11/OpenGL 4 Support

Posted: Mon Jun 22, 2015 10:42 pm
by Steve Elliott2
Different route? So Pure has other 3D possibilities?

Re: DirectX 11/OpenGL 4 Support

Posted: Mon Jun 22, 2015 11:50 pm
by Samuel
There are a couple different ways to handle 3D in Purebasic, but the native Ogre is the easiest in my opinion.
Purebasic also has the OpenGLGadget which is an easy way to allow OpenGL functions without the hassle of context creation. It does have some limitations like not allowing you to choose the context, but I hope that will be fixed in the future.

I'm personally working on my own gaming engine which supports OpenGL 3.3 and up. It's a bit more complex because of everything involved with it. But to me it has more advantages then the native choice because I don't have to wait for bug updates and I'm able to add new features on the fly.

Excluding Purebasic's native engine, and creating your own. You can use a preexisting engine like MPZ's MP3D, but I believe it too only supports DirectX 9.
There is also the UnionBytes Engine being developed by Artus and Stargate (which looks promising), but there hasn't been any progress updates made on it recently.

In time I might also put my engine out there as an alternative, but I feel it's still too soon to consider doing that. I haven't been able to develop it much this last month and there are still too many features missing (physics, sound, world editor, name, and a couple others things).

Re: DirectX 11/OpenGL 4 Support

Posted: Tue Jun 23, 2015 10:09 am
by Steve Elliott2
Purebasic also has the OpenGLGadget which is an easy way to allow OpenGL functions without the hassle of context creation.
I'm personally working on my own gaming engine which supports OpenGL 3.3 and up.
Now that is encouraging :)

Re: DirectX 11/OpenGL 4 Support

Posted: Tue Jun 23, 2015 10:54 am
by Steve Elliott2
Could you post a small code snippet to demonstrate how you set up OpenGL in Pure BASIC?

Re: DirectX 11/OpenGL 4 Support

Posted: Tue Jun 23, 2015 6:09 pm
by Samuel
I sent you a PM with an example.

Re: DirectX 11/OpenGL 4 Support

Posted: Tue Jun 23, 2015 6:24 pm
by Steve Elliott2
Much appreciated Samuel. Pure BASIC really does seem to have a very strong core, with the ability to add new features to that core. :D