Jump to content
  • Advertisement

Captain Logic

  • Content Count

  • Joined

  • Last visited

Community Reputation

121 Neutral

About Captain Logic

  • Rank
  1. Captain Logic

    Using DXUT as a framework

    Quote:Original post by jollyjeffers Yes, it can be used for more than just samples - I tend to use it as the basis of almost everything I create as I simply can't be bothered with the low-level plumbing each time [smile] Cool, that's good enough for me. I'm using the Oct 05 SDK, I assume DXUT hasn't changed since then? I looked at the latest MSDN and they had the same old tutorial, so I assume not.
  2. Captain Logic

    Using DXUT as a framework

    Quote:Original post by Big_Bear_Scot If can pick up a copy of Game Code Complete, Mike McShaffery uses DXUT as a basis for the book. It might help you to see a practical usage of DXUT. I have the book :-) I eventually managed to get his teapot wars to compile, but it was atrocious quality. The book itself is good though. I'll take another look at DXUT then and see how it goes.
  3. It seems the DXUT sample framework from the SDK contains a lot of useful functionality like device enumeration, cameras, GUI, timing etc. Is it suitable for production use, i.e. is it bugproof enough to use as a basis for my rendering system?
  4. Captain Logic

    New to 3D - Lots of questions

    Quote:Original post by Mythics So, I should simply have 1 buffer per texture, and different start/end positions if 2+ vertices differ in how they should be transformed? Well, it's actually start and primitive count. So for example you would fill your buffer with the primitives that make up your scene. Say, a sphere and a cube. The sphere might consist of 100 triangles and the cube 12. Using this buffer you might want to display two spheres with different textures and 3 cubes. For the two spheres you issue two identical DrawPrimitive calls, but before each you set the world transform and texture appropriately. Same for the 3 cubes. // Draw sphere DrawPrimitive(D3DPT_TRIANGLELIST, 0, 100) //Draw cube DrawPrimitive(D3DPT_TRIANGLELIST, 300, 12) The DP call just sends the vertices to the GPU and it gets transformed using the current world transform and textured with the current texture.
  5. Captain Logic

    Rendering a small ship in a big solar system...

    I don't think Elite worked on that sort of scale! Are you suggesting you want to show your ship and the sun to scale next to each other?
  6. Captain Logic

    Rendering Saturn's Rings

    The textures are from http://planetpixelemporium.com/saturn.html antber - the textures are rectangular, not circular. I have code for texture mapping the planet sphere itself using spherical coords. Maybe I could just modify that for the rings. Trouble is I suck at geometry!
  7. Captain Logic

    Rendering Saturn's Rings

    Quote:Original post by razorjack A more easier way is to use a pixel shader. Ah - I should have mentioned I'm only a beginner in D3D, and have only used the fixed-function pipeline. Could I do the same thing using the FFP?
  8. Captain Logic

    New to 3D - Lots of questions

    Quote:Original post by Mythics Question 2. When rotating, scaling, or translating... what is the best way to do these without having to render objects individually? If I have two cubes for example, and I want to move one to the right a little more than the other, should I be loading up the vertices based on the positioning or should I be rendering each object separately so I can translate the cubes separately? Perhaps there's a different way altogether I should be attempting this? Question 3. I know that I should be rendering a vertex buffer per texture, but is that the only limiting factor? If only one texture was used, I could potentially fill a single buffer with tons of vertices and have only one real render process, correct? (well, outside of the translating issue in 2.) 2: The two cubes should have identical vertex data. You just change the world transform for each cube in between the two DrawPrimitive calls. In psuedocode: SetWorldTransform for cube1 DrawPrimitive(vertexbuffer(cube)) SetWorldTransform for cube2 DrawPrimitive(vertexbuffer(cube)) 3: Yes, one texture and you use different text coords for your primitives. So each primitive maps to a it's own bit of the big texture. You still need multiple DrawPrimitive calls but you use one buffer and just specify different start and end positions.
  9. I'm making a solar system simulator in D3D, and I'm wondering what's the easiest way to model Saturn's rings? It doesn't need to be hyper-realistic, a flat ring texture will do, with alpha transparancy for the gaps between the rings. I already have the texture and alpha map as 2D bitmaps. How would I model the ring in D3D? A 2D doughnut would do, but how would I specify the u,v texture coords?
  10. Captain Logic

    I need help with this gamecore

    It's not really good etiquette to dump all your debug spew in a post. You should at least just show us the errors, not the warnings. Anyway, one that immediately popped up was: 'D3DXCreateFontIndirectA' : cannot convert parameter 2 from 'LOGFONT *__w64 ' to 'const D3DXFONT_DESCA *' The code is using LOGFONT but the API is expecting D3DXFONT_DESC. D3DXFONT_DESC was used in D3DXCreateFontIndirect from DX 9.0b I think. To me that implies you are still not using the DX SDK that came with the book, assuming the book code was actually tested with the the SDK that came with it (books are notoriously bad at providing working code). Did you uninstall the previous SDK first?
  11. Captain Logic

    New to DX, SDK Tutorial Questions

    When you specify "rhw" you are telling D3D that your vertices are already transformed into 2D screen coords. Therefore the values in the vertices[] array represent screen coords. So x=150, y=50 etc. The z coord is ignored. It's an easy way to get 2D stuff on the screen without worrying about matrices and tranforms.
  12. Captain Logic

    Noob question re multiple vertex buffers

    Whenever I try the first method (single vertex buffer) I only get one triangle on the screen if I do 5 transforms, the render is at the location of the final transform. I don't get 5 images on the screen. This is what i'm doing (pseudo-code) in my render method: Clearscreen() BeginScene() SetFVF(...) SetStream(...) // use the vertexbuffer // Draw tri 1 D3DMatrixTranslation(...) // translate 2 units to the right SetTransform() // world transform DrawPrimitive(triangle ,0, 1) // Draw tri 2 D3DMatrixTranslation(...) // translate 4 units to the right SetTransform() DrawPrimitive(triangle ,0, 1) // repeat above 3 lines for 3 more tris, each translation 2 units further on Present(...) EndScene() Only the final transform is rendered. How do I get all 5 triangles to render at the 5 different translations?
  13. Captain Logic

    DX9 lib

    You need to include the D3DX dll for the version of DX9 that you used to create your app, eg d3dx9_27.dll for the Aug '05 release. Do a search on this forum for more info. If you can get an earlier version of the DX9 SDK from before Feb '05 then the lib is statically compiled and you don't need to distribute it.
  14. Just starting with D3D and trying to get my head around the "correct" way to do things. Say I have a vertex buffer with 3 vertices representing a triangle, and I want to render 5 copies of this triangle on the screen in different locations (translations). Can I do a DrawPrimitive 5 times with 5 different world transformations with the same vertex buffer? Or do I need 5 different vertex buffers, one for each triangle, even though the vertex coords will be identical?
  15. Quote:Original post by Evil Steve The reason you're not allowed to distribute the DLL with your application is that if you did, you might overwrite a patched version of the DLL, undoing the security fix. That's why you need to use the DirectX redistributable - it checks that you're not trying to overwrite a newer version. But if you put the DXLIB DLL in the same folder as your exe then you are not going to overwrite any other DLLs are you? Doesn't the app look in it's own dir first rather than system32?
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!