VOGONS


Software rendering <> DirectDraw

Topic actions

First post, by Kordanor

User metadata
Rank Member
Rank
Member

Hey there,

I already read the thread over here but didnt want to necro it:
Re: DirectDraw=software rendering only? Direct3D=hardware rendering only?

I just wanted to check and clarify if I understood everything correctly:

Software Rendering is a more "general term", basically meaning that no 3D hardware acceleration from the Hardware is used. Little or no Resources from the Graphics card are used. The majority of the work is done via the CPU.
DirectDraw is an API made for 2D rendering, which does access Graphics Card Resources like VRAM. DirectDraw can be "abused" for 3D rendering. However no 3D Hardware acceleration is used.

So you could say that DirectDraw is a "way" to do Software rendering (in Windows).

Did I understand that correctly?
My follow up question is then, how much influence CPU / Graphics card has (WITHOUT 3D features).
So lets say that your game stutters quite a bit in Software rendering (lets say some Dos Game like Screamer), and on the opposite side, you have a heavily stuttering game in DirectDraw on Windows.
What woud happen to each case if you throw 5 times the CPU power at it. And what happens if you use 5 times the power of the graphics card (more VRAM and whatever can influence speed on DirectDraw). Or what happens at the opposite if you reduce the power of the graphics card and use an old ISA card for DirectDraw?
I explicitly want to remove Direct3D and newer tech from the discussion and stay at older tech.

Could you generalize that "Software Rendering (Direct Draw or other) is mostly CPU based as long as you have decent Graphics Card for 2D Operations"?

Reply 1 of 34, by BloodyCactus

User metadata
Rank Oldbie
Rank
Oldbie

direct draw is a 2d api that has hardware acceleration.
direct 3d is an api that also has hardware acceleration.

it depends how narrow you want define "software rendering", or the term "render". you can many many things.

if my pixel to plot is already in vram and i just tell it to copy to another place in vram, am I software rendering?? blitting from vram to vram insanely fast, because its memory is local to itself and requires no bus transfers... but then is that considered hardware accelerated or software rendered?

any api that has a "plot pixel" approximation, can be abused for "software rendering"

you can have a 1 pixel sized triangle and plot them using 3d api.. is that software rendering?

lots of 3d games are cpu bound. 5x'ing the cpu, pretty much everything will benefit right?

--/\-[ Stu : Bloody Cactus :: [ https://bloodycactus.com :: http://kråketær.com ]-/\--

Reply 2 of 34, by eddman

User metadata
Rank Member
Rank
Member
Kordanor wrote on 2023-09-26, 13:42:

Software Rendering is a more "general term", basically meaning that no 3D hardware acceleration from the Hardware is used. Little or no Resources from the Graphics card are used. The majority of the work is done via the CPU.

Who said it only applies to 3D? 2D can also be hardware accelerated, meaning the video processor does part of the work; don't know how much though. That's what DirectDraw was for.
With older DirectX versions, you can even run dxdiag and disable acceleration for DirectDraw, if you want to do comparisons. IINM the last version that had the option was DirectX 8.0a.

Kordanor wrote on 2023-09-26, 13:42:

DirectDraw DirectDraw can be "abused" for 3D rendering. However no 3D Hardware acceleration is used.

DirectDraw is not "abused" for 3D. It's Direct3D that does the 3D. For DirectX up to version 7, Direct3D alone cannot do the entire work process. It handles the 3D rendering, however, for final presentation, DirectDraw needs to be used. The following files are involved for 3D rendering:

DirectX 2-6: d3dim.dll + ddraw.dll
DirectX 7: d3dim700.dll + ddraw.dll

Note that newer DirectX versions still include the old files. A game coded to use, say, Direct3D 6, would still call d3dim.dll, even if a newer DirectX is installed.

Starting with Direct3D 8, all the API interfaces are included in the d3d*.dll file itself; ddraw is no longer needed if you code your game to use Direct3D 8 or newer, either for 3D or 2D acceleration .

Kordanor wrote on 2023-09-26, 13:42:

So you could say that DirectDraw is a "way" to do Software rendering (in Windows).

It's for 2D accelerated rendering. I don't know if devs could've coded their games in a way to not use acceleration when using DirectDraw, but I don't see why that would be needed (unless to support video cards that do not support DirectDraw acceleration, I suppose).

Kordanor wrote on 2023-09-26, 13:42:

Could you generalize that "Software Rendering (Direct Draw or other) is mostly CPU based as long as you have decent Graphics Card for 2D Operations"?

The term software rendering on windows generally is used for games that do not use any kind of acceleration API, be it 2D or 3D. The video card isn't really involved in processing the graphics code.

However, DirectX did include software only Direc3D APIs too, and some games had them as an option. Those too fall in the "software rendering" category.

Reply 3 of 34, by Kordanor

User metadata
Rank Member
Rank
Member

DirectDraw is not "abused" for 3D. It's Direct3D that does the 3D. For DirectX up to version 7, Direct3D alone cannot do the entire work process. It handles the 3D rendering, however, for final presentation, DirectDraw needs to be used.

Ah, alright, so that means that DirectDraw always works together with Direct3D and the terms are more or less exchangable for 3D games because the one wont do anything without the other?
For example I saw this video of POD testing different renders, and he calls the rendering mode "Software - DirectDraw", he could as well have called it Direct3D?
https://www.youtube.com/watch?v=DU5Zi69QPQs

The term software rendering on windows generally is used for games that do not use any kind of acceleration API, be it 2D or 3D. The video card isn't really involved in processing the graphics code.

One sample game which calls the Render "Software" would be Quake 2. Another example would be Half Life 1.

So they use less of the Graphics card than for example the "DirectDraw" mode of Pod?

Reply 4 of 34, by Joseph_Joestar

User metadata
Rank l33t
Rank
l33t
Kordanor wrote on 2023-09-26, 18:35:

Ah, alright, so that means that DirectDraw always works together with Direct3D and the terms are more or less exchangable for 3D games because the one wont do anything without the other?

No, they aren't interchangeable.

Diablo 2 has both a DirectDraw and a Direct3D mode. Of the two, only the latter provides proper 3D acceleration effects.

PC#1: Pentium MMX 166 / Soyo SY-5BT / S3 Trio64V+ / Voodoo1 / YMF719 / AWE64 Gold / SC-155
PC#2: AthlonXP 2100+ / ECS K7VTA3 / Voodoo3 / Audigy2 / Vortex2
PC#3: Athlon64 3400+ / Asus K8V-MX / 5900XT / Audigy2
PC#4: i5-3570K / MSI Z77A-G43 / GTX 970 / X-Fi

Reply 5 of 34, by Kordanor

User metadata
Rank Member
Rank
Member

I guess in Diablo 2 without the Direct3D mode, it just doesnt show these effects?

Can a 3D game (3D as in Gothic, Unreal, Quake) run on DirectDraw without using Direct3D?

I am mostly interested in how the terms are commonly used. Without splitting hairs. I mean I know that without a graphics card you dont have graphics. So everything is technically enhanced by graphics card hardware, because otherwise you would have no picture.

Reply 6 of 34, by feda

User metadata
Rank Member
Rank
Member
Kordanor wrote on 2023-09-26, 19:03:

Can a 3D game (3D as in Gothic, Unreal, Quake) run on DirectDraw without using Direct3D?

Yes. Many shooters like Half-Life, Unreal, Quake had a software rendering mode that did not require a 3D accelerator card.

Reply 7 of 34, by Joseph_Joestar

User metadata
Rank l33t
Rank
l33t
Kordanor wrote on 2023-09-26, 19:03:

Can a 3D game (3D as in Gothic, Unreal, Quake) run on DirectDraw without using Direct3D?

Some can, other's cannot. It depends on whether the game offers DirectDraw as a rendering option.

Generally, when selecting DirectDraw instead of Direct3D, you get no 3D acceleration, no texture filtering, no advanced graphical effects and so on. It's usually used by games for backwards compatibility with older graphics cards which have no Direct3D support.

PC#1: Pentium MMX 166 / Soyo SY-5BT / S3 Trio64V+ / Voodoo1 / YMF719 / AWE64 Gold / SC-155
PC#2: AthlonXP 2100+ / ECS K7VTA3 / Voodoo3 / Audigy2 / Vortex2
PC#3: Athlon64 3400+ / Asus K8V-MX / 5900XT / Audigy2
PC#4: i5-3570K / MSI Z77A-G43 / GTX 970 / X-Fi

Reply 8 of 34, by eddman

User metadata
Rank Member
Rank
Member
Kordanor wrote on 2023-09-26, 18:35:

Ah, alright, so that means that DirectDraw always works together with Direct3D and the terms are more or less exchangable for 3D games because the one wont do anything without the other?
For example I saw this video of POD testing different renders, and he calls the rendering mode "Software - DirectDraw", he could as well have called it Direct3D?
https://www.youtube.com/watch?v=DU5Zi69QPQs

As Joseph_Joestar mentioned, they are not interchangeable. The game is coded to use Direct3D, but since pre-8 versions cannot do the final presentation by themselves, DDraw has to be involved for that part, that's all. DDraw isn't doing the 3D rendering (although it does still do the 2D elements of the graphics). You don't refer to a game's Direct3D mode as "DirectDraw".

Regarding POD, he's using the term "software", because in DirectDraw mode only the 2D elements of the game are hardware accelerated. The 3D parts are running on the CPU alone.

However, the question is, does that game's software mode even use DDraw? Many 3D games from that period didn't.

Kordanor wrote on 2023-09-26, 18:35:

One sample game which calls the Render "Software" would be Quake 2. Another example would be Half Life 1.

So they use less of the Graphics card than for example the "DirectDraw" mode of Pod?

I don't know if these games leverage DDraw in their software 3D mode or not. If they don't (and if POD actually does), then I suppose yes, they use less of the video card.

Kordanor wrote on 2023-09-26, 19:03:

Can a 3D game (3D as in Gothic, Unreal, Quake) run on DirectDraw without using Direct3D?

If they're coded to do so, sure, but only the 2D elements would be accelerated. Also, the 3D elements' visuals would be downgraded too, since they require Direct3D. Joseph_Joestar mentioned a few.

Last edited by eddman on 2023-09-26, 19:35. Edited 5 times in total.

Reply 9 of 34, by Kordanor

User metadata
Rank Member
Rank
Member

Alright! These last 2 answers help a lot!

Do you have any idea about the magnitute to compenesate in an "average" game for what is called software or DirectDraw? If you want to have the same FPS as on GLIDE but if you were not allowed to use an accelerator.
To enhance the performance, do you think upgrading the graphics card would have any effect (still software!) compared to upgrading the CPU, or would it be negligible? Or would it be so mixed among games that both can have a big impact in a significant amount of games?

Reply 10 of 34, by eddman

User metadata
Rank Member
Rank
Member

For games that use a 3D engine, the majority of the code is for 3D graphics. In Glide mode, the 3D parts of the game are accelerated by the video card. In software 3D mode, either with or without DDraw, none of it is; all the 3D calculations fall on the CPU.

I think you can already tell that upgrading the video card wouldn't really be of much help, if you're not going to use its 3D capabilities.

Reply 11 of 34, by Kordanor

User metadata
Rank Member
Rank
Member

Thank you!

With the info in this thread I rephrased a little section in a script I wrote. Could you check if there are any factual errors now?

Let's talk about the most important rendering options, starting with the basic one that is supported by almost every game and pc: Software rendering. This is the most basic displaying option, which is completely done without 3D acceleration. Similarly if you select the renderer "DirectDraw" on Windows Games. DirectDraw is purely a 2D API, which can work together with Direct3D for 3D games. But if the selection is called "DirectDraw" you can assume that Direct3D is not used, and therefore neither a 3D acceleration.
And if either Software rendering is selected, or Direct Draw, the heavy lifting will be done by the CPU and the graphics card will only play a minor role in comparison.
However, this means that running 3D games in one of these modes on a CPU of the same time period makes them basically unplayably slow, while also being more pixelated or grainy, which is why back then you usually avoided these whenever possible.
These days, it depends on what you think of the grainier graphics, especially if you're using a modern monitor and depending on what kind of CPU you throw at it.

Reply 12 of 34, by leileilol

User metadata
Rank l33t++
Rank
l33t++
eddman wrote on 2023-09-26, 19:21:

I don't know if these games leverage DDraw in their software 3D mode or not. If they don't (and if POD actually does), then I suppose yes, they use less of the video card.

Half-Life and (win)Quake definitely do for video memory writes, though WinQuake uses SciTech MGL to go through the DirectDraw interface (MGL having the ability to select VGA/ModeX video modes which DirectDraw didn't always offer). Winquake also had a ddraw-less GDI fallback with writing to system memory (intended to support NT4)

Other than where the byte is placed and how the palettes are handled, there's not a thing about DirectDraw dictating how WinQuake is making graphics.

apsosig.png
long live PCem

Reply 13 of 34, by rasz_pl

User metadata
Rank l33t
Rank
l33t
Joseph_Joestar wrote on 2023-09-26, 18:37:

Diablo 2 has both a DirectDraw and a Direct3D mode. Of the two, only the latter provides proper 3D acceleration effects.

three, also supports Glide 😀 both Glide and D3D use 3D acceleration to produce faux 3D effect https://simonschreibt.de/gat/dont-starve-diablo-parallax-7/

Open Source AT&T Globalyst/NCR/FIC 486-GAC-2 proprietary Cache Module reproduction

Reply 14 of 34, by BEEN_Nath_58

User metadata
Rank l33t
Rank
l33t
Kordanor wrote on 2023-09-26, 13:42:

Software Rendering is a more "general term", basically meaning that no 3D hardware acceleration from the Hardware is used. Little or no Resources from the Graphics card are used. The majority of the work is done via the CPU.

It can be 2D too. Not just 3D.

Kordanor wrote on 2023-09-26, 13:42:

DirectDraw is an API made for 2D rendering, which does access Graphics Card Resources like VRAM. DirectDraw can be "abused" for 3D rendering. However no 3D Hardware acceleration is used.

So you could say that DirectDraw is a "way" to do Software rendering (in Windows).

I have to be specific that 3D is not equal to perspective 3D. You can take a game like Half-Life 1 and run it with Software rendering settings and it won't become a 2D perspective game suddenly. DirectDraw obviously supports perspective 3D.

Hence the correction is: DirectDraw is not abused for 3D="3D effects rendering". For example in Half Life, using Software rendering disables "3D effects" acceleration (i.e., Direct3D hardware rendering). Some games, like Terracide instead continue to have a setting that does Software rendering with enabled 3D effects, but only in CPU (called Ramp/RGB/MMX rendering aka. Direct3D software rendering).

Kordanor wrote on 2023-09-26, 13:42:
My follow up question is then, how much influence CPU / Graphics card has (WITHOUT 3D features). So lets say that your game stut […]
Show full quote

My follow up question is then, how much influence CPU / Graphics card has (WITHOUT 3D features).
So lets say that your game stutters quite a bit in Software rendering (lets say some Dos Game like Screamer), and on the opposite side, you have a heavily stuttering game in DirectDraw on Windows.
What woud happen to each case if you throw 5 times the CPU power at it. And what happens if you use 5 times the power of the graphics card (more VRAM and whatever can influence speed on DirectDraw). Or what happens at the opposite if you reduce the power of the graphics card and use an old ISA card for DirectDraw?
I explicitly want to remove Direct3D and newer tech from the discussion and stay at older tech.

The answer is little complicated from my end. Although games have a Software rendering setting but I have not seen a single game using complete software rendering of DirectDraw. Let's say, MechWarrior 2 Mercenaries Titanium Edition - the game has Software rendering setting but it just means disabling the "3D effects" part aka Direct3D. Everything else seems to be "hardware rendered DirectDraw". I verified this by the fact, pushing HEL rendering to the game fixed all the graphical glitches I previously had (HEL for DirectDraw is equivalent to RGB/Ramp/MMX of Direct3D).

So to answer your question, the results could be different from app to app.

Kordanor wrote on 2023-09-26, 13:42:

Could you generalize that "Software Rendering (Direct Draw or other) is mostly CPU based as long as you have decent Graphics Card for 2D Operations"?

For Direct3D, yes. For DirectDraw it's complicated like I said above.

previously known as Discrete_BOB_058

Reply 15 of 34, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

That is a very interesting topic!

If something is accelerated I notice it to be smooth or at least smoother than in real software mode.
Dos Quake and even Winquake suffer from stuttering sky...the 3d accelerated versions do have a smooth sky-animation, but it should be also possible if ddraw would be used for winquake.

As I am currently using my Scovery-260 that is equipped with a MGA Mystique 4MB that is a very fast 2D card and also supports D3D but without filtering it would be nice to find smooth games/demos for it. A very latest ZdoomLE works great on that card, unbelievable how good this runs on such an old PCI card.

That is the "B" machine with a K6 processor https://www.youtube.com/watch?v=7iVYgQYeCp0

I do have thes with PII-450 and even with PIII-500 and that makes indeed a big difference compared to the K6 shown in the video above.

Retro-Gamer 😀 ...on different machines

Reply 16 of 34, by Jo22

User metadata
Rank l33t++
Rank
l33t++

Personally, I recommend reading period-correct books about the matter.
In the Windows 9x era, DirectX 3 to 6.1 did matter the most.

Edit: Having DirectX 7 books at hand (optionally) might be helpful, too. For comparison, I mean.
But be warned, DX7 SDK had deprecated some older APIs/initialization procedures.
The DX7 libs available to programmers may nolonger support them (unlike the runtime).

That's when software-rendering on processor power was the reference for DirectX, still.
At this point in time, graphics hardware usually didn't implement all features of DirectX yet.
Just look at S3 Virge or Nvidia NV1 (aka the "I can't do polygons" graphics chip).

Edit: I'm thinking of the 486DX100 and Pentium 90 era specifically here.
When people discovered DirectX on "normal" computers used in school labs and offices.
Not Pentium II gaming monsters.

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.

Most VGA drivers shipped with Windows 98/98SE are "DDraw 1.0 capable", at least.
So framebuffer access/video overlay is possible, at least.

Back in the 90s, early Windows 3D games had used flat objects (enemies, items etc) with no depth.
Like it was common for most DOS killer games.

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//

Reply 17 of 34, by dr.zeissler

User metadata
Rank l33t
Rank
l33t

this ddraw demo looks incredible... like pixelshader-stuff and run on low-end machines under win95! https://www.pouet.net/prod.php?which=273
one of the best lowres effects I have seen.

Retro-Gamer 😀 ...on different machines

Reply 18 of 34, by Jo22

User metadata
Rank l33t++
Rank
l33t++
dr.zeissler wrote on 2023-11-13, 21:59:

this ddraw demo looks incredible... like pixelshader-stuff and run on low-end machines under win95! https://www.pouet.net/prod.php?which=273
one of the best lowres effects I have seen.

That's cool! I didn't know this was possible so early!
The first time I've seen such a thing was with the graphics demo for the Geforce 256.

https://www.youtube.com/watch?v=PuTXPlCdrgw

"Time, it seems, doesn't flow. For some it's fast, for some it's slow.
In what to one race is no time at all, another race can rise and fall..." - The Minstrel

//My video channel//