Forum Index | FAQ | New User | Login | Search

Make a New PostPrevious ThreadView All ThreadsNext ThreadShow in Flat Mode*


SubjectRe: Drawing graphics Reply to this message
Posted byBart T.
Posted on03/29/04 00:30 AM



> 1) Which is preferred for displaying the graphics when using the DirectX API?
> DirectDraw or Direct3D? I'm asking because Direct3D doesn't really seem suited
> for direct pixel manipulation which I believe is whats needed for drawing the
> screen.

If you're more comfortable with DDraw, use that. It should perform quite well. To use Direct3D, you'll have to render to textures and display those with an orthogonal projection.

> 3) If drawing the screen using scanlines is the preferred method, what's the
> fastest way to achieve this. I'd hate to lock and unlock the back buffer many
> times as the scanline is drawn. This would be way to slow in Direct3D or
> DirectDraw. Am I better off drawing the scanlines in a temporary array (virtual
> screen) and then paint it to the screen at once? What's the best approach to
> this.

Drawing at least a scanline at a time is the way to go.

As for where to draw to, use a backbuffer and then flip buffers each frame. DDraw has direct support for this IIRC. It's probably the fastest way of doing it.

> 4) And what about the 8 sprites the C64 supports. Is this a matter of just
> making PC sprites that mimic the C64's sprites.

The PC doesn't have sprites. Your rendering code will have to render them properly into the current scanline. You'll have to determine which sprites are visible on a given scanline and then figure out which line of each sprite to draw. I'll guess the C64 also has priorities and various attributes you'll have to account for.




----
Bart

-
Entire Thread
Subject  Posted byPosted On
*Drawing graphics  GeSUB03/29/04 00:15 AM
.*Can't believe nobody's said SDL *nt* SDL pwns u  MooglyGuy04/06/04 09:26 AM
.*Re: Drawing graphics  Jan_Klaassen04/02/04 11:51 AM
.*Re: Drawing graphics  GeSUB03/29/04 04:33 PM
.*Re: Drawing graphics  finaldave03/29/04 08:06 AM
.*Re: Drawing graphics  galibert03/29/04 06:07 AM
..*Re: Drawing graphics  R. Belmont03/31/04 10:44 PM
...*Re: Drawing graphics  smf04/07/04 07:12 AM
..Re: Drawing graphics  Bart T.03/29/04 00:30 AM