Direct3D problem

ardman
03-31-2002, 03:02 AM
I have a problem. I'm trying to display a bitmap in a DirectDrawSurface7. The bitmap is 681x481. When I run the code the bitmap is smaller than the actual size.

Do Until bRunning = False

'Clear the device AFTER all the changes to any vertices, and BEFORE
'calling Device.BeginScene and any bltting.
Call Clear_Device

'Begin the scene, must do this after Calling Clear_Device, and before
'calling Blt3D()
Device.BeginScene

'Render the menu screen
BackBuffer.BltFast 0, 0, DDMenu, RECT, DDBLTFAST_NOCOLORKEY

'Call EndScene when finished using D3D routines
Device.EndScene


'Flip the primary surface
Primary.Flip Nothing, DDFLIP_WAIT

'Let windows do its stuff
DoEvents
Loop

Any ideas or am I using the wrong approach?

Squirm
03-31-2002, 05:38 AM
Nothing appears to be wrong with that code. Can we also see the code which creates the surface?

:)

ardman
04-01-2002, 04:40 AM
I have managed to work out what the problem was. I changed the resolution of the picture to 640x480 and it appeared.

The code I'm using is:


Set MenuDD = DD.CreateSurfaceFromFile(App.Path & "\Gfx\Menu.bmp", MenuSD)


Cheers

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum