Modern OpenGL sample does not work


I'm trying both SharpGL version(2.4, 2.3) of this sample on 2 different AMD GPU(Radeon HD 8650G, Open GL ver. 4.2; Radeon HD 4500 OpenGL ver. 3.3). They both are showing same incorrect result (see attached image or at http://advameric.com/downloads/screenshot.png). The ObjectLoadingSample does not work in retained mode on these GPUs either. It shows a blank window. In both cases OpenGL Version property of SharpGL.OpenGLControl is set to value corresponding to GPU OpengGL version.

file attachments


robinsedlaczek wrote Oct 20, 2014 at 5:05 PM

Hi Yuriberi!

On my nvidia gtx 580 it looks fine. Please see the attachments. Do you have the chance to test it on other hardware? I do not know any issue with radeon graphic adapters. I'll try to find such hardware and reproduce the issue.

Thanks for posting it here!

yuriberi wrote Oct 22, 2014 at 4:28 PM

I figured out that a fix for this problem is explicit location definition in the vertex shader.
I've changed Shader.vert adding the location definitions
layout(location = 0) in vec3 in_Position;
layout(location = 1) in vec3 in_Color;

This fixes the issue.

dwmkerr wrote Oct 27, 2014 at 4:54 AM

Hi yuriberi,

Thanks for posting the fix, that's very helpful! I've raised a ticket on GitHub where I'm tracking issues now and will make sure this is applied to the next release: