i use this code to finally display the renderd image
D3DDevice.Present ByVal 0, ByVal 0, 0, ByVal 0
it worked until now what is wrong with this? it aint working anymore while i only added one .x object, removing this object and other code of it doesnt solve it
NEVER debug your code in fullscreen mode. Add this line to your intialization code:
Code:
D3DWindow.Windowed = 1
You will find your error in about 4 seconds. Again, NEVER, EVER debug code in Fullscreen mode. If it crashes, you are screwed. Every so often, when you are sure it is working, go ahead and run in fullscreen to make sure everything is wrking right, but for the rest of the time, Run in windowed mode.
on what line do i have to add it? because i just get an automation error if at this line :
Set D3DDevice = D3D.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, frmMain.hWnd, D3DCREATE_SOFTWARE_VERTEXPROCESSING, D3DWindow)
in another example i saw they had diffrent ways of initializing if you want to run it windowed :s
Add the line I said before you go to intialize your Device. Make sure that the Adapter format you specify (in your project, it looked like D3DFMT_R5G6B5, which is a 16 bit format. if you are running Windows with 32 bit colors, you need to change the format specified to D3DFMT_X8R8G8B8). It should the initialize correctly, and then you can find your real error =).
ok it was the 32 bit thing that kept me from using a window BUUUUUT.. now i dont have a error anymore and the program runs smooth :S. so please help me allong i get an error i cant handle in full screen and in windowed mode i dont have an error :S cant really find the REAL error than ey?
here it is again, currently trying to move the light (unsucessfull and orientating the car (dx7 did it with .setorientation but cant find it in dx8) anyway try it again maybe you can then find the bug. :S
I dont know what i did but after adding the ability to change the color depth and resolution and windowd and fullscreen, i dont have the error anymore (dunno what i did to fix it but it works) if you can still tell me what the error was i know how i fixed it . the only thing i added with out a real reason was :
VB Code:
If D3D.CheckDeviceFormat(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, DispMode.Format, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, D3DFMT_D16) = D3D_OK Then
D3DWindow.AutoDepthStencilFormat = D3DFMT_D16
Else
D3DWindow.AutoDepthStencilFormat = D3DFMT_D32 '< this line