Switch to core profile in GPU plugin

This makes GPU plugin available to more people and workarounds bug in
JOGL on Linux where it is not detecting compatible profile on some
systems.

Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This commit is contained in:
Tomas Slusny
2018-11-17 14:03:22 +01:00
parent 2cfdde3a07
commit 44d09b8601
4 changed files with 5 additions and 5 deletions

View File

@@ -227,7 +227,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
GLProfile.initSingleton();
GLProfile glProfile = GLProfile.get(GLProfile.GL4bc);
GLProfile glProfile = GLProfile.get(GLProfile.GL4);
GLCapabilities glCaps = new GLCapabilities(glProfile);
AbstractGraphicsConfiguration config = AWTGraphicsConfiguration.create(canvas.getGraphicsConfiguration(),
@@ -872,7 +872,7 @@ public class GpuPlugin extends Plugin implements DrawCallbacks
// Texture on UI
gl.glBindVertexArray(vaoUiHandle);
gl.glDrawArrays(gl.GL_QUADS, 0, 4);
gl.glDrawArrays(gl.GL_TRIANGLE_FAN, 0, 4);
// Reset
gl.glBindTexture(gl.GL_TEXTURE_2D, 0);

View File

@@ -22,7 +22,7 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#version 400
#version 330
uniform sampler2DArray textures;
uniform vec2 textureOffsets[64];

View File

@@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#version 400
#version 330
#define PI 3.1415926535897932384626433832795f
#define UNIT PI / 1024.0f

View File

@@ -23,7 +23,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#version 400
#version 330
layout (location = 0) in ivec4 VertexPosition;
layout (location = 1) in vec4 uv;