Advertisement Jump to content
Sign in to follow this  
gnznroses

DX8 won't initialize under XP

This topic is 4900 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have Direct-X 9 on both my Windows 98 and XP partitions, and I've got two DX8 sprite engines that I'm looking at to see how to upgrade my project from DX7 DirectDraw to DX8. Under XP though, I always get an "automation error" when Direct-X is initialized. Same code, same hardware, but it doesn't work under XP. Any idea what could be wrong? I don't really want to use DX8 even, but I need the ability to rotate my sprites, which DX7 can't do apparently.

Share this post


Link to post
Share on other sites
Advertisement
my guess is that something is misconfigured on XP, do other 3D applications work?

perhaps you don't have proper drivers or perhaps DX isn't installed properly (although I believe DX is installed by default on XP)

Share this post


Link to post
Share on other sites
i ran the tests already, they work fine. and it's the same exact code, so i dunno how the code could be bad. not to mention it's both engines. i can post the code (VB) is it'd help.

Share this post


Link to post
Share on other sites
here's the code



Dim params As D3DPRESENT_PARAMETERS
Dim dp As D3DDISPLAYMODE

'Create Direct3D
Set Direct3D = DirectX.Direct3DCreate

'retrieve the display mode
Direct3D.GetAdapterDisplayMode 0, dp

If bWindowed Then 'If windowed
'Gets render area size
GetWindowRect hwnd, Target
With Target
w = .Right - .Left
h = .bottom - .Top
.Left = 0
.Right = w
.Top = 0
.bottom = h
End With

'Sets up render parameters
With params
.BackBufferFormat = dp.Format
.EnableAutoDepthStencil = 0
.Windowed = 1
.SwapEffect = IIf(bVSync, D3DSWAPEFFECT_COPY_VSYNC, D3DSWAPEFFECT_COPY)
End With
Else 'If fullscreen
'Setup screen size
With Target
Target.Left = 0
Target.Right = w
Target.Top = 0
Target.bottom = h
End With

'Sets up render parameters
With params
.BackBufferFormat = dp.Format
.EnableAutoDepthStencil = 0
.BackBufferWidth = w
.BackBufferHeight = h
.Windowed = 0
.SwapEffect = D3DSWAPEFFECT_FLIP
End With
End If

'Creates device
Set Direct3DDevice = Direct3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,

hwnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, params)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!