public void Update(TimeSpan elapsed, Matrix4 transform) { m_renderer.Clear(); m_renderer.Render(transform); Console.WriteLine("[SpriteRenderSystem] Update ended"); }
public void Render(Matrix4 transform) { //GL.PolygonMode(GL.FRONT_AND_BACK, GL.LINE); m_renderer.Render(transform); //GL.PolygonMode(GL.FRONT_AND_BACK, GL.FILL); }
public void Render(Matrix4 transform) { transform *= m_camera.CreateWorldToCameraTransform(); m_background.Render(transform); m_level.Map.Render(transform); m_player.Render(transform); EnnemyManager.Instance.Render(transform); }
public void Render(Matrix4 transform) { if (m_isDirty) { GL.BindVertexArray(m_vao); RebuildBuffer(); } GL.UseProgram(m_program); GL.BindVertexArray(m_vao); m_program.Projection.SetValue(transform); GL.DrawArrays(GL.TRIANGLES, 0, m_instances.Count*3); GL.BindVertexArray(null); }
public void Render(Matrix4 transform) { if (m_currentZone != null) { for (var row = m_currentMinZoneIndex.X - 1; row <= m_currentMaxZoneIndex.X + 1; row++) { for (var col = m_currentMinZoneIndex.Y - 1; col <= m_currentMaxZoneIndex.Y + 1; col++) { var index = new Vector2i(row, col); if (m_zones.ContainsKey(index)) { m_zones[index].Render(transform); } } } //m_zones[CreateKey(key.Item1, key.Item2)].Render(transform); } }
public void Render(Matrix4 transform) { m_renderer.Render(transform); }
public void Render(Matrix4 transform) { transform *= Matrix4.Translate(m_map.ZoneSize.X * m_id.X, m_map.ZoneSize.Y * m_id.Y, 0); Floor.Render(transform); GL.Enable(GL.DEPTH_TEST); //m_wallRenderer.Render(transform); m_treeRenderer.Render(transform); //GL.BlendFunc(GL.SRC_ALPHA, GL.ONE); //GL.BlendEquation(GL.FUNC_ADD); //ParticleEngine.Draw(transform); FireCamp.Render(transform); GL.Disable(GL.DEPTH_TEST); GL.BlendFunc(GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA); //m_lightRenderer.Render(transform); }
public void Update(TimeSpan elapsed, Matrix4 transform) { foreach (var proc in m_systems) { Parallel.ForEach(proc.Value, x => x.Update(elapsed, transform)); } }
public void Render(TimeSpan elapsed, Matrix4 transform) { //On met à jour les sprites des séquences //var objNeedUpdate = m_renderObjects.SelectMany(x => x.Value).Where(x => x.SpriteSequence != null); //Parallel.ForEach(objNeedUpdate, x => // { // x.SpriteSequence.Update(elapsed); // }); //On passe tout les objets à dessiner au renderer foreach (var layer in m_renderObjects) { foreach (var obj in layer.Value) { m_renderer.AddRenderObject(obj); } } Clean(); m_renderer.Render(transform); }
public void Render(Matrix4 transform) { if (m_isDirty) { RebuildBuffer(); } if (m_instances.Count != 0) { GL.BindVertexArray(m_vao); GL.UseProgram(m_program); m_program.Projection.SetValue(transform); m_program.Texture.SetValue(SpriteSheet.Texture); GL.DrawArraysInstanced(GL.TRIANGLE_FAN, 0, 4, m_instances.Count); //GL.BindVertexArray(null); } }
public void Render(Matrix4 transform) { }
public void Render(Matrix4 transform) { m_backgroundRenderer.Render(transform); }
public void Render(Matrix4 transform) { RebuildBuffer(); if (m_datas.Count != 0) { GL.BindVertexArray(m_vao); GL.UseProgram(m_program); m_program.Projection.SetValue(transform); //m_program.Texture.SetValue(SpriteSheet.Texture); GL.DrawArrays(GL.TRIANGLES, 0, m_datas.Count); //GL.BindVertexArray(null); } Clear(); }
public void Render(Matrix4 transform) { if (m_life.IsAlive) { m_sprite.Position = new Vector2(m_location.Position.X - m_box.X / 2, m_location.Position.Y - m_box.Y / 2); m_sprite.Sprite = m_currentSequence.CurrentSprite; m_sprite.Size = m_box; m_renderer.Render(transform); } }
public void Render(Matrix4 transform) { GL.BindFramebuffer(m_framebufferAllLight); var period = GetDayPeriod(); double percentOfTransitionInDay; double percentOfTransition; Color4 color; switch (period) { case DayPeriod.Evening: percentOfTransitionInDay = m_timeTransition.TotalSeconds; percentOfTransition = (m_time - m_timeStartNight).TotalSeconds; var percentOfNight = percentOfTransition / percentOfTransitionInDay; color = new Color4( (float)((m_maxLight.R - m_maxDark.R) * (1-percentOfNight) + m_maxDark.R), (float)((m_maxLight.G - m_maxDark.G) * (1 - percentOfNight) + m_maxDark.G), (float)((m_maxLight.B - m_maxDark.B) * (1 - percentOfNight) + 0.2 + m_maxDark.B), 1); GL.ClearColor(color); break; case DayPeriod.Morning: percentOfTransitionInDay = m_timeTransition.TotalSeconds; percentOfTransition = (m_time - m_timeStartDay).TotalSeconds; var percentOfDay = percentOfTransition / percentOfTransitionInDay; color = new Color4( (float)((m_maxLight.R - m_maxDark.R) * percentOfDay + 0.3f + m_maxDark.R), (float)((m_maxLight.G - m_maxDark.G) * percentOfDay + 0.1f + m_maxDark.G), (float)((m_maxLight.B - m_maxDark.B) * percentOfDay + m_maxDark.B), 1); GL.ClearColor(color); break; case DayPeriod.Day: GL.ClearColor(m_maxLight); break; case DayPeriod.Night: GL.ClearColor(m_maxDark); break; } GL.Clear(GL.COLOR_BUFFER_BIT | GL.DEPTH_BUFFER_BIT); GL.BlendFunc(GL.ONE, GL.ONE); GL.BlendEquation(GL.FUNC_ADD); //GL.PolygonMode(GL.FRONT_AND_BACK, GL.LINE); m_map.RenderLights(transform); //GL.PolygonMode(GL.FRONT_AND_BACK, GL.FILL); GL.BindFramebuffer(null); GL.BlendFunc(GL.ZERO, GL.SRC_COLOR); var size = Engine.Display.GetSize(); m_graphics.Draw(new Box2(new Vector2(-1, -1), new Vector2(2, 2)), m_textureLight, Vector2.Zero, Vector2.One); m_graphics.Flush(); }
public void Render(Matrix4 transform) { m_sprite.Position = m_location.Location.Position; m_sprite.Sprite = m_currentSequence.CurrentSprite; m_sprite.Size = new Vector2(m_sprite.Sprite.Size.X, m_sprite.Sprite.Size.Y); m_renderer.Render(transform); }
public void Render(TimeSpan elapsed, Matrix4 transform) { transform *= m_camera.CreateWorldToCameraTransform(); RenderManager.Instance.Render(elapsed, transform); }
public virtual void Render(Matrix4 transform) { }
public void Render(Matrix4 transform) { transform *= m_camera.CreateWorldToCameraTransform(); GL.Enable_BLEND(); GL.BlendFunc(GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA); GL.BlendEquation(GL.FUNC_ADD); m_map.Render(transform); GL.Enable(GL.DEPTH_TEST); m_player.Render(transform); BloodManager.Instance.Render(transform); EnnemyManager.Instance.Render(transform); GL.Disable(GL.DEPTH_TEST); m_dayLight.Render(transform); GL.BlendFunc(GL.SRC_ALPHA, GL.ONE_MINUS_SRC_ALPHA); //ShootManager.Instance.Render(transform); BulletManager.Instance.Render(transform); }
public void Update(TimeSpan elapsed, Matrix4 transform) { SystemManager.Instance.Update(elapsed, transform); }
public void Render(Matrix4 transform) { transform *= m_camera.CreateWorldToCameraTransform(); m_renderer.Render(transform); m_SRenderer.Render(transform); }
public void RenderLights(Matrix4 transform) { transform *= Matrix4.Translate(m_map.ZoneSize.X * m_id.X, m_map.ZoneSize.Y * m_id.Y, 0); //GL.PolygonMode(GL.FRONT_AND_BACK, GL.LINE); m_lightRenderer.Render(transform); //GL.PolygonMode(GL.FRONT_AND_BACK, GL.FILL); }
public void Update(TimeSpan elapsed, Matrix4 transform) { Console.WriteLine("[MoveSystem] Update ended"); }
public static void UniformMatrix4fv(int location, int count, bool transpose, ref Matrix4 value) { m_UniformMatrix4fv_2(location, count, transpose, ref value); if(m_debug) CheckError("UniformMatrix4fv"); }