Songs of Syx - 2019

Ok, I’ve changed something and reloaded the game. My suspicion is that glGetInterger(GL_VERSION_MAYOR) was the culprit. Why? I don’t know. I’ve asked the guys at opengl forums, but will have to wait for a reply. Hope it works!

Ok, I’ve just learnt a new thing that might be helpful to others.

Perfectly written opengl code will in theory work on all machines that support that version.
Imperfect code will work on some machines but not on others and vice versa.
That means, since I’m not a opengl guru, that my only option is to buy a bunch of computers with all different GPUS and test things out, until I’ve found all the bugs.

I’ve just figured out that:

		System.out.println("OPEN_GL");
		System.out.println("---FB stencil Bits: " + glGetFramebufferAttachmentParameteri(GL_FRAMEBUFFER, GL_STENCIL, GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE));
		System.out.println("---FB depth Bits: " + glGetFramebufferAttachmentParameteri(GL_FRAMEBUFFER, GL_STENCIL, GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE));
		System.out.println("---FB Red Bits: " + glGetFramebufferAttachmentParameteri(GL_FRAMEBUFFER, GL_FRONT, GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE));
		System.out.println("---FB Green Bits: " + glGetFramebufferAttachmentParameteri(GL_FRAMEBUFFER, GL_FRONT, GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE));
		System.out.println("---FB Blue Bits: " + glGetFramebufferAttachmentParameteri(GL_FRAMEBUFFER, GL_FRONT, GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE));
		System.out.println("---FB Alpha Bits: " + glGetFramebufferAttachmentParameteri(GL_FRAMEBUFFER, GL_FRONT, GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE));
		System.out.println("---Version: " + glGetString(GL_VERSION));
		System.out.println("---SL Version: " + glGetString(GL_SHADING_LANGUAGE_VERSION));
		System.out.println("---glRenderer: " + glGetString(GL_VENDOR) + ", " + glGetString(GL_RENDERER)); 
		System.out.println("---Forward compatible: " + g.forwardCompatible);
		System.out.println();
		if (!g.OpenGL33)
			throw new IllegalStateException("No opengl 3.3 support!");
		checkErrors();

works on my graphics card without causing any errors, but caused an error on an AMD card.
that’s because:
glGetFramebufferAttachmentParameteri(GL_FRAMEBUFFER, GL_FRONT, GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE));
should be:
glGetFramebufferAttachmentParameteri(GL_FRAMEBUFFER, GL_FRONT_LEFT, GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE));
at least that’s what I think.
Incredibly annoying.

I’m just bumping this. With great shame… But I’ve updated the main post and added a trailer and some pictures.

I’ve released the pre-alpha version of the game at IndieDB. Check it out: https://www.indiedb.com/games/songs-of-syx