Compatibility with median XL
Any chance to support Median XL in future update? Using glide game's window is misaligned and with ddraw can't create game in realm.
Yeah i want to try Median XL too. But lately been real busy. I will see what i can when i have time. Btw is median working normally with other wrappers like cnc-ddraw/sven's glide/d2dx etc? if so certainly i think i can make it compatible at least in single player.
That's good to hear. Actually ddraw works in singleplayer but ctd when creating games on realm. Yeah median xl is compatible with other wrappers but yours seems superior imo.
Yea, would love if it would work for multiplayer but it crashes as soon as you click create game.
3dfx version also has this issue for me, crops at top left of screen, at every resolution and both fullscreen and windowed (ddraw doesn't have this issue.)

Median XL seems to work in 3dfx mode, including main menu, but there seems to be a few text position glitches like the gold amount in inventory which moves when hovering stuff in the inventory. Resistances in character sheet are misaligned too. The text-related issues go away when disabling HD Text in CTRL+O menu.
I attached a short video I recorded while doing a quick test (Median XL 2.5.1 // Window Size : 1600x900).
My SGD2FreeResolution.json config:
"Ingame Resolutions": [
"1024x768"
],
"Ingame Resolution Mode": 0,
"Main Menu Resolution": "1024x768"
any clues as to why it crashes when pressing create game? the log file doesnt seem to tell much about it. also requires SGD2FreeResolution with resolution set as https://github.com/bayaraa/d2gl/issues/13#issuecomment-1492562326 mentioned
== D2GL logging started. (2023/5/3) ==
[21:12:34][INFO] Diablo 2 LoD version 1.13c detected.
[21:12:34][INFO] Windows version 10.0 (build: 19043) detected.
[21:12:34][INFO] Loading early DLLs.
[21:12:34][INFO] Game requested screen size: 640 x 480
[21:12:34][INFO] Window style switched to dark mode.
[21:12:34][INFO] Switched to fullscreen mode: 2560 x 1440
[21:12:34][INFO] OpenGL: 4.6 (NVIDIA GeForce RTX 3060 Laptop GPU/PCIe/SSE2)
[21:12:34][INFO] OpenGL: GL_MAX_TEXTURE_IMAGE_UNITS = 32
[21:12:34][INFO] OpenGL: GL_KHR_debug enabled!
[21:12:34][INFO] OpenGL: Independent blending available.
[21:12:34][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 1 (bound to GL_ELEMENT_ARRAY_BUFFER_ARB, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:34][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 5 (bound to GL_UNIFORM_BUFFER (1), and GL_UNIFORM_BUFFER_EXT, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:35][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 7 (bound to GL_UNIFORM_BUFFER (3), and GL_UNIFORM_BUFFER_EXT, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:35][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 4 (bound to GL_UNIFORM_BUFFER (0), and GL_UNIFORM_BUFFER_EXT, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:35][INFO] Loading late DLLs.
[21:12:35][INFO] SGD2FreeRes.dll loaded.
[21:12:35][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 2 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (3), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (4), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (5), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:35][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 4 (bound to GL_UNIFORM_BUFFER (0), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:35][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 4 (bound to GL_UNIFORM_BUFFER (0), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:35][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 5 (bound to GL_UNIFORM_BUFFER (1), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:35][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 5 (bound to GL_UNIFORM_BUFFER (1), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:36][INFO] Applying custom size.
[21:12:36][INFO] Game requested screen size: 1024 x 768
[21:12:36][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 6 (bound to GL_UNIFORM_BUFFER (2), and GL_UNIFORM_BUFFER_EXT, usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:36][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 3 (bound to GL_PIXEL_UNPACK_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:36][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 6 (bound to GL_UNIFORM_BUFFER (2), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:36][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 6 (bound to GL_UNIFORM_BUFFER (2), usage hint is GL_STATIC_DRAW) will use VIDEO memory as the source for buffer object operations.
[21:12:36][INFO] OpenGL: [131218 / Medium]: Api | Program/shader state performance warning: Vertex shader in program 7 is being recompiled based on GL state.
The "create game" crash is caused by enabled "HD Text" option. You can enable it back after you press "create game" and it won't crash, but as soon as you join the game you will be met with several issues as shown on the screen shot.
When loading into the game this is what the log showed:
[18:04:46][INFO] Applying custom size.
[18:04:46][INFO] Game requested screen size: 800 x 600
Then the log file is being filled with these repeating lines:
[18:05:08][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 9 (bound to GL_ELEMENT_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations.
[18:05:08][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 8 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations.
[18:05:08][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 9 (bound to GL_ELEMENT_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations.
[18:05:08][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 8 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations.
[18:05:08][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 9 (bound to GL_ELEMENT_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations.
[18:05:08][INFO] OpenGL: [131185 / Notification]: Api | Buffer detailed info: Buffer object 8 (bound to GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (0), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (1), GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING_ARB (2), and GL_ARRAY_BUFFER_ARB, usage hint is GL_STREAM_DRAW) will use VIDEO memory as the source for buffer object operations.
You can enable HD text while in game. It doesn't crash but everything is misaligned.
Could the HD text crash be fixed by disabling HD text automatically while in the menu and enabling back on when in the game?
love the project, hoping you can make the fully compatible median xl dream come true! <3
Bumping as well since the new MXL ladder is starting on friday. I do like NoNick's suggestion of disabling it automatically in menus if possible. Also not 100% sure if it is sourced here or from sigma-loader, but something breakers with sigma-loader and d2gl specifically when trying to use them to allow d2stats to work properly on Linux.
there's a fix on forums, dunno why he didn't do a proper PR https://forum.median-xl.com/viewtopic.php?p=587663#p587663
there's a fix on forums, dunno why he didn't do a proper PR https://forum.median-xl.com/viewtopic.php?p=587663#p587663
Just tested it as well, yup that works! Yeah not sure why there isn't a PR, hopefully that gets done. 2 Side Notes about it though: The HD Text overrides custom fonts (which is fine to me at least), and d2gl doesn't work specifically with sigma-loader to get d2stats working properly on Linux still, but as I said before I am not sure which side it is broken for (Still a pretty niche problem too of course since it is on Linux vs Windows as was intended)
seems running ok most of the part with quick resolution fix but few thing not working. because of ui overhaul of mxl bloom/lut/minimap, some part of motion prediction not working. This is test dll glide3x.zip. overwrite over D2GL v1.2.0's dll.
Hi bayaraa, i'v also made a fork for mxl with some minor fixes here and there I wanted to ask about how things work: When diablo starts to draw an automap your code basically flags and hides all the incoming textures if minimap is active, and when automap ends it disables the flag? The thing is for mxl without editing their code i found only 1 place to stop automap stage and it's after automap, monster bar, and other overlays, so it hides not only automap. So my question: is it possible in theory to define which textures belong to automap?
Hi.
When diablo starts to draw an automap your code basically flags and hides all the incoming textures if minimap is active, and when automap ends it disables the flag?
exactly like this. directs to draw to minimap framebuffer (technically hiding from main framebuffer).
So my question: is it possible in theory to define which textures belong to automap?
I think its possible to check textures hashes. Instead just for MXL change hook location of D2GL's map loop patch.
My opinion is that, due to some code edits of MXL being dirty, if you adopt fix which is not meant to be generic (benefits non-MXL), these fixes should be toggleable via config ini.
Hi.
When diablo starts to draw an automap your code basically flags and hides all the incoming textures if minimap is active, and when automap ends it disables the flag?
exactly like this. directs to draw to minimap framebuffer (technically hiding from main framebuffer).
So my question: is it possible in theory to define which textures belong to automap?
I think its possible to check textures hashes. Instead just for MXL change hook location of D2GL's map loop patch.
yeah, i hooked automap start at d2client's function which draws borders, walls, background of automap, it then proceed to use d2sigma's function for units drawing, names(~~which are drawn in 1go with other strings later~~ upd: i was wrong), then d2sigma's automap function ends and it draws d2sigma overlays(monster's hp bar, some dungeon things, etc.). nothing to hook on d2client really inbetween them, so i ended up hooking only after all of this which leads to hiding all automap + overlays sadly
alright i think it works
https://github.com/bayaraa/d2gl/assets/139075896/0bdb249a-36e9-4be2-b844-81ede1258550
👀 oo nice. btw is mxl doesn't work with widescreen mods?
they support only 1024x764, but they have plans to add widescreen in the future