Backgound image

Started by
5 comments, last by soehrimnir 23 years, 5 months ago
Hello everyone Is it necessary to blit a background image in DirectDraw? Because in my game, I only need a black background. So I actually don''t need to create a black bmp file. I tried not to blit the background image, but then my screen looked really messed up. Is there another way to make your screen look black, without using bitmaps?
Advertisement
Ever here of the clear function?
Try it, it works a treat, though black sounds a bit boring to me.
-Lethe
For heaven''s sake, read the docs.

use Blt().

    DDBLTFX ddbltfx;memset(&ddbltfx, 0, sizeof(ddbltfx));ddblfx.dwSize = sizeof(ddbltfx);ddbltfx.dwFillColor = 0; // black = 0lpDDSBack->Blt(NULL, NULL, NULL, DDBLT_WAIT | DDBLT_COLORFILL, &ddbltfx);    


That fills black.


Please state the nature of the debugging emergency.


sharewaregames.20m.com

Ok, thank you all. Didn''t know of the DDBLT_COLORFILL option.

And I''ll try and read the docs more thoroughly next time.
how does one clear the colour to black in dx8?
in gl its

glClearColor(0,0,0,0);
glClear( GL_COLOR_BUFFER_BIT );

ive heard so many things about dx8 , its become somuch like gl (simple to usde etc ) but have not seen facts so how do u do clear in dx8
i aint flaming (just seeing if its worth while to take a looksy into dx8 or not)


http://members.xoom.com/myBollux
Read the SDK.
If you haven''t got it, then you aren''t allowed to know
quote:Original post by zedzeek

how does one clear the colour to black in dx8?
in gl its

glClearColor(0,0,0,0);
glClear( GL_COLOR_BUFFER_BIT );

ive heard so many things about dx8 , its become somuch like gl (simple to usde etc ) but have not seen facts so how do u do clear in dx8
i aint flaming (just seeing if its worth while to take a looksy into dx8 or not)


http://members.xoom.com/myBollux


DX8 isn''t public yet, and it is not a new version of OpenGL. It is still the good old DirectX, it still uses COM. The new D3DX is looking quite similar to OpenGL, but Direct3D will be using the left handed system for coordinates and will default to counter-clockwise backface culling. It will also most likely not support quads, and from what I know it is still DrawPrimitive based. (Filling in large structures and passing them in one function call). So it will not be OpenGL.


Please state the nature of the debugging emergency.


sharewaregames.20m.com

This topic is closed to new replies.

Advertisement