commit missing file
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
Some checks failed
studiorailgun/Renderer/pipeline/head There was a failure building this commit
This commit is contained in:
parent
035a13ae7b
commit
c30d409975
@ -271,16 +271,16 @@ public class RenderUtils {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
int vertexCount = vertexcoords.length / 3;
|
int vertexCount = vertexcoords.length / 3;
|
||||||
FloatBuffer VertexArrayBufferData = BufferUtils.createFloatBuffer(vertexCount * 3);
|
FloatBuffer vertexArrayBufferData = BufferUtils.createFloatBuffer(vertexCount * 3);
|
||||||
float[] temp = new float[3];
|
float[] temp = new float[3];
|
||||||
for (int i = 0; i < vertexCount; i++) {
|
for (int i = 0; i < vertexCount; i++) {
|
||||||
temp[0] = vertexcoords[i * 3 + 0];
|
temp[0] = vertexcoords[i * 3 + 0];
|
||||||
temp[1] = vertexcoords[i * 3 + 1];
|
temp[1] = vertexcoords[i * 3 + 1];
|
||||||
temp[2] = vertexcoords[i * 3 + 2];
|
temp[2] = vertexcoords[i * 3 + 2];
|
||||||
VertexArrayBufferData.put(temp);
|
vertexArrayBufferData.put(temp);
|
||||||
}
|
}
|
||||||
VertexArrayBufferData.flip();
|
vertexArrayBufferData.flip();
|
||||||
planeMesh.bufferVertices(VertexArrayBufferData, 3);
|
planeMesh.bufferVertices(vertexArrayBufferData, 3);
|
||||||
} catch (NullPointerException ex){
|
} catch (NullPointerException ex){
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
}
|
}
|
||||||
@ -355,25 +355,25 @@ public class RenderUtils {
|
|||||||
Mesh m = new Mesh(AssetDataStrings.ASSET_STRING_BITMAP_FONT_MESH_NAME);
|
Mesh m = new Mesh(AssetDataStrings.ASSET_STRING_BITMAP_FONT_MESH_NAME);
|
||||||
m.generateVAO();
|
m.generateVAO();
|
||||||
//vertices
|
//vertices
|
||||||
FloatBuffer VertexArrayBufferData = BufferUtils.createFloatBuffer(12);
|
FloatBuffer vertexArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||||
VertexArrayBufferData.put( 0);
|
vertexArrayBufferData.put( 0);
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
|
|
||||||
VertexArrayBufferData.put( 0);
|
vertexArrayBufferData.put( 0);
|
||||||
VertexArrayBufferData.put( 0);
|
vertexArrayBufferData.put( 0);
|
||||||
|
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.put( 0);
|
vertexArrayBufferData.put( 0);
|
||||||
|
|
||||||
VertexArrayBufferData.put( 0);
|
vertexArrayBufferData.put( 0);
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
|
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.put( 0);
|
vertexArrayBufferData.put( 0);
|
||||||
|
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.flip();
|
vertexArrayBufferData.flip();
|
||||||
|
|
||||||
|
|
||||||
IntBuffer faceArrayBufferData = BufferUtils.createIntBuffer(6);
|
IntBuffer faceArrayBufferData = BufferUtils.createIntBuffer(6);
|
||||||
@ -389,35 +389,35 @@ public class RenderUtils {
|
|||||||
|
|
||||||
|
|
||||||
//texture coords
|
//texture coords
|
||||||
FloatBuffer TextureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
FloatBuffer textureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
|
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
|
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
|
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
|
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
|
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.flip();
|
textureArrayBufferData.flip();
|
||||||
|
|
||||||
|
|
||||||
//buffer vertices
|
//buffer vertices
|
||||||
m.bufferVertices(VertexArrayBufferData, 2);
|
m.bufferVertices(vertexArrayBufferData, 2);
|
||||||
//buffer normals
|
//buffer normals
|
||||||
m.bufferNormals(VertexArrayBufferData, 2);
|
m.bufferNormals(vertexArrayBufferData, 2);
|
||||||
//buffer faces
|
//buffer faces
|
||||||
m.bufferFaces(faceArrayBufferData, 2);
|
m.bufferFaces(faceArrayBufferData, 2);
|
||||||
//buffer texture coords
|
//buffer texture coords
|
||||||
m.bufferTextureCoords(TextureArrayBufferData, 2);
|
m.bufferTextureCoords(textureArrayBufferData, 2);
|
||||||
|
|
||||||
|
|
||||||
m.setShader(ShaderProgram.loadSpecificShader("/Shaders/font/basicbitmap/basicbitmap.vs", "/Shaders/font/basicbitmap/basicbitmap.fs"));
|
m.setShader(ShaderProgram.loadSpecificShader("/Shaders/font/basicbitmap/basicbitmap.vs", "/Shaders/font/basicbitmap/basicbitmap.fs"));
|
||||||
@ -452,25 +452,25 @@ public class RenderUtils {
|
|||||||
Mesh m = new Mesh(AssetDataStrings.ASSET_STRING_BITMAP_FONT_MESH_NAME);
|
Mesh m = new Mesh(AssetDataStrings.ASSET_STRING_BITMAP_FONT_MESH_NAME);
|
||||||
m.generateVAO();
|
m.generateVAO();
|
||||||
//vertices
|
//vertices
|
||||||
FloatBuffer VertexArrayBufferData = BufferUtils.createFloatBuffer(12);
|
FloatBuffer vertexArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
|
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
|
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
|
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
|
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
|
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.flip();
|
vertexArrayBufferData.flip();
|
||||||
|
|
||||||
|
|
||||||
IntBuffer faceArrayBufferData = BufferUtils.createIntBuffer(6);
|
IntBuffer faceArrayBufferData = BufferUtils.createIntBuffer(6);
|
||||||
@ -486,35 +486,35 @@ public class RenderUtils {
|
|||||||
|
|
||||||
|
|
||||||
//texture coords
|
//texture coords
|
||||||
FloatBuffer TextureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
FloatBuffer textureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
|
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
|
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
|
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
|
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
|
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.flip();
|
textureArrayBufferData.flip();
|
||||||
|
|
||||||
|
|
||||||
//buffer vertices
|
//buffer vertices
|
||||||
m.bufferVertices(VertexArrayBufferData, 2);
|
m.bufferVertices(vertexArrayBufferData, 2);
|
||||||
//buffer normals
|
//buffer normals
|
||||||
m.bufferNormals(VertexArrayBufferData, 2);
|
m.bufferNormals(vertexArrayBufferData, 2);
|
||||||
//buffer faces
|
//buffer faces
|
||||||
m.bufferFaces(faceArrayBufferData, 6);
|
m.bufferFaces(faceArrayBufferData, 6);
|
||||||
//buffer texture coords
|
//buffer texture coords
|
||||||
m.bufferTextureCoords(TextureArrayBufferData, 2);
|
m.bufferTextureCoords(textureArrayBufferData, 2);
|
||||||
|
|
||||||
|
|
||||||
m.setShader(ShaderProgram.loadSpecificShader("/Shaders/font/bitmapchar/bitmapchar.vs", "/Shaders/font/bitmapchar/bitmapchar.fs"));
|
m.setShader(ShaderProgram.loadSpecificShader("/Shaders/font/bitmapchar/bitmapchar.vs", "/Shaders/font/bitmapchar/bitmapchar.fs"));
|
||||||
@ -536,25 +536,25 @@ public class RenderUtils {
|
|||||||
Mesh m = new Mesh("plane");
|
Mesh m = new Mesh("plane");
|
||||||
m.generateVAO();
|
m.generateVAO();
|
||||||
//vertices
|
//vertices
|
||||||
FloatBuffer VertexArrayBufferData = BufferUtils.createFloatBuffer(12);
|
FloatBuffer vertexArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
|
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
|
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
|
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
|
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.put(-1);
|
vertexArrayBufferData.put(-1);
|
||||||
|
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.put( 1);
|
vertexArrayBufferData.put( 1);
|
||||||
VertexArrayBufferData.flip();
|
vertexArrayBufferData.flip();
|
||||||
|
|
||||||
|
|
||||||
IntBuffer faceArrayBufferData = BufferUtils.createIntBuffer(6);
|
IntBuffer faceArrayBufferData = BufferUtils.createIntBuffer(6);
|
||||||
@ -570,35 +570,35 @@ public class RenderUtils {
|
|||||||
|
|
||||||
|
|
||||||
//texture coords
|
//texture coords
|
||||||
FloatBuffer TextureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
FloatBuffer textureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
|
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
|
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
|
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
|
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.put(0);
|
textureArrayBufferData.put(0);
|
||||||
|
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.put(1);
|
textureArrayBufferData.put(1);
|
||||||
TextureArrayBufferData.flip();
|
textureArrayBufferData.flip();
|
||||||
|
|
||||||
|
|
||||||
//buffer vertices
|
//buffer vertices
|
||||||
m.bufferVertices(VertexArrayBufferData, 2);
|
m.bufferVertices(vertexArrayBufferData, 2);
|
||||||
//buffer normals
|
//buffer normals
|
||||||
m.bufferNormals(VertexArrayBufferData, 2);
|
m.bufferNormals(vertexArrayBufferData, 2);
|
||||||
//buffer faces
|
//buffer faces
|
||||||
m.bufferFaces(faceArrayBufferData, 2);
|
m.bufferFaces(faceArrayBufferData, 2);
|
||||||
//buffer texture coords
|
//buffer texture coords
|
||||||
m.bufferTextureCoords(TextureArrayBufferData, 2);
|
m.bufferTextureCoords(textureArrayBufferData, 2);
|
||||||
|
|
||||||
|
|
||||||
m.setShader(ShaderProgram.loadSpecificShader(vertexShader, fragmentShader));
|
m.setShader(ShaderProgram.loadSpecificShader(vertexShader, fragmentShader));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user