Wined3d wireframe rendering

Stefan Dösinger stefandoesinger at gmail.com
Tue Sep 29 09:15:35 CDT 2015


Have a look at dlls/wined3d/state.c, state_fillmode().

However, you're likely to run into two problems:

1) The game doesn't necessarily clear the color buffer and just re-render every pixel. You'll have to change swapchain_present to clear the back buffer, otherwise you'll just get a colorful mess of old lines and new lines.

2) Render-to-texture: In modern games it is common to render everything to one or more textures, and then draw the texture onto the back buffer with one or more post-processing draws. You'll somehow have to figure out the post processing draws and make them non-wireframe, otherwise you'll end up with a mostly empty screen.

Point 2 also makes point 1 more difficult to solve. You'll have to find the intermediate render targets, clear them, and also find a proper clear color that produces a "good" result with the post processing shaders.

Also, Aaryaman's information is also pretty accurate: There may be external programs, and if you are dealing with an online game expect to be booted from the game pretty quickly because of  attempted cheating...

Re performance: Wireframe mode will only fix games that are limited by fragment processing. If you're CPU bound (which is the case in Wine most of the time without CSMT) you'll gain absolutely nothing. Also vertex processing limted setups won't improve, but those are fairly rare. If you're truly fragment processing limited lowering the resolution should help...

Cheers,
Stefan

Am 29.09.2015 um 15:52 schrieb Aaryaman Vasishta <jem456.vasishta at gmail.com>:

> You'd probably have to hack into the game to change the rasterizer state to wireframe mode. Many game trainers (basically memory hacks which are used for cheating) offer D3D hooks which allow you to *switch on* wireframe mode, but that depends on the DX version too. AFAIK many DX9 onwards games have trainers like this available. Anyways, wined3d as it is right now can't decide the rasterizer state of any game by itself. wined3d will merely do what the game tells it to do, so you'll have to modify the game itself (via methods like the one described above), or if you have the source-code of the game, then change its default rasterizer state. fwiw, I don't advocate the former method as it's basically cheating in-game.
> 
> 
> Cheers,
> Aaryaman
> 
> On Tue, Sep 29, 2015 at 7:01 PM, Bruno Jesus <00cpxxx at gmail.com> wrote:
> Hi all, I know it may sound idiot as I have zero knowledge on 3d
> graphics but is it possible to make wined3d to not add textures to
> things resulting in a sort of wireframe renderer?
> 
> The long and uninteresting background:
> I used to play a game called X-moto in 300Mhz Celeron Linux computer,
> in its standard rendering mode it was impossible to play the game due
> to low fps, but it had an awesome wireframe mode that played smoothly.
> So if this could be achieved globally by wined3d we could play new
> games on old computers (my overly noob conclusion about all this).
> 
> Thanks in advance for any reply,
> Bruno
> 
> 
> 
> 




More information about the wine-devel mailing list