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 {
|
||||
int vertexCount = vertexcoords.length / 3;
|
||||
FloatBuffer VertexArrayBufferData = BufferUtils.createFloatBuffer(vertexCount * 3);
|
||||
FloatBuffer vertexArrayBufferData = BufferUtils.createFloatBuffer(vertexCount * 3);
|
||||
float[] temp = new float[3];
|
||||
for (int i = 0; i < vertexCount; i++) {
|
||||
temp[0] = vertexcoords[i * 3 + 0];
|
||||
temp[1] = vertexcoords[i * 3 + 1];
|
||||
temp[2] = vertexcoords[i * 3 + 2];
|
||||
VertexArrayBufferData.put(temp);
|
||||
vertexArrayBufferData.put(temp);
|
||||
}
|
||||
VertexArrayBufferData.flip();
|
||||
planeMesh.bufferVertices(VertexArrayBufferData, 3);
|
||||
vertexArrayBufferData.flip();
|
||||
planeMesh.bufferVertices(vertexArrayBufferData, 3);
|
||||
} catch (NullPointerException ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
@ -355,25 +355,25 @@ public class RenderUtils {
|
||||
Mesh m = new Mesh(AssetDataStrings.ASSET_STRING_BITMAP_FONT_MESH_NAME);
|
||||
m.generateVAO();
|
||||
//vertices
|
||||
FloatBuffer VertexArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||
VertexArrayBufferData.put( 0);
|
||||
VertexArrayBufferData.put( 1);
|
||||
FloatBuffer vertexArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||
vertexArrayBufferData.put( 0);
|
||||
vertexArrayBufferData.put( 1);
|
||||
|
||||
VertexArrayBufferData.put( 0);
|
||||
VertexArrayBufferData.put( 0);
|
||||
vertexArrayBufferData.put( 0);
|
||||
vertexArrayBufferData.put( 0);
|
||||
|
||||
VertexArrayBufferData.put( 1);
|
||||
VertexArrayBufferData.put( 0);
|
||||
vertexArrayBufferData.put( 1);
|
||||
vertexArrayBufferData.put( 0);
|
||||
|
||||
VertexArrayBufferData.put( 0);
|
||||
VertexArrayBufferData.put( 1);
|
||||
vertexArrayBufferData.put( 0);
|
||||
vertexArrayBufferData.put( 1);
|
||||
|
||||
VertexArrayBufferData.put( 1);
|
||||
VertexArrayBufferData.put( 0);
|
||||
vertexArrayBufferData.put( 1);
|
||||
vertexArrayBufferData.put( 0);
|
||||
|
||||
VertexArrayBufferData.put( 1);
|
||||
VertexArrayBufferData.put( 1);
|
||||
VertexArrayBufferData.flip();
|
||||
vertexArrayBufferData.put( 1);
|
||||
vertexArrayBufferData.put( 1);
|
||||
vertexArrayBufferData.flip();
|
||||
|
||||
|
||||
IntBuffer faceArrayBufferData = BufferUtils.createIntBuffer(6);
|
||||
@ -389,35 +389,35 @@ public class RenderUtils {
|
||||
|
||||
|
||||
//texture coords
|
||||
FloatBuffer TextureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||
TextureArrayBufferData.put(0);
|
||||
TextureArrayBufferData.put(1);
|
||||
FloatBuffer textureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||
textureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
|
||||
TextureArrayBufferData.put(0);
|
||||
TextureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(0);
|
||||
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(0);
|
||||
|
||||
TextureArrayBufferData.put(0);
|
||||
TextureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(0);
|
||||
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.flip();
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.flip();
|
||||
|
||||
|
||||
//buffer vertices
|
||||
m.bufferVertices(VertexArrayBufferData, 2);
|
||||
m.bufferVertices(vertexArrayBufferData, 2);
|
||||
//buffer normals
|
||||
m.bufferNormals(VertexArrayBufferData, 2);
|
||||
m.bufferNormals(vertexArrayBufferData, 2);
|
||||
//buffer faces
|
||||
m.bufferFaces(faceArrayBufferData, 2);
|
||||
//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"));
|
||||
@ -452,25 +452,25 @@ public class RenderUtils {
|
||||
Mesh m = new Mesh(AssetDataStrings.ASSET_STRING_BITMAP_FONT_MESH_NAME);
|
||||
m.generateVAO();
|
||||
//vertices
|
||||
FloatBuffer VertexArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||
VertexArrayBufferData.put(-1);
|
||||
VertexArrayBufferData.put( 1);
|
||||
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.flip();
|
||||
vertexArrayBufferData.put( 1);
|
||||
vertexArrayBufferData.put( 1);
|
||||
vertexArrayBufferData.flip();
|
||||
|
||||
|
||||
IntBuffer faceArrayBufferData = BufferUtils.createIntBuffer(6);
|
||||
@ -486,35 +486,35 @@ public class RenderUtils {
|
||||
|
||||
|
||||
//texture coords
|
||||
FloatBuffer TextureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||
TextureArrayBufferData.put(0);
|
||||
TextureArrayBufferData.put(1);
|
||||
FloatBuffer textureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||
textureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
|
||||
TextureArrayBufferData.put(0);
|
||||
TextureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(0);
|
||||
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(0);
|
||||
|
||||
TextureArrayBufferData.put(0);
|
||||
TextureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(0);
|
||||
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.flip();
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.flip();
|
||||
|
||||
|
||||
//buffer vertices
|
||||
m.bufferVertices(VertexArrayBufferData, 2);
|
||||
m.bufferVertices(vertexArrayBufferData, 2);
|
||||
//buffer normals
|
||||
m.bufferNormals(VertexArrayBufferData, 2);
|
||||
m.bufferNormals(vertexArrayBufferData, 2);
|
||||
//buffer faces
|
||||
m.bufferFaces(faceArrayBufferData, 6);
|
||||
//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"));
|
||||
@ -536,25 +536,25 @@ public class RenderUtils {
|
||||
Mesh m = new Mesh("plane");
|
||||
m.generateVAO();
|
||||
//vertices
|
||||
FloatBuffer VertexArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||
VertexArrayBufferData.put(-1);
|
||||
VertexArrayBufferData.put( 1);
|
||||
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.flip();
|
||||
vertexArrayBufferData.put( 1);
|
||||
vertexArrayBufferData.put( 1);
|
||||
vertexArrayBufferData.flip();
|
||||
|
||||
|
||||
IntBuffer faceArrayBufferData = BufferUtils.createIntBuffer(6);
|
||||
@ -570,35 +570,35 @@ public class RenderUtils {
|
||||
|
||||
|
||||
//texture coords
|
||||
FloatBuffer TextureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||
TextureArrayBufferData.put(0);
|
||||
TextureArrayBufferData.put(1);
|
||||
FloatBuffer textureArrayBufferData = BufferUtils.createFloatBuffer(12);
|
||||
textureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
|
||||
TextureArrayBufferData.put(0);
|
||||
TextureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(0);
|
||||
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(0);
|
||||
|
||||
TextureArrayBufferData.put(0);
|
||||
TextureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.put(0);
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(0);
|
||||
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.put(1);
|
||||
TextureArrayBufferData.flip();
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.put(1);
|
||||
textureArrayBufferData.flip();
|
||||
|
||||
|
||||
//buffer vertices
|
||||
m.bufferVertices(VertexArrayBufferData, 2);
|
||||
m.bufferVertices(vertexArrayBufferData, 2);
|
||||
//buffer normals
|
||||
m.bufferNormals(VertexArrayBufferData, 2);
|
||||
m.bufferNormals(vertexArrayBufferData, 2);
|
||||
//buffer faces
|
||||
m.bufferFaces(faceArrayBufferData, 2);
|
||||
//buffer texture coords
|
||||
m.bufferTextureCoords(TextureArrayBufferData, 2);
|
||||
m.bufferTextureCoords(textureArrayBufferData, 2);
|
||||
|
||||
|
||||
m.setShader(ShaderProgram.loadSpecificShader(vertexShader, fragmentShader));
|
||||
|
||||
Loading…
Reference in New Issue
Block a user