@Override public void glInvalidateFramebuffer (int target, int numAttachments, IntBuffer attachments) { GL43.glInvalidateFramebuffer(target, attachments); }
@Override public void glInvalidateSubFramebuffer (int target, int numAttachments, IntBuffer attachments, int x, int y, int width, int height) { GL43.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); } }
@Override public int glGetProgramResourceIndex(final int program, final int programInterface, final String name) { return GL43.glGetProgramResourceIndex(program, programInterface, name); }
public void render() { shader.bind(); bitReversedSSBO.bindBufferBase(1); shader.updateUniforms(N); glBindImageTexture(0, texture.getHandle(), 0, false, 0, GL_WRITE_ONLY, GL_RGBA32F); glDispatchCompute(log_2_N,N/16,1); }
/** * Enables or disables GL debug messages for the specified severity level. Returns false if the severity * level could not be set (e.g. the NOTIFICATION level is not supported by the ARB and AMD extensions). * * See {@link Lwjgl3ApplicationConfiguration#enableGLDebugOutput(boolean, PrintStream)} */ public static boolean setGLDebugMessageControl (GLDebugMessageSeverity severity, boolean enabled) { GLCapabilities caps = GL.getCapabilities(); final int GL_DONT_CARE = 0x1100; // not defined anywhere yet if (caps.OpenGL43) { GL43.glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, severity.gl43, (IntBuffer) null, enabled); return true; } if (caps.GL_KHR_debug) { KHRDebug.glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, severity.khr, (IntBuffer) null, enabled); return true; } if (caps.GL_ARB_debug_output && severity.arb != -1) { ARBDebugOutput.glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, severity.arb, (IntBuffer) null, enabled); return true; } if (caps.GL_AMD_debug_output && severity.amd != -1) { AMDDebugOutput.glDebugMessageEnableAMD(GL_DONT_CARE, severity.amd, (IntBuffer) null, enabled); return true; } return false; }
@Override public void glShaderStorageBlockBinding(final int program, final int storageBlockIndex, final int storageBlockBinding) { GL43.glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); }
GL43.glDebugMessageCallback(new KHRDebugCallback(new DebugCallback())); } catch (IllegalStateException e) { logger.warn("Unable to specify DebugCallback to receive debugging messages from the GL.");
public void render(GLTexture normalmap, GLTexture heightmap, float yScale){ shader.bind(); shader.updateUniforms(normalmap, heightmap, N, yScale); glBindImageTexture(0, splatmap.getHandle(), 0, false, 0, GL_WRITE_ONLY, GL_RGBA16F); glDispatchCompute(N/16,N/16,1); glFinish(); splatmap.bind(); splatmap.bilinearFilter(); }
/** * Enables or disables GL debug messages for the specified severity level. Returns false if the severity * level could not be set (e.g. the NOTIFICATION level is not supported by the ARB and AMD extensions). * * See {@link Lwjgl3ApplicationConfiguration#enableGLDebugOutput(boolean, PrintStream)} */ public static boolean setGLDebugMessageControl (GLDebugMessageSeverity severity, boolean enabled) { GLCapabilities caps = GL.getCapabilities(); final int GL_DONT_CARE = 0x1100; // not defined anywhere yet if (caps.OpenGL43) { GL43.glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, severity.gl43, (IntBuffer) null, enabled); return true; } if (caps.GL_KHR_debug) { KHRDebug.glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, severity.khr, (IntBuffer) null, enabled); return true; } if (caps.GL_ARB_debug_output && severity.arb != -1) { ARBDebugOutput.glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, severity.arb, (IntBuffer) null, enabled); return true; } if (caps.GL_AMD_debug_output && severity.amd != -1) { AMDDebugOutput.glDebugMessageEnableAMD(GL_DONT_CARE, severity.amd, (IntBuffer) null, enabled); return true; } return false; }
@Override public void glShaderStorageBlockBinding(final int program, final int storageBlockIndex, final int storageBlockBinding) { GL43.glShaderStorageBlockBinding(program, storageBlockIndex, storageBlockBinding); }
@Override public void glInvalidateSubFramebuffer (int target, int numAttachments, IntBuffer attachments, int x, int y, int width, int height) { GL43.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); } }
@Override public void glInvalidateFramebuffer (int target, int numAttachments, IntBuffer attachments) { GL43.glInvalidateFramebuffer(target, attachments); }
public void render(GLTexture heightmap){ computeShader.bind(); computeShader.updateUniforms(heightmap, N, strength); glBindImageTexture(0, normalmap.getHandle(), 0, false, 0, GL_WRITE_ONLY, GL_RGBA32F); glDispatchCompute(N/16,N/16,1); glFinish(); normalmap.bind(); normalmap.trilinearFilter(); }
/** * Enables or disables GL debug messages for the specified severity level. Returns false if the severity * level could not be set (e.g. the NOTIFICATION level is not supported by the ARB and AMD extensions). * * See {@link Lwjgl3ApplicationConfiguration#enableGLDebugOutput(boolean, PrintStream)} */ public static boolean setGLDebugMessageControl (GLDebugMessageSeverity severity, boolean enabled) { GLCapabilities caps = GL.getCapabilities(); final int GL_DONT_CARE = 0x1100; // not defined anywhere yet if (caps.OpenGL43) { GL43.glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, severity.gl43, (IntBuffer) null, enabled); return true; } if (caps.GL_KHR_debug) { KHRDebug.glDebugMessageControl(GL_DONT_CARE, GL_DONT_CARE, severity.khr, (IntBuffer) null, enabled); return true; } if (caps.GL_ARB_debug_output && severity.arb != -1) { ARBDebugOutput.glDebugMessageControlARB(GL_DONT_CARE, GL_DONT_CARE, severity.arb, (IntBuffer) null, enabled); return true; } if (caps.GL_AMD_debug_output && severity.amd != -1) { AMDDebugOutput.glDebugMessageEnableAMD(GL_DONT_CARE, severity.amd, (IntBuffer) null, enabled); return true; } return false; }
@Override public int glGetProgramResourceIndex(final int program, final int programInterface, final String name) { return GL43.glGetProgramResourceIndex(program, programInterface, name); }
@Override public void glInvalidateSubFramebuffer (int target, int numAttachments, IntBuffer attachments, int x, int y, int width, int height) { GL43.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); } }
@Override public void glInvalidateFramebuffer (int target, int numAttachments, IntBuffer attachments) { GL43.glInvalidateFramebuffer(target, attachments); }
public void render(List<FractalMap> fractals){ shader.bind(); shader.updateUniforms(fractals, N); glBindImageTexture(0, fractalmap.getHandle(), 0, false, 0, GL_WRITE_ONLY, GL_RGBA32F); glDispatchCompute(N/16,N/16,1); glFinish(); fractalmap.bind(); fractalmap.bilinearFilter(); }
@Override public void glInvalidateSubFramebuffer (int target, int numAttachments, IntBuffer attachments, int x, int y, int width, int height) { GL43.glInvalidateSubFramebuffer(target, attachments, x, y, width, height); } }
@Override public void glInvalidateFramebuffer (int target, int numAttachments, IntBuffer attachments) { GL43.glInvalidateFramebuffer(target, attachments); }