Gestion de toutes les lettres pour Text.java

This commit is contained in:
Antoine
2021-06-03 17:19:09 +02:00
parent df57374117
commit a6f25bb75b
2 changed files with 6 additions and 6 deletions

View File

@ -36,11 +36,11 @@ public class Text {
private ObjectGl charToObjectGl(char a){
ObjectGl objectGl = new ObjectGl(this.zPos, 1.0f, 1.0f, this.size, "textures/dejavu10x10_gs_tc.png", null);
objectGl.setShader("shaders/StylishShaders/BasicVert.glsl","shaders/StylishShaders/TextFrag.glsl");
switch (a){
case ('a'): {
objectGl.setTextureWrap(0.0f,40.0f,10.0f,10.0f, ObjectGl.DEFAULT);
break;
}
if (a < 132 && a > 96){
objectGl.setTextureWrap(0.0f + (a - 97) * 10.0f,40.0f,10.0f,10.0f, ObjectGl.DEFAULT);
}
else if (a < 91 && a > 64){
objectGl.setTextureWrap(0.0f + (a - 97) * 10.0f,30.0f,10.0f,10.0f, ObjectGl.DEFAULT);
}
return objectGl;
}