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. Graphics
  4. Some questions

Some questions

Scheduled Pinned Locked Moved Graphics
graphicscsharpwpfgame-devhelp
3 Posts 2 Posters 3 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
    Mountainking02
    wrote on last edited by
    #1

    Hi, i have seen, that WPF is not the way to go for my app due to performace limitations, so i will use DirectX directly instead. But: 1.) Is it a problem to render different FontFamilies? 2.) Direct2D uses geometries wich can be combined. Can i resolve this function in Direct3D easily, too? 3.) What about printing (the printout is bigger as the visual part on the screen). Can i render the hole scene to a huge bitmap for example, which i can print?

    A 1 Reply Last reply
    0
    • M Mountainking02

      Hi, i have seen, that WPF is not the way to go for my app due to performace limitations, so i will use DirectX directly instead. But: 1.) Is it a problem to render different FontFamilies? 2.) Direct2D uses geometries wich can be combined. Can i resolve this function in Direct3D easily, too? 3.) What about printing (the printout is bigger as the visual part on the screen). Can i render the hole scene to a huge bitmap for example, which i can print?

      A Offline
      A Offline
      Anthony Mushrow
      wrote on last edited by
      #2

      If you're using C# then you won't actually have to use DirectX directly (I don't even think you can anymore), you'll be able to use XNA which is much simpler to use and is a lot quicker to set up. I've not used XNA a whole lot but I do remember that everything was fairly simple, including rendering images and text and whatnot. Although I have worked with Direct3D a fair bit, so you may have a slighty tougher time. It would be well worth your time to take a quick look at some XNA tutorials, it won't take you long to get something up and running and you'll be able to make an informed decision on whether or not you really want to be using XNA / DirectX. http://www.riemers.net/[^] Has an excellent set of tutorials that would cover almost anything you might want. The only thing I'm not to sure of is printing anything you render, but I imagine it's fairly trivial to render to a bitmap. If you really want to use Direct3D with C++ then...

      Mountainking02 wrote:

      1.) Is it a problem to render different FontFamilies?

      Rendering text in Direct3D is actually incredibly simple, as long as the font is on the machine DirectX will pretty much sort it all out for you:

      LPD3DXFONT myFont;
      D3DXCreateFont(..., &myFont) //Takes all of the params such as italic, bold, font etc and fills in a pointer to a font
      myFont->DrawText(...);

      You should set up any fonts you may want to use when the application starts then re-use them until the your application closes (at which point you should release them)

      Mountainking02 wrote:

      2.) Direct2D uses geometries wich can be combined. Can i resolve this function in Direct3D easily, too?

      I'm not sure, I've never used Direct2D or DirectDraw, all I know is that everything in Direct3D is done with vertices. If you want a square you'll need to set up 4 vertices that make a square (more precisely, you'll need to make two triangles out of the 4 vertices which will make up your square)

      Mountainking02 wrote:

      3.) What about printing (the printout is bigger as the visual part on the screen). Can i render the hole scene to a huge bitmap for example, which i can print?

      I'm not sure if you can use any DirectX stuff to print directly, but for certain you can render to a Texture and then copy the da

      M 1 Reply Last reply
      0
      • A Anthony Mushrow

        If you're using C# then you won't actually have to use DirectX directly (I don't even think you can anymore), you'll be able to use XNA which is much simpler to use and is a lot quicker to set up. I've not used XNA a whole lot but I do remember that everything was fairly simple, including rendering images and text and whatnot. Although I have worked with Direct3D a fair bit, so you may have a slighty tougher time. It would be well worth your time to take a quick look at some XNA tutorials, it won't take you long to get something up and running and you'll be able to make an informed decision on whether or not you really want to be using XNA / DirectX. http://www.riemers.net/[^] Has an excellent set of tutorials that would cover almost anything you might want. The only thing I'm not to sure of is printing anything you render, but I imagine it's fairly trivial to render to a bitmap. If you really want to use Direct3D with C++ then...

        Mountainking02 wrote:

        1.) Is it a problem to render different FontFamilies?

        Rendering text in Direct3D is actually incredibly simple, as long as the font is on the machine DirectX will pretty much sort it all out for you:

        LPD3DXFONT myFont;
        D3DXCreateFont(..., &myFont) //Takes all of the params such as italic, bold, font etc and fills in a pointer to a font
        myFont->DrawText(...);

        You should set up any fonts you may want to use when the application starts then re-use them until the your application closes (at which point you should release them)

        Mountainking02 wrote:

        2.) Direct2D uses geometries wich can be combined. Can i resolve this function in Direct3D easily, too?

        I'm not sure, I've never used Direct2D or DirectDraw, all I know is that everything in Direct3D is done with vertices. If you want a square you'll need to set up 4 vertices that make a square (more precisely, you'll need to make two triangles out of the 4 vertices which will make up your square)

        Mountainking02 wrote:

        3.) What about printing (the printout is bigger as the visual part on the screen). Can i render the hole scene to a huge bitmap for example, which i can print?

        I'm not sure if you can use any DirectX stuff to print directly, but for certain you can render to a Texture and then copy the da

        M Offline
        M Offline
        Mountainking02
        wrote on last edited by
        #3

        Thanks for your reply. Is there the possibility to change for example the Dash/PenLineCaps of an Line (LPD3DXLINE) rendered with Direct3D? I can set the Dashstyle, but i think thats all. Perhaps I should write my own code to create shapes/geometries.

        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