Skip to main content
GameDev.net gamedev.net
🔒 Locked

surface creation: problems with windows 2000

Started by DeMohn Jun 29, 2004 at 9:16 AM 4 replies 350+ views
Original Post
DeMohn
DeMohn
the following code works fine with my system windows xp/dx9b i can use the buffer properly to draw into //Create the Backbuffer ZeroMemory( &ddsd, sizeof(ddsd) ); ddsd.dwSize = sizeof( ddsd ); ddsd.dwFlags = DDSD_CAPS | DDSD_WIDTH | DDSD_HEIGHT; ddsd.ddsCaps.dwCaps = DDSCAPS_OFFSCREENPLAIN | DDSCAPS_3DDEVICE; ddsd.dwWidth = m_ImageWidth; ddsd.dwHeight = m_ImageHeight; hr = m_pDirectDraw->CreateSurface( &ddsd, &m_pddsBackBuffer, NULL ); the same results in DPNERR_INVALIDPARAM on another computer which has installed windows 2000 and dx9b any hint why? thnx DeMohn
tomek_zielinski
tomek_zielinski
DPNERR is DirectPlay error, not DirectDraw, so maybe this piece of code is ok and network module is broke?
www.tmreality.com
tomek_zielinski
tomek_zielinski
But if you wrongly typed DPNERR and it should be DDERR so - maybe its because of old drivers?

It's legacy DDRW/DX7 code sob DX9 has nothing to do with it.
www.tmreality.com
DeMohn
DeMohn
yeah it's definatetly a ddraw error, its the value of hr after that code piece was executed, the error codes probably have the same numeric value

so it's old drivers you guess, thnx for the hint
tomek_zielinski
tomek_zielinski
I dont know exacly

D3DDEVICE has been supported since 1997 or even earlier, and this code seems to be ok, so I don't know what's the problem, and the


oh - maybe the surface is too big?

Some older cards/drivers do not support offscreen surfaces bigger than back buffer surface

www.tmreality.com
DeMohn
DeMohn
the card is a geforce 3 and i now have the 56.72 drivers running (mar 2004)

the error still occurs, so it seems to be something else.
i suppose there is no way to find out which parameter the method doesnt like?

edit: narf - forget it, i just checked that due to some modifications somewhere else, width and height were zero, so it isnt that weird, the method aborts. foolish me.

thnx anyway

DeMohn

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.