Not too sure this was the right place for this.
I'm writing under the WorldReconfiguration branch.
I'm refactoring and rewriting bits of code for someone else. They were originally using AWT for their rendering basis. I've taken their code, and mostly abstracted it so that I can start moving things over to LWJGL or LibGDX painlessly in the near future. Couple issues left there, but I think it's mostly working.
Anyways, I almost finished the basis to the AWTRenderer, but have run into an issue. I'm attempting to render an image onto the panel, though it's not appearing. The code is running, not throwing any errors, but I can't figure out why it's not actually drawing.
The code in question is this couple of lines (located here) :
Graphics l_Graphics = ((AWTRenderer) p_Renderer).getGraphics();
l_Graphics.drawImage( this.m_Image , p_XCoord, p_YCoord,
GameOptions.TILE_SIZE, GameOptions.TILE_SIZE, null);
Whenever I currently go to draw a scene, I tell the current GameScreen to draw, which calls the AWTRenderer and it repaints, which should tell the GameScreen to start drawing everything with the reference to the Renderer. The GameScreen tells the World to do its drawing, which currently passes the reference to a TileRegion, which passes the Reference to each Tile. The Tile then gets its GraphicsComponent and tells it to draw, which gets the associated GraphicsAsset and tells it to finally draw using the original reference to the Renderer. Bit convoluted in my opinion, but this is my first time doing this stuff.
Tried my first implementation of a CBES, too.
At this point, I've verified that l_Graphics is not null, that the code is running, and earlier up the call branch I can draw a rectangle which appears and should be using the same Graphics reference. Google hasn't really given me any answers, though I've always been bad at search strings. Also tried drawing a rectangle inside that function, but it doesn't appear either.
The issue, as far as I can tell, is with the Graphics. I don't have a solid understanding of AWT, and wasn't planning on it since I want to move libraries/APIs soon. I think it may be related to AWT paint function being called by what I think is a different thread when repaint is called.
Before I'm told to move to an engine or different library entirely, I'd like to just get this working.