本文整理汇总了C#中PloobsEngine.RenderBatch方法的典型用法代码示例。如果您正苦于以下问题:C# PloobsEngine.RenderBatch方法的具体用法?C# PloobsEngine.RenderBatch怎么用?C# PloobsEngine.RenderBatch使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PloobsEngine
的用法示例。
在下文中一共展示了PloobsEngine.RenderBatch方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Draw
protected override void Draw(Microsoft.Xna.Framework.GameTime gt, PloobsEngine.SceneControl.IObject obj, PloobsEngine.SceneControl.RenderHelper render, PloobsEngine.Cameras.ICamera cam, IList<PloobsEngine.Light.ILight> lights)
{
render.PushBlendState(laser_blends);
effect.CurrentTechnique = effect_technique;
world.SetValue(obj.WorldMatrix);
wvp.SetValue(shader_matrices_combined[1] = obj.WorldMatrix * cam.View * cam.Projection);
effect_color.SetValue(color.ToVector4());
effect_center_to_viewer.SetValue(cam.Position);
render.RenderBatch(obj.Modelo.GetBatchInformation(0)[0], effect);
render.PopBlendState();
}
示例2: PosDrawPhase
public override void PosDrawPhase(GameTime gt, PloobsEngine.SceneControl.IObject obj, PloobsEngine.SceneControl.RenderHelper render, PloobsEngine.Cameras.ICamera cam, IList<PloobsEngine.Light.ILight> lights)
{
Matrix wld = obj.WorldMatrix;
for (int i = 0; i < obj.Modelo.MeshNumber; i++)
{
BatchInformation[] bi = obj.Modelo.GetBatchInformation(i);
for (int j = 0; j < bi.Count(); j++)
{
this._shader2.Parameters["DiffuseMap"].SetValue(obj.Modelo.GetTextureInformation(i)[j].getTexture(TextureType.DIFFUSE));
Matrix w1 = Matrix.Multiply(bi[j].ModelLocalTransformation, wld);
this._shader2.Parameters["worldViewProjection"].SetValue(w1 * cam.ViewProjection);
this._shader2.Parameters["lightSamplerBuffer"].SetValue(render[PrincipalConstants.lightRt]);
this._shader2.Parameters["LightBufferPixelSize"].SetValue(new Vector2(0.5f / render[PrincipalConstants.lightRt].Width, 0.5f / render[PrincipalConstants.lightRt].Height));
render.RenderBatch(bi[j], _shader2);
}
}
}
示例3: Draw
protected override void Draw(Microsoft.Xna.Framework.GameTime gt, PloobsEngine.SceneControl.IObject obj, PloobsEngine.SceneControl.RenderHelper render, PloobsEngine.Cameras.ICamera cam, IList<PloobsEngine.Light.ILight> lights)
{
this._shader.Parameters["FarClip"].SetValue(cam.FarPlane);
this._shader.Parameters["View"].SetValue(cam.View);
this._shader.Parameters["Projection"].SetValue(cam.Projection);
Matrix wld = obj.WorldMatrix;
for (int i = 0; i < obj.Modelo.MeshNumber; i++)
{
BatchInformation[] bi = obj.Modelo.GetBatchInformation(i);
for (int j = 0; j < bi.Count(); j++)
{
Matrix w1 = Matrix.Multiply(bi[j].ModelLocalTransformation, wld);
this._shader.Parameters["World"].SetValue(w1);
this._shader.Parameters["VPIT"].SetValue(Matrix.Transpose(Matrix.Invert(w1 * cam.View)));
render.RenderBatch(bi[j], _shader);
}
}
}
示例4: PosDrawPhase
public override void PosDrawPhase(GameTime gt, PloobsEngine.SceneControl.IObject obj, PloobsEngine.SceneControl.RenderHelper render, PloobsEngine.Cameras.ICamera cam, IList<PloobsEngine.Light.ILight> lights)
{
render.PushRasterizerState(cullMode);
render.PushBlendState(BlendState.NonPremultiplied);
alphagradative.Parameters["camCenter"].SetValue(cam.Position);
for (int i = 0; i < obj.Modelo.MeshNumber; i++)
{
BatchInformation[] bi = obj.Modelo.GetBatchInformation(i);
for (int j = 0; j < bi.Count(); j++)
{
alphagradative.Parameters["colorMap"].SetValue(obj.Modelo.getTexture(TextureType.DIFFUSE, i, j));
Matrix w1 = Matrix.Multiply(obj.WorldMatrix, bi[j].ModelLocalTransformation);
alphagradative.Parameters["wvp"].SetValue(w1 * cam.ViewProjection);
alphagradative.Parameters["w"].SetValue(w1);
render.RenderBatch(bi[j], alphagradative);
}
}
render.PopBlendState();
render.PopRasterizerState();
}