Author |
Topic: DirectX9 tutorials for BB4W (Read 1074 times) |
|
rtr2
Guest
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #27 on: Jul 29th, 2015, 10:02am » |
|
on Jul 29th, 2015, 08:18am, Michael Hutton wrote:| I've done all the hard work |
|
Hard work? I wrote a little program to scan D3D9.H and create the BB4W structure declarations automatically, so there theoretically shouldn't be any errors! I've uploaded the full file D3D9DECL.BBC to the Yahoo group here:
https://groups.yahoo.com/neo/groups/bb4w/files/Graphics/
It can also be downloaded from this direct link.
I wonder if it would be helpful to incorporate some other declarations, such as IID values and maybe constants. Any thoughts?
Richard.
|
|
Logged
|
|
|
|
Torro
New Member
member is offline


Posts: 25
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #28 on: Jul 29th, 2015, 11:52am » |
|
cool so this can be done for directx12?
|
| « Last Edit: Jul 29th, 2015, 11:53am by Torro » |
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #29 on: Jul 29th, 2015, 12:40pm » |
|
on Jul 29th, 2015, 11:52am, Torro wrote:| cool so this can be done for directx12? |
|
I haven't looked into it. Generally speaking I'm not very interested in technologies that work only on recent versions of Windows. Because BB4W runs fine on Windows XP (and earlier) - and indeed that's still what my main development PC has - I try to ensure that libraries do too. Also, the 'user demographic' probably suggests that the average BBC BASIC programmer doesn't own a Windows 8 PC!
But since BB4W can do (virtually) anything any other language can - if sometimes rather more slowly! - I assume that interfacing with DirectX 12 should be entirely possible.
Richard.
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #30 on: Jul 29th, 2015, 8:46pm » |
|
on Jul 29th, 2015, 10:02am, g4bau wrote:Hard work? I wrote a little program to scan D3D9.H and create the BB4W structure declarations automatically, so there theoretically shouldn't be any errors! I've uploaded the full file D3D9DECL.BBC to the Yahoo group here:
... snip ...
I wonder if it would be helpful to incorporate some other declarations, such as IID values and maybe constants. Any thoughts?
Richard.
|
|
"some hard work" - I note that you said it wouldn't be trivial a few posts ago. What has changed?
I think I did the same thing a few years ago. My definitions file has a lot of the constants defined. I think also there were some functions as well, so not so good for a CALL. I do have to install BB4W on this computer before I can update you with any more of what I did those years ago.
I'll try to update. Michael
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #31 on: Jul 29th, 2015, 8:50pm » |
|
on Jul 29th, 2015, 11:52am, Torro wrote:| cool so this can be done for directx12? |
|
Yes, it can. The caveat being that setting up DirectX10/11/12 is different from 9 and below. I only have a 'starter file', basically getting a device going but in theory it is vastly more powerful. What is a major difference is the use of HLSL or 'effect' '.fx' files to control the shaders which make access to DirectCompute and the higher level shaders easier. It is a bit of a stepping stone though and not lightly undertaken.
Michael
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #32 on: Jul 29th, 2015, 9:45pm » |
|
on Jul 29th, 2015, 8:46pm, Michael Hutton wrote:| I think I did the same thing a few years ago. |
|
The thing is, we are trying to make a fresh start. What you did that long time ago was impressive in many ways, but your programs never worked on my (or several other people's) PCs because of their reliance on D3DX9, with all that entailed. Perhaps understandably - since the programs ran perfectly on your own machine - you never seemed particularly committed to resolving that issue.
As you are probably aware, the way the new D3D9LIB (and the original D3DLIB) are made independent of D3DX is by coding equivalent functions directly in BASIC (made easier and faster by using BB4W's array operators and arithmetic). Whilst that only provides 'simple' solutions for the maths functions in D3DX, it shows one way towards the ultimate goal of writing more complex 3D programs that will work on any modern PC.
So, from my perspective, I don't want to go back to where DirectX9 support in BB4W was when you jumped ship to PureBasic (and deleted all your Direct3D utilities and tutorials from Yahoo). I would rather start with D3D9LIB, which for the first time has made it possible to run simple Direct3D9 programs in BB4W on my own PC. Hopefully we can develop that approach further, perhaps with guidance from the 'Living without D3DX' blog site to which I linked.
Richard.
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #33 on: Jul 29th, 2015, 10:04pm » |
|
on Jul 29th, 2015, 9:45pm, g4bau wrote: - you never seemed particularly committed to resolving that issue. |
|
I'm really not going to reinvent the wheel by recoding DirectX9 or whatever for BB4W! There is a vast resource out there and all one needs to do is download DirectX9 or whatever version they want. I did add some functions which are missing from the dll which were defined in inline files but really, the idea of recoding DirectX9 to BB4W functions is rather ludicrous, even more so when there are multiple updates of DirectX by a team of professional coders!
If you manage to do it. Well done, but I'm not even going to bother. I have way too many other things to do. I have uploaded the tutorials I made. If they are there for people to look at and change at their will. Good luck with the 'fresh start'!
..and yes, I did delete the lessons when I 'jumped ship'(!) but I understand you had 'ran away' to Liberty Basic also... 'pot and kettle' I am afraid RTR.
Before casting stones..... oh, but it all starts again. 
Michael
|
|
|
|
rtr2
Guest
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #34 on: Jul 29th, 2015, 11:06pm » |
|
on Jul 29th, 2015, 10:04pm, Michael Hutton wrote:| There is a vast resource out there and all one needs to do is download DirectX9 or whatever version they want. |
|
DirectX (8, 9 and typically later versions) comes pre-installed with all recent versions of Windows, it is not necessary to download anything. However the Direct3D extensions (D3DX), which are what are under discussion here, are neither pre-installed with Windows nor (legally at least - post D3DX8) downloadable from anywhere as a DLL.
The only legitimate way to make a D3DX DLL available to an end-user is to ship a massive Microsoft installer with your application, which makes no sense for a BB4W app.
Quote:| the idea of recoding DirectX9 to BB4W functions is rather ludicrous, even more so when there are multiple updates of DirectX by a team of professional coders! |
|
You are muddling DirectX with the Direct 3D Extensions (D3DX). It is perfectly sensible to consider alternatives to D3DX, indeed the blog page I linked to previously explains why D3DX is deprecated (scroll down to Background at the end of the article). The solutions may involve BASIC code (which contrary to your claim is perfectly reasonable for the maths functions at least), other DLLs or open-source tools.
Quote:| ..and yes, I did delete the lessons when I 'jumped ship'(!) but I understand you had 'ran away' to Liberty Basic also... 'pot and kettle' I am afraid RTR. |
|
At no point did my 'absence' from the BB4W scene result in any of the support materials being deleted. After all I continued to market BB4W throughout that period so was both morally and legally obliged to provide ongoing support.
Richard.
|
| « Last Edit: Jul 30th, 2015, 06:36am by rtr2 » |
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #35 on: Jul 30th, 2015, 09:29am » |
|
on Jul 29th, 2015, 11:52am, Torro wrote:| cool so this can be done for directx12? |
|
Further to Michael's reply, see this page (it's referring to migrating from Direct3D 9 to Direct3D 11, but the issues are no doubt similar):
https://msdn.microsoft.com/en-us/library/windows/desktop/ff476190.aspx#direct3d_9_to_direct3d_11
Although it removes the dependency on D3DX, a D3DCompiler DLL (which is not installed with Windows earlier than 8.1) is still required. In the comments at the bottom of this page the issue of whether it is legal to distribute that DLL is discussed (with not a very clear answer):
http://blogs.msdn.com/b/chuckw/archive/2012/05/07/hlsl-fxc-and-d3dcompile.aspx
However it states there that "The latest version of the D3DCompiler (#47) is now included with the Windows 8.1 OS" so we are off the hook for that OS version at least (I don't know about Windows 10).
As it also states in that article, if the only reason you need a D3DX (or D3DCompiler) DLL on the target machine is to compile the shader(s), then a good solution is to pre-compile them to binary shader files and (legitimately) ship those with your application.
Richard.
|
| « Last Edit: Jul 30th, 2015, 09:43am by rtr2 » |
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #36 on: Jul 30th, 2015, 12:39pm » |
|
I can confirm that the Direct3D examples supplied with BB4W (TEAPOT.BBC, PYRAMID.BBC, WORLD.BBC), and LIGHTING.BBC from the website - oh, and BBCOWL too - all work perfectly in Windows 10 (64-bit, although that shouldn't matter). This is as expected, but it's nice to know that Direct3D 8 remains supported on the newest (and last, if we are to believe Microsoft) Windows platform.
Richard.
|
| « Last Edit: Jul 30th, 2015, 1:32pm by rtr2 » |
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #37 on: Jul 30th, 2015, 2:58pm » |
|
on Jul 30th, 2015, 2:29pm, Torro wrote:| You would not believe how many banks Ive seen still running XP for mission critical apps because they are tied to ie61 |
|
Nothing particularly wrong with that, so long as they pay Microsoft enough to keep security updates coming (and if that's cheaper/safer than updating the banks' systems everybody is happy!).
Richard.
|
|
Logged
|
|
|
|
rtr2
Guest
|
 |
Re: DirectX9 tutorials for BB4W
« Reply #38 on: Jul 30th, 2015, 3:04pm » |
|
on Jul 30th, 2015, 2:25pm, Torro wrote:| Thats the point certain Commercial games only worked with the latest Windows you couldnt run them or install say dx10 on Xp . Windows 10 has Windows 10 only games . Same with browsers. |
|
I strive to ensure all my BBC BASIC programs run on every version of Windows from 2000, through XP, Vista, 7, 8 and 8.1, to Windows 10. If that means not using the very latest technology, the impact on the appearance or performance of the final program is usually insignificant.
Richard.
|
| « Last Edit: Jul 30th, 2015, 5:51pm by rtr2 » |
Logged
|
|
|
|
|