|
-
Feb 14th, 2001, 07:30 AM
#1
Thread Starter
Member
-
Feb 14th, 2001, 07:36 AM
#2
Retired VBF Adm1nistrator
Something along the following lines ...
Code:
Set g_D3DDevice = g_D3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, d3dpp)
Set g_D3DDevice = g_D3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, d3dpp)
Im not an expert on DirectX, but I know that in the code you can tell it whether to use Software or Hardware Rendering etc.
- jamie
Microsoft MVP : Visual Developer - Visual Basic [2004-2005]
-
Feb 14th, 2001, 08:40 AM
#3
Frenzied Member
Generally you don't have to tell it to, DirectX will allow you to either access the hardware acceleration through the HAL (Hardware Abstraction Layer) or, if what you're doing isn't available in hardware, it will arrange for it to be done in software for you in the HEL (Hardware Emulation Layer).
It's all a very sensible idea. There are a few things that are supported in the HAL only, in most cases because they are just too slow in software. An example is bitmap rotation. This is supported in the HAL, but MS found however well they wrote the code in software, it was far too slow, so if you want to do it you have to either hope the hardware allows it (which is rare at the moment) or write your own software rotation routine.
You can check the capabilities of the system at run-time anyway, and adjust your program accordingly. In C you would probably use function pointers or polymorphism to achieve this, but in VB I think you'd have to either have a lot of Select Case and If statements, which slows things down a little (not much) or use CallByName. Not sure how fast that is.
Harry.
"From one thing, know ten thousand things."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|