[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - D_DrawPoly

D_DrawPoly

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

D_DrawPoly

Postby leileilol » Thu Apr 17, 2014 10:27 am

Anyone ever tried implementing that function (in the software renderer) and enabling it out of curiosity? The code for drawing it was clearly removed from the source release, but the rest of it (setting the world to draw for it) is still there. Maybe it's also related to polysets. Maybe Romero has an early remnant of it, could be dating back to early 1995 before the first Quake TIF screenshots.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: D_DrawPoly

Postby mankrip » Thu Apr 17, 2014 11:28 pm

MDL models features polygons that always have 3 edges (i.e. triangles), but the polygons in BSP models (i.e. faces) can have many more. As I understand, D_DrawPoly was made to draw BSP faces on the screen, similarly to how MDL triangles are rendered but most likely featuring perspective correction.

IIRC, the code to get D_DrawPoly to run seems to be incomplete. I've tried to enable it a few times without success.
Anyway, the difference would certainly be that it used absolutely no optimization to prevent overdraw. I'm sure D_DrawPoly used Z buffer checks for each pixel instead, just like the MDL triangle renderer does. This also means that the BSP renderer didn't render the Z buffer values of BSP faces's pixels in a separated step at the time.

I suspect that translucent BSP faces in the software renderer of Quake 2 are rendered in a similar way.

And I was also aiming to figure out how to bypass the whole optimized rendering code for BSP faces, so specific BSP faces could be rendered individually as fast as possible. That would allow for "fence textures", and would probably help to make translucent water a bit faster in some areas. I'd still use the optimized BSP code on translucent BSP entities though, because I don't like when translucent entities overdraw themselves.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: D_DrawPoly

Postby Spike » Fri Apr 18, 2014 3:18 am

I always thought it was something to do with vquake.
the fact that R_ZDrawSubmodelPolys just calls R_RenderPoly shows that D_DrawPoly does indeed need to draw its own depth values. Yes, this would mean that there is overdraw, but if you have actual hardware (with decent zbuffer support) to draw the poly then its probably still going to be faster than trying to figure out all the spans and clipping them, etc.
I assume that you would need to replace more than just D_DrawPoly for it to be complete, at a minimum d_init.c too. it likely expects all the d_*.c files to be replaced.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: D_DrawPoly

Postby qbism » Fri Apr 18, 2014 4:00 pm

Q2 software renderer has R_DrawPoly called by R_ClipAndDrawPoly, used by alpha surfaces and sprites.
User avatar
qbism
 
Posts: 1236
Joined: Thu Nov 04, 2004 5:51 am

Re: D_DrawPoly

Postby leileilol » Fri Apr 18, 2014 11:13 pm

I think that was used for lasers. Translucent surfaces used some derivative of the Turbulent8 code without the turb IIRC, causing some really malformed looking glass.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests