VOGONS


Software rendering <> DirectDraw

Topic actions

Reply 20 of 34, by Scali

User metadata
Rank l33t
Rank
l33t

They are two different things.
DirectDraw and Direct3D are APIs. More specifically, they are hardware abstraction layers (HALs).
DirectDraw abstracts a simple 2D-oriented video card. Direct3D originally started life as an extension to DirectDraw for video cards that had 3D acceleration features (that means, if you wanted to use Direct3D, you first had to set up a DirectDraw environment, and then query your DirectDraw surface for Direct3D capabilities. So when you were using Direct3D, you were always using DirectDraw as well).
With DirectX 8, DirectDraw was no longer updated, and instead Direct3D became a standalone API.

Software rendering is the process of rendering a screen entirely 'in software', as in: with the CPU.
With a modern OS, you'll need some kind of API to access your display hardware for any kind of rendering, including software rendering.
Traditionally, under Windows you would use DirectDraw for both software rendering and Direct3D (in fact, Direct3D itself also offers software rendering).
However, as mentioned, Direct3D became a standalone API with DirectX 8, so you could write your own software renderer with Direct3D 8 or newer, instead of DirectDraw, if you wanted to.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 21 of 34, by Scali

User metadata
Rank l33t
Rank
l33t
Jo22 wrote on 2023-11-14, 09:50:

That's cool! I didn't know this was possible so early!

It's a trick known as environment mapping, or reflection mapping.
You take a fixed image with a certain projection so that it can encode the environment (your 'environment map'), and by properly calculating the texture coordinates, you can project this environment map as a reflection, or as a lightmap, onto your images.
It's been done in demos since the mid-90s at least, on both DOS and accelerated Amiga machines, such as this demo from 1995: https://www.youtube.com/watch?v=HtXxM0pezAs
They would often use it to fake 'phong' lighting.
The original idea was developed by Jim Blinn in the 70s: https://www.pauldebevec.com/ReflectionMapping/
The result can look very close to per-pixel lighting or even raytracing.
In fact, the famous liquid metal T-1000 robot in the Terminator 2 movie is also environment-mapped, not raytraced, as many people seem to think.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 22 of 34, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

I knew that "dope" demo...it is GUS exclusive and it's also lowres 320x240/200 and yes it has some cool effects but the fukkin-demo looks way better and is one of the
first ddraw-intros that got the look of pixelshader-stuff...the reflection on the liquid surface is the key here.

Retro-Gamer 😀 ...on different machines

Reply 23 of 34, by Scali

User metadata
Rank l33t
Rank
l33t
dr.zeissler wrote on 2023-11-14, 17:11:

I knew that "dope" demo...it is GUS exclusive and it's also lowres 320x240/200 and yes it has some cool effects but the fukkin-demo looks way better and is one of the
first ddraw-intros that got the look of pixelshader-stuff...the reflection on the liquid surface is the key here.

The Funkkin-demo uses the same technique (environment-mapped bumpmapping), and is also lowres.

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 27 of 34, by Scali

User metadata
Rank l33t
Rank
l33t
dr.zeissler wrote on 2023-11-14, 18:02:

overlooked that, thx scali!

The original paper from 1978, where he calls it "Simulation of wrinkled surfaces": https://dl.acm.org/doi/10.1145/800248.507101

http://scalibq.wordpress.com/just-keeping-it- … ro-programming/

Reply 28 of 34, by Geri

User metadata
Rank Member
Rank
Member

OP, You are lost in details.

Software rendering: your software is computing the rendering calculations on a cpu with algorithms running on the cpu. Usually doing this with your own algorithm. Or, sometimes, using an existing implementation of someone else.

Hardware accelerated rendering: the graphics card does the rendering calculations for you, and your program is calling hardware accelerated graphics API implementations to achieve this. You are typically using D3D or OpenGL to do so. There are of course implementations of the D3D and OpenGL api which can use software rendering as well, such as TitaniumGL. Nowadays, Windows 10 also has a built in software renderer for DirectX 12, if someone has no compatible graphics hardware installed).

TitaniumGL the OpenGL to D3D wrapper:
http://users.atw.hu/titaniumgl/index.html

Reply 29 of 34, by The Serpent Rider

User metadata
Rank l33t++
Rank
l33t++
Jo22 wrote on 2023-11-12, 22:50:

DirectDraw is interesting, because it can be used to scale and rotate things (2D stuff).
It's a bit like Mode 7 on the Super Nintendo, I think.
Not sure if it can do parallax scrolling, too, though.

Some games use DirectDraw 2D acceleration, like C&C Tiberian Sun.

I must be some kind of standard: the anonymous gangbanger of the 21st century.

Reply 30 of 34, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

I nevery understood why the did not use hardware-acceleration on tibsun, they did that on dune2k.
With the right (agp) card dune2k scrolls 100% smooth,, I never got tibsun scroll smooth, it always stutters.

Retro-Gamer 😀 ...on different machines

Reply 31 of 34, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

What was new and very interesting was the fact that up to DX7 using D3D always means using ddraw and d3d. I don't want to open the discussion that it is always the best to install the latest dx-version for the OS because I tend to install the DX-Version the card is supported in hardware or only one version higer. there are circumstances that using the very latest dx-version causes issues.

Retro-Gamer 😀 ...on different machines

Reply 32 of 34, by The Serpent Rider

User metadata
Rank l33t++
Rank
l33t++
dr.zeissler wrote on 2023-11-15, 14:51:

I nevery understood why the did not use hardware-acceleration on tibsun, they did that on dune2k.
With the right (agp) card dune2k scrolls 100% smooth,, I never got tibsun scroll smooth, it always stutters.

Tiberian Sun is hardware accelerated, but very buggy, depending on your resolution. It can work absolutely smooth in 800x600, but struggle in 640x480 on some cards.

I must be some kind of standard: the anonymous gangbanger of the 21st century.