--- This guide is now available on libgdx.com. Check it out here. If you have any questions, join us on Discord! ---
- To switch to libGDX's LWJGL 3 backend, open your root
build.gradlefile and replace the LWJGL backend dependency:
| /* Simple copy to clipboard action | |
| * --- | |
| * This script adds a simple "copy to clipboard" button to code elements located within <pre> elements. | |
| * Requires jQuery. Can be used with the Jekyll Minimal Mistakes theme by adding it to the 'after_footer_scripts'. | |
| */ | |
| function sleep(ms) { | |
| return new Promise(resolve => setTimeout(resolve, ms)); | |
| } | |
| async function onClickEffect(btn, style) { |
| package issue.test; | |
| import com.badlogic.gdx.ApplicationAdapter; | |
| import com.badlogic.gdx.Gdx; | |
| import com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application; | |
| import com.badlogic.gdx.backends.lwjgl3.Lwjgl3ApplicationConfiguration; | |
| import com.badlogic.gdx.graphics.Color; | |
| import com.badlogic.gdx.graphics.GL20; | |
| import com.badlogic.gdx.graphics.Mesh; | |
| import com.badlogic.gdx.graphics.glutils.ShaderProgram; |
| /* | |
| * Copyright 2020 eskalon | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at: | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, |
| buildscript { | |
| apply from: 'gradle/libgdx-versions.gradle' | |
| repositories { | |
| mavenLocal() | |
| mavenCentral() | |
| maven { url "https://plugins.gradle.org/m2/" } | |
| maven { url "https://oss.sonatype.org/content/repositories/snapshots/" } | |
| jcenter() | |
| google() |