⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme.gl

📁 PIXIL is a small footprint operating environment, complete with PDA PIM applications, a browser and
💻 GL
字号:
README: glDOOMI never got around to do anything with respect toa Linux glDOOM port except for assembling a Linux3DfxHOWTO (which, at that time, was a prerequisiteto get permission to publicly distribute thealready finished LinuxGlide port by Daryll Strauss).Linux q2test (and soon LinuxQuake2) demonstrate thatMesa with the MesaVoodoo driver is quite up to therequirements for a glDOOM port. If anybody wants toget into Linux glDOOM, please drop me a line.There is a Win32 GLDOOM port in the works, by Jim Dose.Quoting a recent posting by him:"I haven't had as much time lately to really work onthe conversion. I currently have the renderer drawingthe walls and floors as texture spans as the are inthe software renderer. There's lighting on the walls,but not the floors, and sprites are being drawn, butnot with the right texture. I figure that this is onenights work to get the game looking "normal". I haven'ttested the game on less than a p200, so I'm not surehow it will perform under the average machine, but Idon't expect it to be blindingly fast because of thenumber of spans that have to be drawn each frame.Rendering as polys is definitely the way to go.The reason I chose to do spans first was because itleft the base renderer intact and I could concentrateon ironing out any Windows compatibility problems.Actually, the first version I had running was simplya blit of the 320x200 game screen through Open GL.Surprisingly, this actually was very playable, butcertainly wasn't taking any advantage of 3D acceleration.Once the game was running, I started converting allthe span routines over."Comment: for merging Linuxdoom with Win32, this isprobably the best source for getting the Win32environment done - before more significant changesoccur."One problem with drawing spans is that the enginedoesn't calculate the texture coordinates withfractional accuracy, so the bilinear filtering worksvertically, but not horizontally on the walls. I maytry to fix this, but since I plan to use polys forthe final version, it's not really high priority.Also, spans don't really allow for looking up anddown."Comment: true looking up/down vs. Heretic-styley-shearing seems to require either a strange kindof transofrmation matrix (he probably does not usethe OpenGL transformation at all), or renderingall the spans as textured rectangular slicesinstead of using glDrawBitmap. No, polys are theway to go.   "When I tackle the conversion to polys, one big problemI'll encounter is drawing floors. Since the world isstored in a 2D bsp tree, there is no information onthe shape of the floors. In fact the floors can beconcave and may include holes (typically, most renderersbreak concave polys down into a collection of convexpolys or triangles). In software, the floors are actuallydrawn using an algorithm that's similar to a flood fill(except that a list of open spans is kept instead of abuffer of pixels).  This makes drawing the floors aspolys fairly difficult."A polygon based approach will require significant changesto the data structures used in the refresh module. Irecommend either separating a libref_soft.so first (aQuake2 like approach), and creating libref_gl afterwards,or abandoning the software rendering entirely.John Carmack wrote once upon a time:"... the U64 DOOM engine is much more what I would considerThe Right Thing now -- it turns the subsector boundariesinto polygons for the floors and ceilings ahead of time,then for rendering it walks the BSP front to back, doingvisibility determination of subsectors by the one dimensionalocclusion buffer and clipping sprites into subsectors, thenit goes backwards through the visible subsectors, drawingfloors, ceilings, walls, then sorted internal sprite fragments.It's a ton simpler and a ton faster, although it does suffersome overdraw when a high subsector overlooks a low one (butthat is more than made up for by the simplicity of everythingelse)."Well, IMO compiling a separate list of floor/ceiling polygonsafter having read the WAD file, and thus introducing this asa completely separate data structure to the current code basemight be the easiest thing to do. Jim Dose writes:"One method I may use to draw the floors as polys was suggestedby Billy Zelsnack of Rebel Boat Rocker when we were workingat 3D Realms together a few years ago. Basically, Billy wasdesigning an engine that dealt with the world in a 2D portalformat similar to the one that Build used, except that it hadtrue looking up and down (no shearing). Since floors werebasically implicit and could be concave, Billy drew them asif the walls extended downwards to infinity, but fixed thetexture coordinates to appear that they were on the plane ofthe floor. The effect was that you could look up and down andthere were no gaps or overdraw. It's a fairly clever methodand allows you to store the world in a simpler data format.Had perspective texture mapping been fast enough back then,both Build and Doom could have done this in software."Perhaps the above is sufficient to get you started.Other Issues:1. OcclusionDOOM uses a per-column lookup (top/bottom index) to do HLHSR.This works fine with span based rendering (well, gettinghorizontal spans of floors/ceilings into the picture is aseparate story). It isn't really mindboggling with polygonbased rendering. GLDOOM should abandon that.2. Precalculated VisibilityDOOM has the data used by Quake's PVS - in REJECT.During Quake development, lots of replacements for theocclusion buffer were tried, and PVS turned out to be best.I suggest usind the REJECT as PVS.There have been special effects using a utility named RMB.REJECT is a lump meant for enemy AI LoS calculation - anonstandard REJECT will not work as a PVS, and introducerendering errors. I suggest looking for a PVS lump in theWAD, and using REJECT if none is found. That way, it mightbe feasible to eat the cake and keep it.3. MipmapsDOOM does not have mipmapping. As we have 8bit palettizedtextures, OpenGL mipmapping might not give the desiredresults. Plus, composing textures from patches at runtimewould require runtime mipmapping. Precalculated mipmapsin the WAD?4. SpritesPartly transparent textures and sprites impose anotherproblem related to mipmapping. Without alpha channel,this could give strange results. Precalculated, validsprite mipmaps (w/o alpha)?

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -