1 texture, many tiles?

Started by
13 comments, last by CheapBastard 20 years, 10 months ago
there is a good tutorial about using transparencies with d3d at www.directx4vb.com. the tutoial is for VisualBasic developers but the dx calls and the theory are the same for c++ as well. the tutorial is under the tutorials/directx8/graphics section
Advertisement
quite a good tutorial, albeit for VB, not for C++ (guess i should have specific that).

But my transparancy works fine, great, not even the slightest prob there.

What i want to do is just take a certain area from the texture (aka, not the entire texture) and copy it onto the backbuffer.

If only I knew now what I knew not tomorrow...
If only I knew now what I knew not tomorrow...
You could also use a predetermined color to represent transparent sections in a 24-bit file. Then, at load time, you can convert the raw data into an appropriate format. After all, you''re probably not planning to use the entirety of those extra 8-bits for each pixel.

______________________________________________________________
The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ
MySite
______________________________________________________________
______________________________________________________________________________________The Phoenix shall arise from the ashes... ThunderHawk -- ¦þ"So. Any n00bs need some pointers? I have a std::vector<n00b*> right here..." - ZahlmanMySite | Forum FAQ | File Formats______________________________________________________________________________________
RGB: 0,0,0 (pure black) has been selected for transparancy, and i was planning on using more than 16bit color...
Like i mentioned before, the transparency works great, awesome even.

What i want to do is just take a certain area from the texture (aka, not the entire texture) and copy it onto the backbuffer.

If only I knew now what I knew not tomorrow...
If only I knew now what I knew not tomorrow...
what you have to do is adjust the texture coordinates of the quad''s verts, depending upon which piece of the texture you want rendered for the next drawprimitive call. you can do this by either mucking with the vertex data directly or by using a texture transformation via setrenderstate calls.

This topic is closed to new replies.

Advertisement