DirectX 11/OpenGL 4 Support

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

DirectX 11/OpenGL 4 Support

Post 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.
User avatar
STARGÅTE
Addict
Addict
Posts: 2227
Joined: Thu Jan 10, 2008 1:30 pm
Location: Germany, Glienicke
Contact:

Re: DirectX 11/OpenGL 4 Support

Post by STARGÅTE »

DirectX11 is supported as sub system.
You can enter it into the compiler settings.
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and moreTypeface - Sprite-based font include/module
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: DirectX 11/OpenGL 4 Support

Post by Steve Elliott2 »

So you type DirectX 11 into the Library Subsystem box??
infratec
Always Here
Always Here
Posts: 7588
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: DirectX 11/OpenGL 4 Support

Post by infratec »

directx11
Bernd
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: DirectX 11/OpenGL 4 Support

Post 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).
Last edited by Steve Elliott2 on Sat Jul 04, 2015 3:54 pm, edited 2 times in total.
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: DirectX 11/OpenGL 4 Support

Post 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.
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: DirectX 11/OpenGL 4 Support

Post 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.
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: DirectX 11/OpenGL 4 Support

Post 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.
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: DirectX 11/OpenGL 4 Support

Post by Steve Elliott2 »

Different route? So Pure has other 3D possibilities?
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: DirectX 11/OpenGL 4 Support

Post 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).
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: DirectX 11/OpenGL 4 Support

Post 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 :)
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: DirectX 11/OpenGL 4 Support

Post by Steve Elliott2 »

Could you post a small code snippet to demonstrate how you set up OpenGL in Pure BASIC?
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: DirectX 11/OpenGL 4 Support

Post by Samuel »

I sent you a PM with an example.
Steve Elliott2
User
User
Posts: 42
Joined: Sat Jun 20, 2015 1:47 pm

Re: DirectX 11/OpenGL 4 Support

Post 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
Post Reply