DirectX 11 on PB

Started by Pfaber11, June 04, 2022, 18:35:12

Previous topic - Next topic

Pfaber11

I have tried using Directx 11 and it really does not like me . It just won't run, or do I have to write my game in DX11 initially to use it ?
I'm using PB 6 beta 8 at the moment . Thanks for reading .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz
HP Desktop AMD 3700 16GB ram 2 GB graphics card windows 10

Coder Apprentice

How do you want to use DX11? What do you want to do? In what way is it not working?

Pfaber11

I just wanted to try it out . It's not really of any consequence that it does not work on my computer but I like to think it would work if it's been made available . When I try to run my program in it  it just crashes straight away. I really hope when PB 6 is released the OpenGL will work pretty much flawlessly and I can leave DX9 in the past . I'm not saying DX9 isn't good it's just that it won't run out of the box on this computer running windows 11 . I am quite pleased with what I've accomplished with DX9 though . And I am glad I took the plunge and purchased PureBasic .
£69 is what I paid at the time and I do think it's awesome and worth the price. As always though try before you buy. Free version available .
Thanks for the reply Kris.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz
HP Desktop AMD 3700 16GB ram 2 GB graphics card windows 10

Steve Elliott

Pfaber11 your graphics card doesn't support DirectX11 so stop blaming Pure BASIC. If you wish to use DirectX11 then you will need to upgrade your system.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Coder Apprentice

Did you try to use it with 3D? You know that neither DX9 nor DX11 is supported for 3D when you use the built in Ogre engine? I'm just trying to understand what you were trying to do and if you really get what it means that Ogre in PureBasic is OpenGL only. When you use the sprite engine alone, without calling Engine3D() then you can switch between DX9 and DX11 or OpenGL(default) for the 2D sprite engine. That is a separate engine/library from the built in Ogre3D. But when you use Engine3D() that automatically means that you can only use the 2D sprite engine in it's default OpenGL mode. So, when using Engine3D() don't type directx9 or directx11 in the compiler/subsystem field...

It seems your intel UHD GPU is DX12 compatible...if this is what you have:

https://ark.intel.com/content/www/us/en/ark/products/196588/intel-core-i31005g1-processor-4m-cache-up-to-3-40-ghz.html

Pfaber11

Oh right I've just made my first .exe and it works . This is with PB6 and beta 9 that I downloaded yesterday. Now I thought it was using DX9 but if you are right that is very cool . Gonna go and see what subsystems are available in beta 9.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz
HP Desktop AMD 3700 16GB ram 2 GB graphics card windows 10

Pfaber11

Right just checked the beta 9 and it only has dx9 dx11 and c as available subsystems so I think you'll find DX9 is being used for 3d graphics.
As far as it goes as to what I want to use it for at the moment I'm just experimenting with that PB will do before I start on my next game .
Finding my feet as it were. Really pleased PB6 is now producing exe's . Thanks for the tips though Kris you helped me out a lot recently with the renderworld flipbuffers thing as to where I need to place my sprites to be rendered.
Have a nice day.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz
HP Desktop AMD 3700 16GB ram 2 GB graphics card windows 10

Pfaber11

Hi steve my computer has dx12 so surely it would work with dx11. I'm not knocking PB I'm just saying when I try to use dx11 it does not work the same as dx9. PB 6 does not include OpenGL at the moment and I know this as I just looked.
Have an excellent day.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz
HP Desktop AMD 3700 16GB ram 2 GB graphics card windows 10

Coder Apprentice

#8
Quote from: Pfaber11 on June 06, 2022, 09:37:44
Right just checked the beta 9 and it only has dx9 dx11 and c as available subsystems so I think you'll find DX9 is being used for 3d graphics.

No. OpenGL is not a subsystem in PureBasic anymore but you can think about it as a main system both Engine3D(), and the 2D sprite engine defaults to. Before PB v6 OpenGL was a subsystem and both 3D Ogre and the 2D sprite engine used directx by default. In PureBasic v6 dx9 and dx11 is there only for the 2D sprite engine when you use it by itself without calling Engine3D().

From the help file of beta 9:

DirectX9: use DirectX 9 instead of OpenGL. Affected libraries:
          - Sprite
          - Screen
          - Note: 3D engine no more available as it uses OpenGL

  DirectX11: use DirectX 11 instead of OpenGL. Affected libraries:
          - Sprite
          - Screen
          - Note: 3D engine no more available as it uses OpenGL

Pfaber11

I see what you are saying Kris but I am rendering an entity and using Engine3D.dll with no problems. I think OpenGL is being worked on and will be the default for PB6 in the near future and DX9 will be no more once this is ready to be used .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz
HP Desktop AMD 3700 16GB ram 2 GB graphics card windows 10

Coder Apprentice

#10
Quote from: Pfaber11 on June 06, 2022, 10:55:01
I see what you are saying Kris but I am rendering an entity and using Engine3D.dll with no problems. I think OpenGL is being worked on and will be the default for PB6 in the near future and DX9 will be no more once this is ready to be used .

The Engine3d.dll is a collection of selected Ogre3D and other functions that the PureBasic team chose to use. Since Beta 6 it only uses OpenGL functions of the Ogre3D engine.

Fred:
- Beta 6 is out !
...
Change log:
...
- Changed: the default subsystem for screen/sprite is now OpenGL on Windows for more consistency. DirectX9 is still  available as a subsystem.
- Changed: OGRE only supports OpenGL now, which ease the porting to Linux/OSX and allow to focus on only GLSL for shaders

Pfaber11

Well I suppose it doesn't matter too much either way . My demos are working fine with what ever is under the hood . I'm not gonna start a new project until PB 6 is fully operational and I hope that is sooner rather than later . In the last six weeks it has gone from beta 6 to beta 9 and I am not going to go back to 5.73 any time soon.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz
HP Desktop AMD 3700 16GB ram 2 GB graphics card windows 10

Pfaber11

#12
Well Kris this is a swine but you are right it's using OpenGL and if this is it I'm very happy . When I bought PB it was pretty much because of the fact that it was being modernized. OpenGL is not in the subsystem folder but there we are it still works great. I think as far as I know DX11 is going to do the 2D stuff . This is my 3rd outing with PB and unlike the other attempts six weeks in and I'm actually liking it and feel at home using it although I still have a lot to learn .
     If I get a decent  idea in the next couple of weeks I'm going to make a start on a new project. I'm really hoping that this will be it for a few years as  I really don't want to learn another one. Just added it up and on languages I have spent £126 in four years which for all the knowledge and skills I have gained is a bargain . I am no expert and probably never will be but I am doing ok and can put a few lines of code together to make some ok games. Enjoy your evening.   

HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz
HP Desktop AMD 3700 16GB ram 2 GB graphics card windows 10