Skip to main content
gamedev.net
🔒 Locked

DX surface problems

Started by russian-bear 1 reply 150+ views
Original Post
russian-bear
russian-bear
Hi! Im having some trouble loading an image file and display it as background. When i call: hr = D3DXLoadSurfaceFromFile( g_pBackground, NULL, NULL, "back.tga", NULL, D3DX_FILTER_NONE, 0, NULL ); I get D3DERR_INVALIDCALL error. What em i doing wrong? My idea is to use that function to load a image into a surface and copy it to the backbuffer using CopyRects(). Em i using the wrong functions? Is trere a better way to display backround images and splashscreens.
< There are no stupid questions, only stupid answers! >
russian-bear
russian-bear
Another posibility is to display a textured quad as a background. Do you think it is faster?

p.s. its a 2d game .....

< There are no stupid questions, only stupid answers! >

Topic Locked

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

Sign in to reply to this topic.