List of usage examples for org.lwjgl.opengl GL32 GL_CONTEXT_CORE_PROFILE_BIT
int GL_CONTEXT_CORE_PROFILE_BIT
To view the source code for org.lwjgl.opengl GL32 GL_CONTEXT_CORE_PROFILE_BIT.
Click Source Link
From source file:com.crosslink.battleprism.core.misc.TextureGenerator.java
private static void throwIfLANotSupported() { if (!GLContext.getCapabilities().OpenGL30) { return;//from w w w . j av a 2s. co m } if (!GLContext.getCapabilities().OpenGL32) { if (!GLContext.getCapabilities().GL_ARB_compatibility) { throw new ImageFormatUnsupportedException("Core OpenGL contexts cannot use Luminance/alpha."); } } else { int profileMask = glGetInteger(GL32.GL_CONTEXT_PROFILE_MASK); if ((profileMask & GL32.GL_CONTEXT_CORE_PROFILE_BIT) != 0) { throw new ImageFormatUnsupportedException("Core OpenGL contexts cannot use Luminance/alpha."); } } }
From source file:jpcsp.graphics.RE.RenderingEngineLwjgl.java
License:Open Source License
protected void init() { String openGLVersion = GL11.glGetString(GL11.GL_VERSION); String openGLVendor = GL11.glGetString(GL11.GL_VENDOR); String openGLRenderer = GL11.glGetString(GL11.GL_RENDERER); log.info(String.format("OpenGL version: %s, vender: %s, renderer: %s", openGLVersion, openGLVendor, openGLRenderer));/* w w w. j av a2 s. c o m*/ vendorIntel = "Intel".equalsIgnoreCase(openGLVendor); hasOpenGL30 = GLContext.getCapabilities().OpenGL30; if (GLContext.getCapabilities().OpenGL20) { String shadingLanguageVersion = GL11.glGetString(GL20.GL_SHADING_LANGUAGE_VERSION); log.info("Shading Language version: " + shadingLanguageVersion); } if (GLContext.getCapabilities().OpenGL30) { int contextFlags = GL11.glGetInteger(GL30.GL_CONTEXT_FLAGS); String s = String.format("GL_CONTEXT_FLAGS: 0x%X", contextFlags); if ((contextFlags & GL30.GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT) != 0) { s += " (GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)"; } log.info(s); } if (GLContext.getCapabilities().OpenGL32) { int contextProfileMask = GL11.glGetInteger(GL32.GL_CONTEXT_PROFILE_MASK); String s = String.format("GL_CONTEXT_PROFILE_MASK: 0x%X", contextProfileMask); if ((contextProfileMask & GL32.GL_CONTEXT_CORE_PROFILE_BIT) != 0) { s += " (GL_CONTEXT_CORE_PROFILE_BIT)"; } if ((contextProfileMask & GL32.GL_CONTEXT_COMPATIBILITY_PROFILE_BIT) != 0) { s += " (GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)"; } log.info(s); } }