本文整理汇总了C#中DemoGame.GetCurrentCamera方法的典型用法代码示例。如果您正苦于以下问题:C# DemoGame.GetCurrentCamera方法的具体用法?C# DemoGame.GetCurrentCamera怎么用?C# DemoGame.GetCurrentCamera使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DemoGame
的用法示例。
在下文中一共展示了DemoGame.GetCurrentCamera方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoDraw2
/// 描画処理
public override bool DoDraw2( DemoGame.GraphicsDevice graphDev ,Vector3 BasePos )
{
// useMdlHdl.Render( graphDev, baseMtx * Matrix4.Scale(new Vector3(0.15f, 0.15f, 0.15f)) );
// Matrix4 mtx = GetBoneMatrix( 2 );
// Common.VectorUtil.Set( ref BodyPos, mtx.M41, mtx.M42, mtx.M43 );
// boundingShape.SetMult( mtx );
var currentMatrix = CalcSpriteMatrix(graphDev.GetCurrentCamera().Pos ,BasePos);
var worldViewProj = graphDev.GetCurrentCamera().Projection * graphDev.GetCurrentCamera().View * currentMatrix;
spriteShader.SetUniformValue(0, ref worldViewProj);
graphDev.Graphics.SetShaderProgram(spriteShader);
graphDev.Graphics.SetVertexBuffer(0, vertices);
graphDev.Graphics.SetTexture(0, StaticDataList.textureUnified);
// graphDev.Graphics.Enable(EnableMode.Blend);
// graphDev.Graphics.SetBlendFunc(BlendFuncMode.Add, BlendFuncFactor.SrcAlpha, BlendFuncFactor.OneMinusSrcAlpha);
graphDev.Graphics.Disable(EnableMode.DepthTest);
graphDev.Graphics.Enable(EnableMode.CullFace);
graphDev.Graphics.SetCullFace(CullFaceMode.Back, CullFaceDirection.Ccw);
graphDev.Graphics.DrawArrays(DrawMode.TriangleFan, 0, 4);
return true;
}
示例2: Draw
/// 描画
public override bool Draw( DemoGame.GraphicsDevice graphDev )
{
if( objMark.TypeId == 0 ){
SetBillboardMatrix( graphDev.GetCurrentCamera() );
}
else{
SetBillboardMatrixY( graphDev.GetCurrentCamera() );
}
objMark.Draw( graphDev );
return true;
}
示例3: DoDraw
/// 描画処理
public override bool DoDraw( DemoGame.GraphicsDevice graphDev )
{
if( billFlg == true ){
SetBillboardMatrix( graphDev.GetCurrentCamera() );
}
else if( billYFlg == true ){
SetBillboardMatrixY( graphDev.GetCurrentCamera() );
}
objEff.Draw( graphDev );
return true;
}
示例4: DoDraw2
/// 描画処理
public override bool DoDraw2( DemoGame.GraphicsDevice graphDev ,Vector3 BasePos )
{
CalcSpriteMatrix(graphDev.GetCurrentCamera().Pos ,BasePos);
ctrlResMgr.SetSpriteData(BasePos,rotation,uvPos,uvSize,texSize);
return true;
}
示例5: DoDraw2
/// 描画処理
public override bool DoDraw2( DemoGame.GraphicsDevice graphDev ,Vector3 BasePos )
{
var currentMatrix = CalcSpriteMatrix(graphDev.GetCurrentCamera().Pos ,BasePos);
var worldViewProj = graphDev.GetCurrentCamera().Projection * graphDev.GetCurrentCamera().View * currentMatrix;
spriteShader.SetUniformValue(0, ref worldViewProj);
graphDev.Graphics.SetShaderProgram(spriteShader);
graphDev.Graphics.SetVertexBuffer(0, vertices);
graphDev.Graphics.SetTexture(0, StaticDataList.textureUnified);
graphDev.Graphics.Enable(EnableMode.CullFace);
graphDev.Graphics.SetCullFace(CullFaceMode.None, CullFaceDirection.Ccw);
graphDev.Graphics.Disable(EnableMode.DepthTest);
graphDev.Graphics.DrawArrays(DrawMode.TriangleFan, 0, 4);
return true;
}
示例6: Draw
/// デバック用
///---------------------------------------------------------------------------
/// デバック用:描画
public void Draw( DemoGame.GraphicsDevice graphDev, Rgba color )
{
DemoGame.RenderGeometry drawTri = new DemoGame.RenderGeometry();
drawTri.MakeTriangle();
DemoGame.Camera camera = graphDev.GetCurrentCamera();
for( int i=0; i<EntryNum; i++ ){
drawTri.DrawTriangle( graphDev.Graphics, Triangle[i], camera, color );
}
drawTri = null;
}
示例7: DoDraw2
/// 描画処理
public override bool DoDraw2( DemoGame.GraphicsDevice graphDev ,Vector3 BasePos )
{
var currentMatrix = CalcSpriteMatrix(graphDev.GetCurrentCamera().Pos ,BasePos);
var worldViewProj = graphDev.GetCurrentCamera().Projection * graphDev.GetCurrentCamera().View * currentMatrix;
spriteShader.SetUniformValue(0, ref worldViewProj);
graphDev.Graphics.SetShaderProgram(spriteShader);
graphDev.Graphics.SetVertexBuffer(0, vertices);
graphDev.Graphics.SetTexture(0, StaticDataList.textureUnified);
graphDev.Graphics.Enable(EnableMode.CullFace);
graphDev.Graphics.SetCullFace(CullFaceMode.Front, CullFaceDirection.Ccw);
graphDev.Graphics.Disable(EnableMode.DepthTest);
graphDev.Graphics.DrawArrays(DrawMode.TriangleFan, 0, 4);
if(TexIdForText < 3){
if(appearCount == (int)Data.SetupValue.AppearAndLeaveTime && deadflag2 == false){
ObjTex.changeText();
}
ObjTex.Draw2(graphDev, BasePos);
}
return true;
}
示例8: Draw
/// private メソッド
///---------------------------------------------------------------------------
/// デバック用
///---------------------------------------------------------------------------
/// デバック用:描画
public void Draw( DemoGame.GraphicsDevice graphDev, int hitIdx, Rgba color1, Rgba color2 )
{
DemoGame.RenderGeometry drawSph = new DemoGame.RenderGeometry();
drawSph.MakeCapsule();
DemoGame.Camera camera = graphDev.GetCurrentCamera();
if( hitIdx < 0 ){
drawSph.DrawCapsule( graphDev.Graphics, this.Capsule, camera, color1 );
}
else{
drawSph.DrawCapsule( graphDev.Graphics, this.Capsule, camera, color2 );
}
drawSph = null;
}
示例9: RenderNoAnim
/// 描画(事前にモデルにアニメーションをセット)
public bool RenderNoAnim( DemoGame.GraphicsDevice graphDev, Matrix4 matrix )
{
useModel.WorldMatrix = matrix;
useModel.Update();
useModel.Draw( graphDev.Graphics, useShaderCnr, graphDev.GetCurrentCamera().ViewProjection, eyeVec , 1.0f);
return true;
}
示例10: Render
/// 通常描画(描画時にモデルにアニメーションをセット)
public bool Render( DemoGame.GraphicsDevice graphDev, Matrix4 matrix, float Brightness)
{
useModel.WorldMatrix = matrix;
if( animPlayId >= 0 ){
useModel.SetAnimFrame( animPlayId, animPlayTime );
}
useModel.Update();
useModel.Draw( graphDev.Graphics, useShaderCnr, graphDev.GetCurrentCamera().ViewProjection, eyeVec ,Brightness);
return true;
}
示例11: DrawSprites
internal void DrawSprites(DemoGame.GraphicsDevice graphDev)
{
FrameBuffer fbuffer = graphicsContext.GetFrameBuffer() ;
// Matrix4 projection = Matrix4.Ortho( 0, fbuffer.Width, fbuffer.Height, 0, -100.0f, 100.0f ) ;
float aspect = graphicsContext.Screen.AspectRatio;
float fov = FMath.Radians(45.0f);
Matrix4 projection = graphDev.GetCurrentCamera().ViewProjection;
// graphicsContext.Enable( EnableMode.Blend ) ;
graphDev.Graphics.Enable(EnableMode.CullFace);
graphDev.Graphics.SetCullFace(CullFaceMode.None, CullFaceDirection.Ccw);
graphDev.Graphics.Disable(EnableMode.DepthTest);
graphicsContext.SetVertexBuffer( 0, vertexBuffer ) ;
for ( var sprite = drawList ; sprite != null ; sprite = sprite.drawNext ) {
var material = sprite.Material ;
graphicsContext.SetShaderProgram( material.ShaderProgram ) ;
material.ShaderProgram.SetUniformValue( 0, ref projection ) ;
graphicsContext.SetBlendFunc( material.BlendFunc ) ;
graphicsContext.SetTexture( 0, material.Texture ) ;
int next = ( sprite.drawNext == null ) ? indexCount : sprite.drawNext.indexID ;
graphicsContext.DrawArrays( DrawMode.Triangles, sprite.indexID, next - sprite.indexID ) ;
}
}