Textures

Started by
3 comments, last by seamal 14 years, 6 months ago
Im learning DirectX10 Ive run through a few ways of loading a texture, like a background image or a sprite sheet but they all seem very different, which is fairly irritating, all are using D3DX10CreateShaderResourceViewFromFile which i get some are using ID3D10ShaderResourceView* ID3DX10Sprite* but tbh im not really getting the process from all these mixed and over complicated ways, im having to plow through 20 odd files just to find the bit that loads the thing, does anyone know of a simple straight forward tutorial on how to load a image or texture with not hassle or fuss regards Seamal
Advertisement
What do you find complicated about D3DX10CreateShaderResourceViewFromFile? And Tutorial 7 in the SDK should be quite a simple example.
its not so much the D3DX10CreateShaderResourceViewFromFile, its more that in DX9 it was so sime to load a texture straight in, now its got all these effect files, and resourceviews that no one seems to explain properly.

and as far as tutorial 7 goes, i must admit i didnt see that one, but ontop of that its confused the issue with mapping onto an image plain, exactly what i was talking about when i said its mixed it up with extra stuff. I was looking for a straight forward load an image, without the whole rotating cubes and fancy effects
Views are new to D3D10. In D3D9 you could create a texture and you then used it or its surface as a texture / render target. In D3D10 you can't set a texture to anything. You need to create a shader resource view to access it in a shader, and you need a render target view to render into it.

Regarding effect files, you don't have to use them (you can create shaders in code), but they're convenient. I'd suggest that you look in the docs at Direct3D 9 \ Programming Guide \ Effects. Try to use them in D3D9 first, since you're familiar with it, then you'd be able to adapt to their use in 10 more easily (they are a little different, but not much).
thnx for the update, since they rebuilt the whole thing from the ground up im not sure whether they have made it easier lol, seems to me that they have made it 20 times more complicated

This topic is closed to new replies.

Advertisement