docs/guide: Quake maps and BSP, WAD2 / WAD3, lmp / spr, Quake III shaders and skins; bench lines; q3skin sniff needs a path
This commit is contained in:
1 parent
175ca9e823
commit
1e69799c21
11 files changed
+663
-461
No files matched your search
@@ -1902,3 +1902,24 @@ do
|
||||
jitTune(false)
|
||||
end
|
||||
end
|
||||
|
||||
-- ws-quake: .map brushes to polygons (codecs/model/Brush clip + CSG hull + merge; MB/s of map text) and a compiled
|
||||
-- BSP with its lightmap atlas and tree (MB/s of file); fixtures tools/fixtures/map.py, tools/fixtures/bsp.py
|
||||
do
|
||||
local MapFmt = require("@rosetta/model/map")
|
||||
local BspFmt = require("@rosetta/model/bsp")
|
||||
local Bytes = require("@rosetta/core/Bytes")
|
||||
local MF = require("@tests/gen/map")
|
||||
local BF = require("@tests/gen/bsp")
|
||||
local text = buffer.fromstring(MF.quake.text)
|
||||
bench("map decode (brushes)", 5, buffer.len(text), function()
|
||||
assert(MapFmt.decode(Bytes.reader(text), { files = MF.quake.files }))
|
||||
end)
|
||||
bench("map decode (hull + merge)", 5, buffer.len(text), function()
|
||||
assert(MapFmt.decode(Bytes.reader(text), { files = MF.quake.files, hull = true, merge = true }))
|
||||
end)
|
||||
local bsp = buffer.fromstring(BF.ericw.bsp29.data)
|
||||
bench("bsp decode (lightmaps, tree)", 5, buffer.len(bsp), function()
|
||||
assert(BspFmt.decode(Bytes.reader(bsp)))
|
||||
end)
|
||||
end
|
||||
Reference in new issue
Block a user