Skip to main content
GameDev.net gamedev.net
🔒 Locked

Tiny question about DX9

Started by vincent_valentine Jul 9, 2004 at 10:34 AM 2 replies 650+ views
Original Post
vincent_valentine
vincent_valentine
Thanks to the community, my previous questions were solved. But now all the small things are coming up filling my head: (DX9) 1. What are the basic step to draw text in D3D? 2. I set the Cooperative level for keyboard in DInput, but nothing works except this: DISCL_BACKGROUND | DISCL_NONEXCLUSIVE. Why so? 3. What is RHW? How can I change from relative positions to respective positions? Can matrices be applied in RHW mode? 4. Can the "root" point (0;0;0) be changed from staying in the center of the window? 5. How do I render objects with low opacity (semi-transparent)? 6. How can I draw the rays Ox, Oy, Oz so that they remain crossing the window when user zooms in or out? 7. How do I load bitmaps to use as background or 2d object? I know it's long. But please answer, just a single will do. Thanks/
:: Try not. Do. Or do not. There is no try. :: (Yoda)http://80.100.152.172/nguyenkhanhduy
Fidelio66
Fidelio66
1. To draw text: create a device and create a font interface (ID3DXFont in C++, Direct3D.Font in C#). Then in between device->Begin() and device->End() calls call myfont->DrawText(). You can specify null for the sprite argument.

2. Not all combinations work. Background and nonexclusive works, and foreground and exclusive. But not background/exclusive or foreground/nonexclusive. Check the help file.

3. The pipeline multiplies 3D positions with the matrices to get screen-space coordinates. Those are the RWH's. If you use RWH's, they are assumed to be transformed already and don't use matrices.

4. Yes, it's one of the three matrices that defines the camera and lookat point.

5. Either use textures with alpha or set a material that has an alpha factor.

6. Probably using the ID3DXLine interface ?

7. The best way is to load them and to draw them using the ID3DXSprite interface.
Wicked Ewok
Wicked Ewok
I thought ID3DXFont was slow. Actually I've used it before and confirmed it running performance tests when I was still using DX8. Not sure if they fixed optimized it any since then, but I would use my own font class, create a dynamic VB for fonts, add polygons of fonts, render after you render the scene.
-=~''^''~=-.,Wicked,.-=~''^''~=-
Sr_Guapo
Sr_Guapo
Quote:
I thought ID3DXFont was slow. Actually I've used it before and confirmed it running performance tests when I was still using DX8. Not sure if they fixed optimized it any since then, but I would use my own font class, create a dynamic VB for fonts, add polygons of fonts, render after you render the scene.


The DX9 summer update 2003 (9.0b) fixed this problem. It is now much faster than the previous DX9 release.
Sean Henley [C++ Tutor]Rensselaer Polytechnic Institute

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.