Git Refactoring
This commit is contained in:
parent
c700911190
commit
55fcb82edd
35 changed files with 2338 additions and 2361 deletions
133
src/fr/technicalgames/render/Asset.java
Normal file
133
src/fr/technicalgames/render/Asset.java
Normal file
|
@ -0,0 +1,133 @@
|
|||
package fr.technicalgames.render;
|
||||
import java.nio.*;
|
||||
import java.util.*;
|
||||
|
||||
import org.lwjgl.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import fr.technicalgames.light.*;
|
||||
import fr.technicalgames.material.*;
|
||||
import fr.technicalgames.math.*;
|
||||
|
||||
public class Asset {
|
||||
|
||||
public int vbo,vao;
|
||||
public Texture texture;
|
||||
public Matrix4f transform;
|
||||
public Material material;
|
||||
private int size;
|
||||
|
||||
public Asset(){
|
||||
texture = Texture.WOOD;
|
||||
transform = new Matrix4f();
|
||||
material = new DefaultMaterial();
|
||||
vao = GL30.glGenVertexArrays();
|
||||
vbo = GL15.glGenBuffers();
|
||||
float[] a = new float[]{
|
||||
// X Y Z U V Normal
|
||||
// bottom
|
||||
-1.0f,-1.0f,-1.0f, 0.0f, 0.0f, 0.0f, -1.0f, 0.0f,
|
||||
1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.0f,
|
||||
-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 0.0f, -1.0f, 0.0f,
|
||||
1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 0.0f, -1.0f, 0.0f,
|
||||
1.0f,-1.0f, 1.0f, 1.0f, 1.0f, 0.0f, -1.0f, 0.0f,
|
||||
-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 0.0f, -1.0f, 0.0f,
|
||||
|
||||
// top
|
||||
-1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f,
|
||||
1.0f, 1.0f,-1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
1.0f, 1.0f,-1.0f, 1.0f, 0.0f, 0.0f, 1.0f, 0.0f,
|
||||
-1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 1.0f, 0.0f,
|
||||
1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f,
|
||||
|
||||
// front
|
||||
-1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 1.0f,
|
||||
1.0f,-1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f,
|
||||
-1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f,
|
||||
1.0f,-1.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f,
|
||||
1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f, 1.0f,
|
||||
-1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f, 1.0f,
|
||||
|
||||
// back
|
||||
-1.0f,-1.0f,-1.0f, 0.0f, 0.0f, 0.0f, 0.0f, -1.0f,
|
||||
-1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f,
|
||||
1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 0.0f, 0.0f, -1.0f,
|
||||
1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 0.0f, 0.0f, -1.0f,
|
||||
-1.0f, 1.0f,-1.0f, 0.0f, 1.0f, 0.0f, 0.0f, -1.0f,
|
||||
1.0f, 1.0f,-1.0f, 1.0f, 1.0f, 0.0f, 0.0f, -1.0f,
|
||||
|
||||
// left
|
||||
-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f,
|
||||
-1.0f, 1.0f,-1.0f, 1.0f, 0.0f, -1.0f, 0.0f, 0.0f,
|
||||
-1.0f,-1.0f,-1.0f, 0.0f, 0.0f, -1.0f, 0.0f, 0.0f,
|
||||
-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, -1.0f, 0.0f, 0.0f,
|
||||
-1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 0.0f, 0.0f,
|
||||
-1.0f, 1.0f,-1.0f, 1.0f, 0.0f, -1.0f, 0.0f, 0.0f,
|
||||
|
||||
// right
|
||||
1.0f,-1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f,
|
||||
1.0f,-1.0f,-1.0f, 1.0f, 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
1.0f,-1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 0.0f, 0.0f,
|
||||
1.0f, 1.0f,-1.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f,
|
||||
1.0f, 1.0f, 1.0f, 0.0f, 1.0f, 1.0f, 0.0f, 0.0f
|
||||
};
|
||||
FloatBuffer buffer = BufferUtils.createFloatBuffer(a.length);
|
||||
buffer.put(a).flip();
|
||||
size = a.length/(3+2+3);
|
||||
GL30.glBindVertexArray(vao);
|
||||
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, vbo);
|
||||
GL15.glBufferData(GL15.GL_ARRAY_BUFFER, buffer, GL15.GL_STATIC_DRAW);
|
||||
|
||||
GL20.glEnableVertexAttribArray(Shaders.MAIN_LIGHT.getAttribLocation("vert"));
|
||||
GL20.glVertexAttribPointer(Shaders.MAIN_LIGHT.getAttribLocation("vert"), 3, GL11.GL_FLOAT, false, 8*4, 0);
|
||||
|
||||
GL20.glEnableVertexAttribArray(Shaders.MAIN_LIGHT.getAttribLocation("vertTexCoord"));
|
||||
GL20.glVertexAttribPointer(Shaders.MAIN_LIGHT.getAttribLocation("vertTexCoord"), 2, GL11.GL_FLOAT, true, 8*4, 3*4);
|
||||
|
||||
GL20.glEnableVertexAttribArray(Shaders.MAIN_LIGHT.getAttribLocation("vertNormal"));
|
||||
GL20.glVertexAttribPointer(Shaders.MAIN_LIGHT.getAttribLocation("vertNormal"), 3, GL11.GL_FLOAT, true, 8*4, 5*4);
|
||||
|
||||
GL15.glBindBuffer(GL15.GL_ARRAY_BUFFER, 0);
|
||||
GL30.glBindVertexArray(0);
|
||||
}
|
||||
|
||||
public void render(ArrayList<Light> lights){
|
||||
Shaders.MAIN_LIGHT.bind();
|
||||
Shaders.MAIN_LIGHT.uniform("camera", Camera.matrix);
|
||||
Shaders.MAIN_LIGHT.uniform("transform", transform);
|
||||
Shaders.MAIN_LIGHT.uniform("projection", DisplayManager.projection);
|
||||
Shaders.MAIN_LIGHT.uniform("materialTex", 0); //set to 0 because the texture will be bound to GL_TEXTURE0
|
||||
Shaders.MAIN_LIGHT.uniform("materialShininess", material.shininess);
|
||||
Shaders.MAIN_LIGHT.uniform("materialSpecularColor", material.specularColor);
|
||||
Shaders.MAIN_LIGHT.uniform("numLights", lights.size());
|
||||
Shaders.MAIN_LIGHT.uniform("cameraPosition", Camera.pos);
|
||||
|
||||
for(int i = 0;i < lights.size();i++){
|
||||
Shaders.MAIN_LIGHT.uniform("allLights["+i+"].position", lights.get(i).position);
|
||||
Shaders.MAIN_LIGHT.uniform("allLights["+i+"].intensities", lights.get(i).intensities);
|
||||
Shaders.MAIN_LIGHT.uniform("allLights["+i+"].attenuation", lights.get(i).attenuation);
|
||||
Shaders.MAIN_LIGHT.uniform("allLights["+i+"].ambientCoefficient", lights.get(i).ambientCoefficient);
|
||||
Shaders.MAIN_LIGHT.uniform("allLights["+i+"].coneAngle", lights.get(i).coneAngle);
|
||||
Shaders.MAIN_LIGHT.uniform("allLights["+i+"].coneDirection", lights.get(i).coneDirection);
|
||||
}
|
||||
|
||||
GL13.glActiveTexture(GL13.GL_TEXTURE0);
|
||||
texture.bind();
|
||||
|
||||
GL30.glBindVertexArray(vao);
|
||||
GL11.glDrawArrays(GL11.GL_TRIANGLES, 0, size);
|
||||
GL30.glBindVertexArray(0);
|
||||
texture.unbind();
|
||||
Shaders.MAIN_LIGHT.unbind();
|
||||
}
|
||||
|
||||
public void destroy(){
|
||||
GL15.glDeleteBuffers(vbo);
|
||||
GL30.glBindVertexArray(vao);
|
||||
texture.destroy();
|
||||
transform = null;
|
||||
}
|
||||
|
||||
}
|
67
src/fr/technicalgames/render/Camera.java
Normal file
67
src/fr/technicalgames/render/Camera.java
Normal file
|
@ -0,0 +1,67 @@
|
|||
package fr.technicalgames.render;
|
||||
import static org.lwjgl.glfw.GLFW.*;
|
||||
|
||||
import org.lwjgl.glfw.*;
|
||||
import org.lwjgl.opengl.*;
|
||||
|
||||
import fr.technicalgames.*;
|
||||
import fr.technicalgames.input.*;
|
||||
import fr.technicalgames.math.*;
|
||||
|
||||
|
||||
|
||||
public class Camera {
|
||||
|
||||
public static Matrix4f matrix = new Matrix4f();
|
||||
public static final float SPEED = 1.0f;
|
||||
public static final float sens = 0.5f;
|
||||
public static float speed = 1.0f;
|
||||
|
||||
|
||||
|
||||
public static Vector3f rot = new Vector3f();
|
||||
public static Vector3f pos = new Vector3f();
|
||||
|
||||
public static void update(){
|
||||
speed = SPEED * Main.delta;
|
||||
if(Input.isKey(GLFW_KEY_LEFT_CONTROL))speed *= 2.0f;
|
||||
rot.x += -Input.getDMouse().getY() * sens;
|
||||
rot.y += -Input.getDMouse().getX() * sens;
|
||||
if(rot.x > 90)rot.x = 90;
|
||||
if(rot.x < -90)rot.x = -90;
|
||||
if(Input.isKey(GLFW.GLFW_KEY_W)){
|
||||
pos.x += Mathf.cos(Mathf.toRadians(rot.y + 90)) * speed;
|
||||
pos.z += Mathf.sin(Mathf.toRadians(rot.y + 90)) * speed;
|
||||
}
|
||||
if(Input.isKey(GLFW.GLFW_KEY_S)){
|
||||
pos.x += -Mathf.cos(Mathf.toRadians(rot.y + 90)) * speed;
|
||||
pos.z += -Mathf.sin(Mathf.toRadians(rot.y + 90)) * speed;
|
||||
}
|
||||
if(Input.isKey(GLFW.GLFW_KEY_A)){
|
||||
pos.x += -Mathf.cos(Mathf.toRadians(rot.y)) * speed;
|
||||
pos.z += -Mathf.sin(Mathf.toRadians(rot.y)) * speed;
|
||||
}
|
||||
if(Input.isKey(GLFW.GLFW_KEY_D)){
|
||||
pos.x += Mathf.cos(Mathf.toRadians(rot.y)) * speed;
|
||||
pos.z += Mathf.sin(Mathf.toRadians(rot.y)) * speed;
|
||||
}
|
||||
if(Input.isKey(GLFW.GLFW_KEY_LEFT_SHIFT)){
|
||||
pos.y -= speed;
|
||||
}
|
||||
if(Input.isKey(GLFW.GLFW_KEY_SPACE)){
|
||||
pos.y += speed;
|
||||
}
|
||||
if(Input.isKeyDown(GLFW_KEY_ESCAPE))glfwSetWindowShouldClose(Main.windowID, GL11.GL_TRUE);
|
||||
if(Input.isButtonDown(0))glfwSetInputMode(Main.windowID, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
|
||||
if(Input.isButtonDown(1))glfwSetInputMode(Main.windowID, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
||||
}
|
||||
|
||||
public static void transform(){
|
||||
matrix.loadIdentity();
|
||||
matrix.rotate(new Quaternion(new Vector3f(1,0,0),rot.x));
|
||||
matrix.rotate(new Quaternion(new Vector3f(0,1,0),rot.y));
|
||||
matrix.rotate(new Quaternion(new Vector3f(0,0,1),rot.z));
|
||||
matrix.tranlate(-pos.x, -pos.y, -pos.z);
|
||||
}
|
||||
|
||||
}
|
55
src/fr/technicalgames/render/DisplayManager.java
Normal file
55
src/fr/technicalgames/render/DisplayManager.java
Normal file
|
@ -0,0 +1,55 @@
|
|||
package fr.technicalgames.render;
|
||||
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
|
||||
import fr.technicalgames.*;
|
||||
import fr.technicalgames.math.*;
|
||||
|
||||
public class DisplayManager {
|
||||
|
||||
public static Matrix4f projection = new Matrix4f();
|
||||
|
||||
public static void clear(){
|
||||
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
|
||||
public static void preRender2D(){
|
||||
projection.loadIdentity();
|
||||
projection.Ortho2D(0, Main.WIDTH, 0, Main.HEIGHT, -1, 1);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LESS);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
public static void preRender3D(){
|
||||
projection.loadIdentity();
|
||||
projection.perspective(50.0f, (float)Main.WIDTH/(float)Main.HEIGHT, 0.1f,100.0f);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LESS);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
public static void preRenderGUI(){
|
||||
projection.loadIdentity();
|
||||
projection.Ortho2D(0, Main.WIDTH, 0, Main.HEIGHT, -1, 1);
|
||||
glEnable(GL_DEPTH_TEST);
|
||||
glDepthFunc(GL_LESS);
|
||||
glEnable(GL_BLEND);
|
||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
||||
}
|
||||
|
||||
public static void render2D(){
|
||||
Main.game.render2D();
|
||||
}
|
||||
|
||||
public static void render3D(){
|
||||
Main.game.render3D();
|
||||
}
|
||||
|
||||
public static void renderGUI(){
|
||||
Main.game.renderGUI();
|
||||
}
|
||||
|
||||
}
|
96
src/fr/technicalgames/render/Shaders.java
Normal file
96
src/fr/technicalgames/render/Shaders.java
Normal file
|
@ -0,0 +1,96 @@
|
|||
package fr.technicalgames.render;
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
import static org.lwjgl.opengl.GL20.*;
|
||||
|
||||
import fr.technicalgames.input.*;
|
||||
import fr.technicalgames.math.*;
|
||||
|
||||
public class Shaders {
|
||||
|
||||
public int program;
|
||||
|
||||
public static Shaders MAIN_LIGHT;
|
||||
|
||||
static{
|
||||
try {
|
||||
MAIN_LIGHT = new Shaders("res/shaders/light.vert","res/shaders/light.frag");
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
public Shaders(String vertexFile,String fragmentFile) throws Exception{
|
||||
String fragmentShader = IO.loadFile(fragmentFile);
|
||||
String vertexShader = IO.loadFile(vertexFile);
|
||||
|
||||
if(program != -1)glDeleteProgram(program);
|
||||
program = glCreateProgram();
|
||||
int vert = glCreateShader(GL_VERTEX_SHADER);
|
||||
int frag = glCreateShader(GL_FRAGMENT_SHADER);
|
||||
glShaderSource(vert, vertexShader);
|
||||
glShaderSource(frag, fragmentShader);
|
||||
glCompileShader(vert);
|
||||
if (glGetShaderi(vert, GL_COMPILE_STATUS) == GL_FALSE) {
|
||||
System.err.println(glGetShaderInfoLog(vert, 2048));
|
||||
System.exit(1);
|
||||
}else{
|
||||
System.out.println("Vertex compiled !");
|
||||
}
|
||||
glCompileShader(frag);
|
||||
if (glGetShaderi(frag, GL_COMPILE_STATUS) == GL_FALSE) {
|
||||
System.err.println(glGetShaderInfoLog(frag, 2048));
|
||||
System.exit(1);
|
||||
}else{
|
||||
System.out.println("Fragment compiled !");
|
||||
}
|
||||
glAttachShader(program, vert);
|
||||
glAttachShader(program, frag);
|
||||
glLinkProgram(program);
|
||||
glValidateProgram(program);
|
||||
glDeleteShader(frag);
|
||||
glDeleteShader(vert);
|
||||
}
|
||||
|
||||
public void bind(){
|
||||
glUseProgram(program);
|
||||
}
|
||||
|
||||
public void unbind(){
|
||||
glUseProgram(0);
|
||||
}
|
||||
|
||||
public int getAttribLocation(String name){
|
||||
return glGetAttribLocation(program, name);
|
||||
}
|
||||
|
||||
public void destroy(){
|
||||
if(program == 0)return;
|
||||
if(glIsProgram(program))unbind();
|
||||
glDeleteProgram(program);
|
||||
}
|
||||
|
||||
public void uniform(String name,float v){
|
||||
glUniform1f(glGetUniformLocation(program, name), v);
|
||||
}
|
||||
|
||||
public void uniform(String name,Vector3f vec){
|
||||
glUniform3f(glGetUniformLocation(program, name), vec.x,vec.y,vec.z);
|
||||
}
|
||||
|
||||
public void uniform(String name,Vector4f vec){
|
||||
glUniform4f(glGetUniformLocation(program, name), vec.x,vec.y,vec.z,vec.w);
|
||||
}
|
||||
|
||||
public void uniform(String name,Matrix4f mat){
|
||||
glUniformMatrix4fv(glGetUniformLocation(program, name),true, mat.getBuffer());
|
||||
}
|
||||
|
||||
public void uniform(String name, Color4f v) {
|
||||
glUniform4f(glGetUniformLocation(program, name), v.getR(),v.getG(),v.getB(),v.getA());
|
||||
}
|
||||
|
||||
public void uniform(String name,int v){
|
||||
glUniform1i(glGetUniformLocation(program,name), v);
|
||||
}
|
||||
|
||||
}
|
96
src/fr/technicalgames/render/Texture.java
Normal file
96
src/fr/technicalgames/render/Texture.java
Normal file
|
@ -0,0 +1,96 @@
|
|||
package fr.technicalgames.render;
|
||||
import static org.lwjgl.opengl.GL11.*;
|
||||
import static org.lwjgl.opengl.GL12.*;
|
||||
|
||||
import java.awt.image.*;
|
||||
import java.io.*;
|
||||
import java.nio.*;
|
||||
|
||||
import javax.imageio.*;
|
||||
|
||||
import org.lwjgl.*;
|
||||
|
||||
public class Texture {
|
||||
|
||||
|
||||
public static Texture WOOD = loadTexture("res/textures/wooden-crate.jpg");
|
||||
|
||||
int width, height;
|
||||
int id;
|
||||
|
||||
public Texture(int width,int height,int id){
|
||||
this.id = id;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
|
||||
public static Texture loadTexture(String path){
|
||||
try {
|
||||
BufferedImage image = ImageIO.read(new File(path));
|
||||
int width = image.getWidth();
|
||||
int height = image.getHeight();
|
||||
int[] pixels = new int[width * height];
|
||||
|
||||
image.getRGB(0, 0, width, height, pixels, 0,width);
|
||||
|
||||
int[] data = new int[pixels.length];
|
||||
for (int i = 0; i < data.length; i++) {
|
||||
int a = (pixels[i] & 0xff000000) >> 24;
|
||||
int r = (pixels[i] & 0xff0000) >> 16;
|
||||
int g = (pixels[i] & 0xff00) >> 8;
|
||||
int b = (pixels[i] & 0xff);
|
||||
|
||||
data[i] = a << 24 | b << 16 | g << 8 | r;
|
||||
}
|
||||
|
||||
IntBuffer buffer = BufferUtils.createIntBuffer(data.length);
|
||||
buffer.put(data);
|
||||
buffer.flip();
|
||||
|
||||
int id = glGenTextures();
|
||||
glBindTexture(GL_TEXTURE_2D, id);
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
|
||||
|
||||
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
|
||||
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
|
||||
System.out.println("Texture loaded ! " + width + "x" + height + " id:" + id);
|
||||
|
||||
return new Texture(width, height, id);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
public int getWidth() {
|
||||
return width;
|
||||
}
|
||||
|
||||
public int getHeight() {
|
||||
return height;
|
||||
}
|
||||
|
||||
public int getID(){
|
||||
return id;
|
||||
}
|
||||
|
||||
public void bind(){
|
||||
glBindTexture(GL_TEXTURE_2D, id);
|
||||
}
|
||||
|
||||
public void unbind(){
|
||||
glBindTexture(GL_TEXTURE_2D, 0);
|
||||
}
|
||||
|
||||
public void destroy(){
|
||||
glDeleteTextures(id);
|
||||
}
|
||||
|
||||
}
|
24
src/fr/technicalgames/render/gui/GLFont.java
Normal file
24
src/fr/technicalgames/render/gui/GLFont.java
Normal file
|
@ -0,0 +1,24 @@
|
|||
package fr.technicalgames.render.gui;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.image.*;
|
||||
import java.nio.*;
|
||||
|
||||
public class GLFont {
|
||||
|
||||
private Font font;
|
||||
private int textureFont;
|
||||
|
||||
public GLFont(String name,int style,int size){
|
||||
this.font = new Font(name, style, size);
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
public GLFont(){
|
||||
this("Verdana",Font.BOLD,24);
|
||||
}
|
||||
|
||||
|
||||
}
|
9
src/fr/technicalgames/render/gui/GUIComponent.java
Normal file
9
src/fr/technicalgames/render/gui/GUIComponent.java
Normal file
|
@ -0,0 +1,9 @@
|
|||
package fr.technicalgames.render.gui;
|
||||
|
||||
import fr.technicalgames.math.*;
|
||||
|
||||
public abstract class GUIComponent {
|
||||
|
||||
private Vector2f pos;
|
||||
|
||||
}
|
Reference in a new issue