SyntaxBomb - Indie Coders

Languages & Coding => PureBasic => Topic started by: Pfaber11 on November 06, 2019, 02:38:10

Title: PureBasic and Directx
Post by: Pfaber11 on November 06, 2019, 02:38:10
Was thinking that maybe the way to go is to distribute the correct Directx files with my programs for windows 10. Got many files of Directx and was wondering if anybody Knows what files I need to include . Thanks for reading .bonjour and happy coding.
Title: Re: PureBasic and Directx
Post by: col on November 06, 2019, 04:57:24
Hiya,

The version of DirectX that you are using will have a redistributable executable that will contain and correctly install the required runtime for that version. It's better to distribute and run that DirectX installer during installation of your game/app.
Title: Re: PureBasic and Directx
Post by: Pfaber11 on November 06, 2019, 18:22:21
I think I have the right file it's in the help files for PureBasic. Will try it out when I get the chance to this evening. If it works I'll  include it with my apps.

Title: Re: PureBasic and Directx
Post by: Pfaber11 on November 06, 2019, 22:26:03
well I got my program written on my laptop to run on my desktop . Turns out it was the resolution that was wrong . I've been using openscreen() at a resolution of 1366x768 to write my apps on my laptop and this was not compatible with my desktop . As soon as I changed the resolution in the program to that of the desktop it worked fine . Anyway now I need to find a way of the program setting it's own resolution to match the screen it's  being run on .  Thought I would use screenwidth() screenheight() but these commands can only be used after the screen has been opened . I think I've got the right idea but if anybody knows how to do this your input would be welcome . Thanks for reading . Happy coding .
Title: Re: PureBasic and Directx
Post by: Pfaber11 on November 06, 2019, 23:07:10
I've nailed the problem I had with the screen resolution. Examinedesktop() , openscreen(desktopwidth(0),desktopheight(0),32)
Now it runs on any resolution. Really cool .
Title: Re: PureBasic and Directx
Post by: GaborD on November 06, 2019, 23:18:07
Great that you solved it.
It's one of these "small" issues that actually have a great impact on the user experience.
Title: Re: PureBasic and Directx
Post by: Pfaber11 on November 06, 2019, 23:23:17
Well I've had nearly a month with PureBasic now and I will definitely be sticking with it. Yes I've had my fair share of problems but have managed to overcome them . Even on my cheap laptop with what I'm doing so far using 3d I'm easily getting 60 fps . I consider this language to be excellent and I am content with what it can do . I can't say that for many languages I've tried . It's a shame it isn't free like some but I think it is worth the 79 euros for a lifetime of upgrades . Happy coding.
Title: Re: PureBasic and Directx
Post by: Pfaber11 on November 06, 2019, 23:29:48
Yes it may be a small problem to of overcome but something very useful to know. I'm really at the stage now where I'm ready to start on a real project . I've learnt a hell of a lot in the past 4 weeks and unlike python feel I've made the right choice. I'm gonna post stuff on here when I get a problem and explain how I've overcome them . Happy coding .