Forum FAQ

0684f9d33f52fa189aad7ac9e8c87510
0
baldurk 101 Aug 31, 2003 at 09:36

This thread will slowly grow to become the FAQ for the DirectX forum. Moderators and admins can edit this thread to add or remove or change questions and answers.

If you have a question which is not contained in this FAQ, feel free to post it in this forum and the moderators will add it to this FAQ if someone answers it properly.
The MSDN is the best resource for learning DirectX.

Questions:
1. Isn’t OpenGL better than DirectX?
2. What is/How do I implement a certain feature in DirectX or where can i find good resources on that topic ?
3. Is there a way to render a set of vertices without using vertex buffers (similar to how OpenGL does it)?
4. How do I draw a Sphere and other shapes in DirectX?


Q1: Isn’t OpenGL better than DirectX?

This is a question asked in many different forms. Sometimes not even a question. The simple answer is that neither is better overall. They have different features and parts, but neither is better or worse. You’ll need to find this out for yourself.

Q2: What is/How do I implement a certain feature in DirectX or where can i find good resources on that topic ?

The number one resource for you is google. Try finding information through google first. This might answer many questions you have much more complete than any of the people around here could do in one post. Also you learn much quicker if you find out about things yourself instead of asking for a ready solution. If you can’t find what you want you are of course encouraged to ask your DirectX related questions here. In fact, if you can’t find any resources about your topic on the web you might want to post a suggestion for a tutorial or an article here: Article & Tutorial Suggestions.
Because devmaster.net is trying to present original and unique content we always appreciate such suggestions.

Q3: Is there a way to render a set of vertices without using vertex buffers (similar to how OpenGL does it)?

Use this function:

HRESULT DrawPrimitiveUP(
    D3DPRIMITIVETYPE PrimitiveType,
    UINT PrimitiveCount,
    const void *pVertexStreamZeroData,
    UINT VertexStreamZeroStride
);

The ‘UP’ suffix at the end of the function stands for: User Pointer.

Q4: How do I draw a Sphere and other shapes in DirectX?

Use these functions:

D3DXCreateBox()
D3DXCreateCylinder()
D3DXCreateSphere()
D3DXCreateTorus()
D3DXCreateTeapot()

Check the MSDN for more function and for details.

Note that these functions use use DirectX’s mesh structure (D3DXMESH); if you don’t want to use that function, then you’ll have to generate the shape yourself by applying the an algorithm.

0 Replies

Please log in or register to post a reply.

No replies have been made yet.