public new void Draw() { Sprite.BasicEffect.View = Matrix.CreateScale(scaleModel) * Matrix.CreateBillboard(position, Camara.Position, Vector3.Up, Camara.ForwardVector) * Matrix.CreateRotationY(Helper.DegreeToRad(angle)) * Camara.View; DxHelper.DrawSquare(textureID); Sprite.BasicEffect.View = Camara.View; }
public new void Draw() { Sprite.BasicEffect.View = Matrix.CreateScale(4) * Matrix.CreateBillboard(position, Camara.Position, Vector3.Up, Camara.ForwardVector) * Camara.View; DxHelper.DrawSquare(textureID); Sprite.BasicEffect.Alpha = lightIntensity; Sprite.BasicEffect.View = Matrix.CreateTranslation(0, 0, -1) * Sprite.BasicEffect.View; Sprite.BasicEffect.View = Matrix.CreateScale(4) * Sprite.BasicEffect.View; DxHelper.DrawSquare(sunGlow); Sprite.BasicEffect.Alpha = 1; //Gl.glDisable(//Gl.GL_FOG); //Gl.glPushMatrix(); //Gl.glBlendFunc(//Gl.GL_SRC_ALPHA, //Gl.GL_ONE_MINUS_SRC_ALPHA); //Gl.glEnable(//Gl.GL_TEXTURE_2D); //Gl.glEnable(//Gl.GL_BLEND); //Gl.glTranslatef(position.X, position.Y, position.Z); //Gl.glRotatef(-Camara.Yaw, 0, 1, 0); //Gl.glRotatef(-Camara.Pitch, 1, 0, 0); //Gl.glScalef(12, 12, 1); //Gl.glColor4f(1, 1, 1, lightIntensity); //Gl.glBindTexture(//Gl.GL_TEXTURE_2D, sunGlow); //Gl.glCallList(initList); //Gl.glColor4f(1, 1, 1, 1); //Gl.glBindTexture(//Gl.GL_TEXTURE_2D, textureID); //Gl.glScalef(0.22f, 0.22f, 1); //Gl.glCallList(initList); //Gl.glDisable(//Gl.GL_BLEND); //Gl.glPopMatrix(); //Gl.glEnable(//Gl.GL_FOG); }