Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / D3D & DDraw problems Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
NuFAN

May 21, 1999, 08:14 PM

Hiyaz,
I've got some questions about using DirectDraw and D3D IM together. I'm still coding a RTS-game
and the AI works fine, but now I've to do the gfx-stuff and I'm a bad gfx-coder.

So, I use D3D to create the background, just some TLVERTEX polygons with some nice colors. That
works without problems, but, if I use DirectDraw to load the buildings (simple DIBs) to the
surface, sometimes I see all bitmaps, sometimes a few and sometimes no bitmaps. I heard that
I should do the D3D stuff first, then calculate anything needed in the game and do the DDraw
stuff at last. But the problem's still the same.

Does anyone know the reason ? Or some examples how to do it in a better way ?

CU !

 
Kurt Miller

May 22, 1999, 12:15 AM



NuFAN wrote:
>>So, I use D3D to create the background, just some TLVERTEX polygons with some nice colors. That
>>works without problems, but, if I use DirectDraw to load the buildings (simple DIBs) to the
>>surface, sometimes I see all bitmaps, sometimes a few and sometimes no bitmaps.

>>Does anyone know the reason ? Or some examples how to do it in a better way ?

Have you considered creating textures using those building bitmaps and then just letting
d3d do the drawing work for you? You said you're using TLVERTEX, so you can elect to create
a 'rectangle', or two triangles, set up your texture coordinates and colors, then
send them off to DrawPrimitive. You mentioned you're using D3D to do the background, so
why not use it for your 2D buildings as well? This way you can also do some nice and fast
special effects too if you wish; though I don't know how useful they'll be for buildings ;]

Just a suggestion...

-Kurt Miller (Psykic)


 
NuFAN

May 22, 1999, 09:35 AM



Kurt Miller wrote:
>>
>>
>>NuFAN wrote:
>>>>So, I use D3D to create the background, just some TLVERTEX polygons with some nice colors. That
>>>>works without problems, but, if I use DirectDraw to load the buildings (simple DIBs) to the
>>>>surface, sometimes I see all bitmaps, sometimes a few and sometimes no bitmaps.
>>
>>>>Does anyone know the reason ? Or some examples how to do it in a better way ?
>>
>>Have you considered creating textures using those building bitmaps and then just letting
>>d3d do the drawing work for you? You said you're using TLVERTEX, so you can elect to create
>>a 'rectangle', or two triangles, set up your texture coordinates and colors, then
>>send them off to DrawPrimitive. You mentioned you're using D3D to do the background, so
>>why not use it for your 2D buildings as well? This way you can also do some nice and fast
>>special effects too if you wish; though I don't know how useful they'll be for buildings ;]
>>
>>Just a suggestion...
>>
>>-Kurt Miller (Psykic)
>>
>>

 
NuFAN

May 22, 1999, 02:29 PM

Or do you know a free engine for doing this kind of 3D ? I don't need something complex like
genesis3d. Just some simple routines.

CU

 
This thread contains 4 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.