public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
public Particle(Mesh mesh, Vector3f speed, long ttl, long updateTextureMillis) { super(mesh); this.speed = new Vector3f(speed); this.ttl = ttl; this.updateTextureMillis = updateTextureMillis; this.currentAnimTimeMillis = 0; Texture texture = this.getMesh().getMaterial().getTexture(); this.animFrames = texture.getNumCols() * texture.getNumRows(); }
private void renderInstancedMeshes(Scene scene, ShaderProgram shader, Matrix4f viewMatrix, Matrix4f lightViewMatrix) { shader.setUniform("isInstanced", 1); // Render each mesh with the associated game Items Map<InstancedMesh, List<GameItem>> mapMeshes = scene.getGameInstancedMeshes(); for (InstancedMesh mesh : mapMeshes.keySet()) { Texture text = mesh.getMaterial().getTexture(); if (text != null) { sceneShaderProgram.setUniform("numCols", text.getNumCols()); sceneShaderProgram.setUniform("numRows", text.getNumRows()); } if (viewMatrix != null) { shader.setUniform("material", mesh.getMaterial()); glActiveTexture(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, shadowMap.getDepthMapTexture().getId()); } mesh.renderListInstanced(mapMeshes.get(mesh), transformation, viewMatrix, lightViewMatrix); } }
private void renderInstancedMeshes(Scene scene, ShaderProgram shader, Matrix4f viewMatrix, Matrix4f lightViewMatrix) { shader.setUniform("isInstanced", 1); // Render each mesh with the associated game Items Map<InstancedMesh, List<GameItem>> mapMeshes = scene.getGameInstancedMeshes(); for (InstancedMesh mesh : mapMeshes.keySet()) { Texture text = mesh.getMaterial().getTexture(); if (text != null) { sceneShaderProgram.setUniform("numCols", text.getNumCols()); sceneShaderProgram.setUniform("numRows", text.getNumRows()); } if (viewMatrix != null) { shader.setUniform("material", mesh.getMaterial()); glActiveTexture(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, shadowMap.getDepthMapTexture().getId()); } mesh.renderListInstanced(mapMeshes.get(mesh), transformation, viewMatrix, lightViewMatrix); } }
private void renderInstancedMeshes(Scene scene, ShaderProgram shader, Matrix4f viewMatrix, Matrix4f lightViewMatrix) { shader.setUniform("isInstanced", 1); // Render each mesh with the associated game Items Map<InstancedMesh, List<GameItem>> mapMeshes = scene.getGameInstancedMeshes(); for (InstancedMesh mesh : mapMeshes.keySet()) { Texture text = mesh.getMaterial().getTexture(); if (text != null) { sceneShaderProgram.setUniform("numCols", text.getNumCols()); sceneShaderProgram.setUniform("numRows", text.getNumRows()); } if (viewMatrix != null) { shader.setUniform("material", mesh.getMaterial()); glActiveTexture(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, shadowMap.getDepthMapTexture().getId()); } mesh.renderListInstanced(mapMeshes.get(mesh), transformation, viewMatrix, lightViewMatrix); } }
private void renderInstancedMeshes(Scene scene, ShaderProgram shader, Matrix4f viewMatrix, Matrix4f lightViewMatrix) { shader.setUniform("isInstanced", 1); // Render each mesh with the associated game Items Map<InstancedMesh, List<GameItem>> mapMeshes = scene.getGameInstancedMeshes(); for (InstancedMesh mesh : mapMeshes.keySet()) { Texture text = mesh.getMaterial().getTexture(); if (text != null) { sceneShaderProgram.setUniform("numCols", text.getNumCols()); sceneShaderProgram.setUniform("numRows", text.getNumRows()); } if (viewMatrix != null) { shader.setUniform("material", mesh.getMaterial()); glActiveTexture(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, shadowMap.getDepthMapTexture().getId()); } mesh.renderListInstanced(mapMeshes.get(mesh), transformation, viewMatrix, lightViewMatrix); } }
private void renderInstancedMeshes(Scene scene, ShaderProgram shader, Matrix4f viewMatrix, Matrix4f lightViewMatrix) { shader.setUniform("isInstanced", 1); // Render each mesh with the associated game Items Map<InstancedMesh, List<GameItem>> mapMeshes = scene.getGameInstancedMeshes(); for (InstancedMesh mesh : mapMeshes.keySet()) { Texture text = mesh.getMaterial().getTexture(); if (text != null) { sceneShaderProgram.setUniform("numCols", text.getNumCols()); sceneShaderProgram.setUniform("numRows", text.getNumRows()); } if (viewMatrix != null) { shader.setUniform("material", mesh.getMaterial()); glActiveTexture(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, shadowMap.getDepthMapTexture().getId()); } mesh.renderListInstanced(mapMeshes.get(mesh), transformation, viewMatrix, lightViewMatrix); } }
private void renderInstancedMeshes(Scene scene, ShaderProgram shader, Matrix4f viewMatrix, Matrix4f lightViewMatrix) { shader.setUniform("isInstanced", 1); // Render each mesh with the associated game Items Map<InstancedMesh, List<GameItem>> mapMeshes = scene.getGameInstancedMeshes(); for (InstancedMesh mesh : mapMeshes.keySet()) { Texture text = mesh.getMaterial().getTexture(); if (text != null) { sceneShaderProgram.setUniform("numCols", text.getNumCols()); sceneShaderProgram.setUniform("numRows", text.getNumRows()); } if (viewMatrix != null) { shader.setUniform("material", mesh.getMaterial()); glActiveTexture(GL_TEXTURE2); glBindTexture(GL_TEXTURE_2D, shadowMap.getDepthMapTexture().getId()); } mesh.renderListInstanced(mapMeshes.get(mesh), transformation, viewMatrix, lightViewMatrix); } }