BBC BASIC for Windows
« DirectX9 tutorials for BB4W »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:57pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: DirectX9 tutorials for BB4W  (Read 1070 times)
Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx DirectX9 tutorials for BB4W
« Thread started on: Jan 16th, 2010, 04:55am »

I have uploaded a first 10 example programs for DirectX9. They are commented .BBC programs, although the comments get more sparse as the examples progress. So just load it into your IDE and run/read through.

I have uploaded them as a .zip archive to:

http://tech.groups.yahoo.com/group/bb4w/files/Graphics/DIRECTX9/Tutorials/Directx9%20Lessons.zip

They are based on this excellent website :

http://www.directxtutorial.com/ and I will loosely follow

http://www.directxtutorial.com/Tutorial9/B-Direct3DBasics/dx9B.aspx

The idea is to give a fully working BB4W version of the program listed in the tutorial. My comments are BB4W orientated and I would recommend people read the original tutorial first.

You will need three other files for all the examples to work:

First, create a folder called "DirectX9" in your @lib$ folder and put:

http://tech.groups.yahoo.com/group/bb4w/files/Graphics/DIRECTX9/Tutorials/Libraries/D3D9Definitions.bbc

and

http://tech.groups.yahoo.com/group/bb4w/files/Graphics/DIRECTX9/Tutorials/Libraries/D3D9LIB.bbc

and

http://tech.groups.yahoo.com/group/bb4w/files/Libraries/D3DX8BBC.dll

in it.

Now, with the last file (D3DX8BBC.dll) RENAME IT TO D3DX9BBC.dll

Michael.
« Last Edit: Jan 24th, 2010, 09:36am by Michael Hutton » User IP Logged

Colin
Guest
xx Re: DirectX9 tutorials for BB4W
« Reply #1 on: Jan 27th, 2010, 2:44pm »

Michael

In going through your tutorials lessons 7 through 9 only display a blank black window on my computer, lessons 1 through 6 and lesson 10 work correctly. Anything I'm doing wrong?

Colin
User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: DirectX9 tutorials for BB4W
« Reply #2 on: Jan 27th, 2010, 11:43pm »

Hi Colin,


I suspect that the functions from the D3DX9DLL are not being loaded but could you report back?

** Now, with the last file (D3DX8BBC.dll) RENAME IT TO D3DX9BBC.dll ** (and make sure it is in the @lib$/Directx9 folder

Thanks for the report back. I will update and include some more error reporting to check that all the functions are installed properly.

Have you any other comments or critisisms...? I do find I will get something working this end and not think of little things to make life easier for other users. So if you have any suggestions I would value them.

Michael
User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: DirectX9 tutorials for BB4W
« Reply #3 on: Jan 28th, 2010, 08:41am »

Quote:
Now, with the last file (D3DX8BBC.dll) RENAME IT TO D3DX9BBC.dll

No no no no no! Don't do that - D3DX8BBC.DLL is not compatible with DirectX9.

Richard.
User IP Logged

Michael Hutton
Developer

member is offline

Avatar




PM

Gender: Male
Posts: 248
xx Re: DirectX9 tutorials for BB4W
« Reply #4 on: Jan 28th, 2010, 11:15am »

I know, I know. I've just hit CreateTextureFromFileA% where you have to pass the device pointer as the first parameter. The maths functions work but obviously not these functions. I am now dedicating my time to creating the real D3DX9BBC.DLL...

Michael
User IP Logged

Torro
New Member
Image


member is offline

Avatar




PM


Posts: 25
xx Re: DirectX9 tutorials for BB4W
« Reply #5 on: Jul 24th, 2015, 1:17pm »

What is the situation with using directx9 via the BBClibs?

With directx12 on horizon is that going to be quite different?
User IP Logged

rtr2
Guest
xx Re: DirectX9 tutorials for BB4W
« Reply #6 on: Jul 24th, 2015, 2:59pm »

on Jul 24th, 2015, 1:17pm, Torro wrote:
What is the situation with using directx9 via the BBClibs?

The existing D3DLIB library uses DirectX8 rather than DirectX9. There's a particularly important reason for that, which involves the Direct 3D Extensions 'D3DX'. Microsoft permits the distribution of the relevant DirectX8 DLL with applications (supplied as standard with BB4W as D3DX8BBC.DLL) but they do not allow the distribution of the D3DX9 DLL on its own. This makes it almost impossible to support DirectX9 legally from BB4W without shipping a massive MS installer at the same time.

To date, each new version of DirectX has been backwards-compatible with earlier versions, so DirectX8 code (and therefore programs using D3DLIB) still run fine on the latest versions of Windows. If this situation changes, and DirectX8 support is withdrawn by Microsoft, then something would need to be done to maintain D3DLIB functionality.

Of course you can use DirectX9 from BB4W, so long as you avoid the D3DX extensions library entirely, or rely on it already being installed on the target PC (tricky, because there are many versions), or distribute it 'illegally'. Before Michael Hutton 'jumped ship' to PureBasic he wrote a number of DirectX9 applications, proving that it's possible within those restrictions (see earlier posts in this thread).

So, I don't currently have any plans to update D3DLIB but I would be interested to know if there is a demand for this. I haven't investigated whether DirectX versions later than 9 resolve the DLL issue, or make it even more problematic.

Edit: Checking what files are on my PC - d3dx9_32.dll, d3dx10_42.dll and d3dx11_43.dll - those pesky version numbers strongly suggest that the problem is not eased in DirectX 10 or 11. sad

Richard.
« Last Edit: Jul 24th, 2015, 4:17pm by rtr2 » User IP Logged

Torro
New Member
Image


member is offline

Avatar




PM


Posts: 25
xx Re: DirectX9 tutorials for BB4W
« Reply #7 on: Jul 25th, 2015, 05:50am »

Thanks for that.

After reading this it might not be a big deal

http://www.anandtech.com/show/1549/2

User IP Logged

rtr2
Guest
xx Re: DirectX9 tutorials for BB4W
« Reply #8 on: Jul 25th, 2015, 07:12am »

on Jul 25th, 2015, 05:50am, Torro wrote:
After reading this it might not be a big dea

Arguably, the biggest disadvantage of working with DirectX8 rather than DirectX9 is the lack of documentation (other than that supplied with BB4W). Much of what used to be available online seems to have disappeared (I've not tried searching the web archive).

Unfortunately it appears that Michael Hutton has deleted his BB4W DirectX9 tutorial, and its support files, (referred to earlier in this thread) from the Yahoo group. sad

Richard.
User IP Logged

Torro
New Member
Image


member is offline

Avatar




PM


Posts: 25
xx Re: DirectX9 tutorials for BB4W
« Reply #9 on: Jul 25th, 2015, 10:30am »

They were based on http://www.directxtutorial.com/default.aspx

but crucially it requires your DLL wrappers to support it . Are those Dlls opensource?
User IP Logged

rtr2
Guest
xx Re: DirectX9 tutorials for BB4W
« Reply #10 on: Jul 25th, 2015, 4:14pm »

on Jul 25th, 2015, 10:30am, Torro wrote:
They were based on http://www.directxtutorial.com/default.aspx
but crucially it requires your DLL wrappers to support it

See my announcement in the Libraries section.

Richard.
User IP Logged

rtr2
Guest
xx Re: DirectX9 tutorials for BB4W
« Reply #11 on: Jul 26th, 2015, 9:54pm »

on Jul 25th, 2015, 10:30am, Torro wrote:
They were based on http://www.directxtutorial.com/default.aspx

Those tutorials look quite interesting (particularly the DirectX 9 one) although much of the earlier material - what they describe as Direct3D Basics - is covered in the BB4W documentation or the various example programs.

It's the more advanced stuff - like meshes, sprites and HLSL programming - that could be of particular relevance to us, but unfortunately that's only accessible by paying $50 for 'premium membership'!

Richard.



User IP Logged

rtr2
Guest
xx Re: DirectX9 tutorials for BB4W
« Reply #12 on: Jul 27th, 2015, 5:49pm »

on Jul 25th, 2015, 4:14pm, g4bau wrote:
See my announcement in the Libraries section.

Unlike DirectX 8, for which documentation was hard to find, there are many web sites with tutorials and other information on DirectX 9, and most importantly MSDN itself still covers Direct3D 9 in detail.

Specifically, when using the new BB4W libraries, the value returned from FN_init3d() is a pointer to an IDirect3DDevice9 interface. Would it be helpful for me to produce an appropriate BB4W structure declaration for this interface?

Is anybody going to take the bait and write some 3D code?

Richard.
User IP Logged

dfeugey
Guest
xx Re: DirectX9 tutorials for BB4W
« Reply #13 on: Jul 28th, 2015, 06:02am »

I will. But when, it's another question grin
User IP Logged

rtr2
Guest
xx Re: DirectX9 tutorials for BB4W
« Reply #14 on: Jul 28th, 2015, 08:53am »

on Jul 28th, 2015, 06:02am, dfeugey wrote:
I will. But when, it's another question grin

You didn't answer the question about whether a Direct3DDevice9 structure declaration would be useful. It's not a trivial thing to generate (there are an awful lot of methods to include) so I'd like to know that the effort wouldn't be wasted.

Richard.
User IP Logged

Pages: 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls