Some questions
-
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?
-
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?
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
-
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
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.