Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Graphics in C# how do i write a software base gaphic out of this:

Graphics in C# how do i write a software base gaphic out of this:

Scheduled Pinned Locked Moved C#
csharpgraphicsgame-devtutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MMaines2005
    wrote on last edited by
    #1

    I found a way to write my game in c#, but it using 3d graphics. XP and voodoo3 don't agree with each other. So i need to know how to change this so i can use software or change it to full screen when it opens: namespace WindowsGame1 { class Engine : Microsoft.Xna.Framework.Game { Microsoft.Xna.Framework.GraphicsDeviceManager Graphics; Microsoft.Xna.Framework.Content.ContentManager Content; Microsoft.Xna.Framework.Graphics.Texture2D mytext; Microsoft.Xna.Framework.Graphics.SpriteBatch SpriteBatch; Microsoft.Xna.Framework.Vector2 Spritepos; public Engine() { this.Graphics = new Microsoft.Xna.Framework.GraphicsDeviceManager(this); this.Content = new Microsoft.Xna.Framework.Content.ContentManager(this.Services); } protected override void Initialize() { this.Spritepos = new Microsoft.Xna.Framework.Vector2(100f, 50f); base.Initialize(); } protected override void LoadGraphicsContent(bool loadAllContent) { if (loadAllContent) { this.mytext = this.Content.Load(@"new\text\Mike1"); this.SpriteBatch = new Microsoft.Xna.Framework.Graphics.SpriteBatch(this.Graphics.GraphicsDevice); } } protected override void UnloadGraphicsContent(bool unloadAllContent) { if (unloadAllContent) { this.Content.Unload(); } } protected override void Update(Microsoft.Xna.Framework.GameTime gameTime) { base.Update(gameTime); } protected override void Draw(Microsoft.Xna.Framework.GameTime gameTime) { this.Graphics.GraphicsDevice.Clear(Microsoft.Xna.Framework.Graphics.Color.Black); this.SpriteBatch.Begin(Microsoft.Xna.Framework.Graphics.SpriteBlendMode.AlphaBlend); this.SpriteBatch.Draw(this.mytext, this.Spritepos, Microsoft.Xna.Framework.Graphics.Color.White); this.SpriteBatch.End(); base.Draw(gameTime); } } }

    Michael (Up and coming Game programmer) EST

    P 1 Reply Last reply
    0
    • M MMaines2005

      I found a way to write my game in c#, but it using 3d graphics. XP and voodoo3 don't agree with each other. So i need to know how to change this so i can use software or change it to full screen when it opens: namespace WindowsGame1 { class Engine : Microsoft.Xna.Framework.Game { Microsoft.Xna.Framework.GraphicsDeviceManager Graphics; Microsoft.Xna.Framework.Content.ContentManager Content; Microsoft.Xna.Framework.Graphics.Texture2D mytext; Microsoft.Xna.Framework.Graphics.SpriteBatch SpriteBatch; Microsoft.Xna.Framework.Vector2 Spritepos; public Engine() { this.Graphics = new Microsoft.Xna.Framework.GraphicsDeviceManager(this); this.Content = new Microsoft.Xna.Framework.Content.ContentManager(this.Services); } protected override void Initialize() { this.Spritepos = new Microsoft.Xna.Framework.Vector2(100f, 50f); base.Initialize(); } protected override void LoadGraphicsContent(bool loadAllContent) { if (loadAllContent) { this.mytext = this.Content.Load(@"new\text\Mike1"); this.SpriteBatch = new Microsoft.Xna.Framework.Graphics.SpriteBatch(this.Graphics.GraphicsDevice); } } protected override void UnloadGraphicsContent(bool unloadAllContent) { if (unloadAllContent) { this.Content.Unload(); } } protected override void Update(Microsoft.Xna.Framework.GameTime gameTime) { base.Update(gameTime); } protected override void Draw(Microsoft.Xna.Framework.GameTime gameTime) { this.Graphics.GraphicsDevice.Clear(Microsoft.Xna.Framework.Graphics.Color.Black); this.SpriteBatch.Begin(Microsoft.Xna.Framework.Graphics.SpriteBlendMode.AlphaBlend); this.SpriteBatch.Draw(this.mytext, this.Spritepos, Microsoft.Xna.Framework.Graphics.Color.White); this.SpriteBatch.End(); base.Draw(gameTime); } } }

      Michael (Up and coming Game programmer) EST

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      What? What are you asking here? I'm sorry, but I read and reread your post and I still don't know what the question really is? Are you asking how to get the code to run in full screen mode when it's running? If so, the graphics device has a property called IsFullScreen. Set it to true.

      Deja View - the feeling that you've seen this post before.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups