REspawn

Members
  • Content count

    164
  • Joined

  • Last visited

Community Reputation

144 Neutral

About REspawn

  • Rank
    Member
  1. Stand alone conversion tool seems like the best and most fun way to do this. I'll update this thread when I put the code up somewhere. Thanks for all the help.
  2. Thanks for the replies. Yep, this is just for a tool / my own education, so I don't mind the extra processing step.   @MJP - Yea that's what I thought too, but the channels are switched. So I'll need to switch them.   So from doing some reading and testing, looks like the best option is read the data from the file into a buffer, create my texture, lock the rect and then switch the channels as needed. I can't seem to find anything here or on Google that suggests a better way.  It produces the correct texture data and it's not too slow. Is there a better way?   Thanks, Dave
  3. Thanks for the replies.   When I say non standard I mean that it's not in the D3DFORMAT enum, so I can create a texture in that format and then memcpy the data in.   So for example one of the formats the game stores it's files in is ABGR8888. In the D3DFORMAT enum there is D3DFMT_A8R8G8B8.  So would the best way to read this texture in be to create a D3DFMT_A8R8G8B8 texture, lock the texture and manually copy in each pixel of data? Or is there a better / faster way to go from one format to another?   Hope that makes it easier to understand my question.    Thanks, Dave
  4. Hi,   I'm writing a texture loader for game files for my own education and fun. The game has some texture formats that are not standard for DirectX. I'm wondering what's the best way to load them for rendering as a texture?   Any advice or help would be great. Thanks, Dave
  5. [quote name='MJP' timestamp='1304830130' post='4807942'] You can do it however you want, using whatever library you want. GDI+ can do it very easily, or you can use ImageMagick, or you can use D3DX helper functions. You can use D3DXCreateTextureFromFileEx and specify the thumbnail size and it will scale it down for you, or you can use D3DXLoadSurfaceFromSurface to scale down an existing texture. Or if you generated mipmaps for your texture, you can just grab the surface from a lower mip level and use D3DXSaveSurfaceToFile. [/quote] Thanks, I'll check those functions out and see if I can get something working. Update: Both methods worked perfectly. I went with D3DXLoadSurfaceFromSurface in the end. Thanks again for the help.
  6. Thanks aqrit, I'll check them out.
  7. Hi all, I have been searching around for tutorials / docs on scaling textures. Is the only way to scale a texture to use render targets? I'd like to create small thumbnails of textures to save out as a JPG. Is there an easy way to achieve this without render targets? Thanks for any help, Dave
  8. [quote name='Steno' timestamp='1303965442' post='4803841'] [quote name='REspawn' timestamp='1303942651' post='4803738'] Thanks for the reply guys. My end goal would be in the debug build to log all arguments passed into a function. For profiling purposes. [/quote] Why wouldn't normal logging of the parameters work here? Even with extreme templatization, most logging procedures should do the trick. [/quote] It would. I was just researching to see if there was a nice macro / template way to do this. So all you had to do was stick macro at the top of each function and it would work regardless of the number of arguments.
  9. Thanks for the reply guys. My end goal would be in the debug build to log all arguments passed into a function. For profiling purposes.
  10. Hi, Does anyone know of a macro or easy way to loop through a functions arguments in C++? I'm not talking about variable arguments, just the normal fixed ones. Thanks for any help, Dave
  11. Getting fourth plane point from known three

    That makes far more sense, thanks.
  12. Hi, I am trying to create a mesh to render a place, but the plane is stored in three vectors. I have been looking at documents on using the cross product and other techniques to find the normal and the distance of the plane but I can't seem to find anything about the fourth point so I can create the mesh or am I missing something fundamental to storing a plane like this. Thanks for any help.
  13. Volume texture example

    will check it out, thanks
  14. Can't find a DirectX based volume texture rendering code samle, language is not important, anyone know of one? Thanks
  15. Wow luca not only did you explain that perfectly but you provided sample code. Thanks! rating++;