private static boolean checkExtension(String extension, boolean supported) { if (supported) { return true; } apiLog("[GL] " + extension + " was reported as available but an entry point is missing."); return false; }
private static boolean checkExtension(String extension, boolean supported) { if (supported) { return true; } apiLog("[WGL] " + extension + " was reported as available but an entry point is missing."); return false; }
private static boolean checkExtension(String extension, boolean supported) { if (supported) { return true; } apiLog("[GLX] " + extension + " was reported as available but an entry point is missing."); return false; }
private static boolean checkExtension(String extension, boolean supported) { if (supported) { return true; } apiLog("[AL] " + extension + " was reported as available but an entry point is missing."); return false; }
private static boolean checkExtension(String extension, boolean supported) { if (supported) { return true; } apiLog("[ALC] " + extension + " was reported as available but an entry point is missing."); return false; }
static boolean checkExtension(String extension, boolean available) { if (!available) { apiLog("[VK] " + extension + " was reported as available but an entry point is missing."); return false; } return true; }
private static boolean checkExtension(String extension, boolean supported) { if (supported) { return true; } apiLog("[GLES] " + extension + " was reported as available but an entry point is missing."); return false; }
private void frameOverflow() { if (DEBUG) { apiLog("[WARNING] Out of frame stack space (" + frames.length + ") in thread: " + Thread.currentThread()); } frames = Arrays.copyOf(frames, frames.length * 3 / 2); }
private static boolean loadSystem(Consumer<String> load, Class<?> context, String libName, String property, String paths) { Path libFile = findLibrary(paths, libName); if (libFile == null) { apiLog(String.format("\t%s not found in %s=%s", libName, property, paths)); return false; } load.accept(libFile.toAbsolutePath().toString()); apiLog(String.format("\tLoaded from %s: %s", property, libFile)); checkHash(context, libFile); return true; }
@Override public void set(@Nullable ALCapabilities caps) { if (tempCaps == null) { tempCaps = caps; } else if (caps != null && caps != tempCaps && ThreadLocalUtil.areCapabilitiesDifferent(tempCaps.addresses, caps.addresses)) { apiLog("[WARNING] Incompatible context detected. Falling back to thread/process lookup for AL contexts."); icd = AL::getCapabilities; // fall back to thread/process lookup } }
@Override public void set(@Nullable GLCapabilities caps) { if (tempCaps == null) { tempCaps = caps; } else if (caps != null && caps != tempCaps && ThreadLocalUtil.areCapabilitiesDifferent(tempCaps.addresses, caps.addresses)) { apiLog("[WARNING] Incompatible context detected. Falling back to thread-local lookup for GL contexts."); icd = GL::getCapabilities; // fall back to thread/process lookup } }
@Override public void set(@Nullable GLESCapabilities caps) { if (tempCaps == null) { tempCaps = caps; } else if (caps != null && caps != tempCaps && ThreadLocalUtil.areCapabilitiesDifferent(tempCaps.addresses, caps.addresses)) { apiLog("[WARNING] Incompatible context detected. Falling back to thread-local lookup for GLES contexts."); icd = GLES::getCapabilities; // fall back to thread/process lookup } }
@Nullable private static SharedLibrary loadNative(Class<?> context, String libName, String property, String paths) { Path libFile = findLibrary(paths, libName); if (libFile == null) { apiLog(String.format("\t%s not found in %s=%s", libName, property, paths)); return null; } SharedLibrary lib = apiCreateLibrary(libFile.toString()); apiLog(String.format("\tLoaded from %s: %s", property, libFile)); checkHash(context, libFile); return lib; }
@Override public long getFunctionAddress(ByteBuffer functionName) { long address = library.getFunctionAddress(functionName); if (address == NULL && Checks.DEBUG_FUNCTIONS) { apiLog("Failed to locate address for ALC core function " + memASCII(functionName)); } return address; }
@Override public long getFunctionAddress(ByteBuffer functionName) { long address = egl.getFunctionAddress(functionName); if (address == NULL) { address = library.getFunctionAddress(functionName); if (address == NULL && DEBUG_FUNCTIONS) { apiLog("Failed to locate address for GLES function " + functionName); } } return address; } });
@Override public long getFunctionAddress(long handle, ByteBuffer functionName) { long address = invokePPP(alcGetProcAddress, handle, memAddress(functionName)); if (address == NULL && Checks.DEBUG_FUNCTIONS) { apiLog("Failed to locate address for ALC extension function " + memASCII(functionName)); } return address; }
@Override public long getFunctionAddress(ByteBuffer functionName) { long address = invokePP(alGetProcAddress, memAddress(functionName)); if (address == NULL && Checks.DEBUG_FUNCTIONS) { apiLog("Failed to locate address for AL function " + memASCII(functionName)); } return address; } };
@Override public long getFunctionAddress(ByteBuffer functionName) { long address = getExtensionAddress(memAddress(functionName)); if (address == NULL) { address = library.getFunctionAddress(functionName); if (address == NULL && DEBUG_FUNCTIONS) { apiLog("Failed to locate address for GL function " + memASCII(functionName)); } } return address; }
private static VKCapabilitiesInstance getInstanceCapabilities(long handle, VkInstanceCreateInfo ci) { VkApplicationInfo appInfo = ci.pApplicationInfo(); int apiVersion = appInfo != null ? appInfo.apiVersion() : VK.getInstanceVersionSupported(); return new VKCapabilitiesInstance(functionName -> { long address = callPPP(VK.getGlobalCommands().vkGetInstanceProcAddr, handle, memAddress(functionName)); if (address == NULL && Checks.DEBUG_FUNCTIONS) { apiLog("Failed to locate address for VK instance function " + memASCII(functionName)); } return address; }, apiVersion, VK.getEnabledExtensionSet(apiVersion, ci.ppEnabledExtensionNames()), getAvailableDeviceExtensions(handle)); }