Game renders brokenly with DirectX and OpenGL 3.3

Reporter: 9Morello  |  Status: open  |  Last Modified: October 12, 2017, 04:54:26 PM

I have a seamless room transition system that currently works perfectly on Game Maker 8.1. However, with ENIGMA, I get a fast (but noticeable) screen blink when the character passes the transition point.

I suspected this was related to the graphics API, so I tried changing the default. None of the alternatives worked correctly (unrelated to the blink issue from before):

DirectX 11: the game compiles, but I just get a black screen. Nothing seems to be rendered.
DirectX 9: objects appear normally, as do things drawn by them, but the backgrounds disappeared.
OpenGL 3.3: objects appear normally but backgrounds are completely glitched. It drew parts of it randomly on the screen.

Tested on Windows 7, running a Nvidia graphics card from 2012. If there is any more information I can provide on the issues, please ask.

JoshDreamland  
I definitely need more information than that, but I don't know what to ask for. Can you isolate an issue? Particularly, the circumstances under which backgrounds "disappear"? Are you setting the alpha somewhere and not resetting it? Maybe ENIGMA treats that differently (I think there's a dedicated background_alpha, so it shouldn't be using regular image alpha). I don't have any clue what might be wrong from just this bug.
9Morello  

I have not used background_alpha, nor anything that should change the "background". Actually I meant tilesets before, not backgrounbs, sorry for that.

I just made a quick test: opened a new game, added a tile set, drew some stuff on the screen and ran the game compiled with DX9. Nothing appears.
https://my.mixtape.moe/djmekf.png

Same room with OpenGL 3.3:
https://my.mixtape.moe/vuxmnh.png

Same room with DX11:
https://my.mixtape.moe/djpoux.png

There are no objects running in this game and the room has no code. Just a barebones room and a few tile sets. With OpenGL 1.1, the tilesets do appear:
https://my.mixtape.moe/ljqptp.png

If theres anything else, please ask.

JoshDreamland  

Okay. Are you suggesting that tilesets are completely broken? I guess I never use tilesets myself, so I shouldn't be incredibly surprised, but I mean, holy shit. Why haven't we heard about this before?
JoshDreamland  

@RobertBColton Do you have any free cycles to look at this? This seems up your alley. I haven't budgeted the mental energy to figure out why an entire system in ENIGMA is completely busted.
9Morello  

Thanks for the quick answer. If there is anything else I can test, I'll be here.
RobertBColton  

It looks like nobody/me ever moved the tile drawing stuff to general graphics, even though it could have been well implemented that way. Thus each system reimplements the functions but it looks like I didn't even do that for Direct3D 9. D3D11 should not work because I couldn't even get it to draw a triangle, the code was a WIP, it can only clear background color right now is all it does.
https://github.com/enigma-dev/enigma-dev/blob/master/ENIGMAsystem/SHELL/Graphics_Systems/Direct3D9/DX9tiles.cpp
Please sign in to post comments, or you can view this issue on GitHub.