public void begin (final Camera camera) { update(camera); begin(); }
public void begin (final Camera camera) { update(camera); begin(); }
public void begin (final Vector3 center, final Vector3 forward) { update(center, forward); begin(); }
public void begin (final Vector3 center, final Vector3 forward) { update(center, forward); begin(); }
private void renderShadows () { ((DirectionalShadowLight)light).begin(Vector3.Zero, camera.direction); shadowBatch.begin(((DirectionalShadowLight)light).getCamera()); world.render(shadowBatch, null, visibleEntities); shadowBatch.end(); ((DirectionalShadowLight)light).end(); }
protected void renderWorld () { if (shadows) { ((DirectionalShadowLight)light).begin(Vector3.Zero, camera.direction); shadowBatch.begin(((DirectionalShadowLight)light).getCamera()); world.render(shadowBatch, null); shadowBatch.end(); ((DirectionalShadowLight)light).end(); } modelBatch.begin(camera); world.render(modelBatch, environment); modelBatch.end(); }
@Override public void render () { camController.update(); Gdx.gl.glViewport(0, 0, Gdx.graphics.getBackBufferWidth(), Gdx.graphics.getBackBufferHeight()); Gdx.gl.glClearColor(0, 0, 0, 1); Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT | GL20.GL_DEPTH_BUFFER_BIT); shadowLight.begin(Vector3.Zero, cam.direction); shadowBatch.begin(shadowLight.getCamera()); shadowBatch.render(instance); shadowBatch.end(); shadowLight.end(); modelBatch.begin(cam); modelBatch.render(instance, environment); modelBatch.end(); }
shadowLight.begin(character.transform.getTranslation(tmpVector), cam.direction); shadowBatch.begin(shadowLight.getCamera()); if (character != null) shadowBatch.render(character);
public void begin (final Camera camera) { update(camera); begin(); }
public void begin (final Vector3 center, final Vector3 forward) { update(center, forward); begin(); }
public void render(float delta) { shadowLight.begin(Vector3.Zero, camera.direction); shadowBatch.begin(shadowLight.getCamera());
/** * Generates the Shadow Map */ private void genShadowMap() { updateViewport(); ModelCacheEntry cs = (ModelCacheEntry) currentSource; shadowLight.begin(Vector3.Zero, cs.camera3d.direction); shadowBatch.begin(shadowLight.getCamera()); shadowBatch.render(cs.modelInstance); shadowBatch.end(); shadowLight.end(); Gdx.graphics.getGL20().glViewport((int) VIEWPORT.x, (int) VIEWPORT.y, (int) VIEWPORT.width, (int) VIEWPORT.height); }
private void drawShadowBatch() { shadowLight.begin(Vector3.Zero, camera.direction); shadowBatch.begin(shadowLight.getCamera()); shadowBatch.render(engine.getModelCache()); for (GameModel mdl : engine.getDynamicModels()) { if (isVisible(camera, mdl)) { shadowBatch.render(mdl.modelInstance); } } shadowBatch.end(); shadowLight.end(); }