markbiddlecom
Member
Well, here I am with yet another question (who knows, maybe someday Ill know enough to answer other peoples questions):
In my 3D mapping program, I give the user an option to spread a texture across the maps surface. The kind of textures available vary, but theres all sorts of good aerial and satellite imagery we want to support.
But, there are also alot of files out there known as Digital Line Graphs (DLG) which are essentially vector image files. I want to allow the users to be able to plot those, too. My approach has been to create a bitmap in memory and render the contents of the DLGs into the bitmap.
What I need to be able to do is first apply the texture and then overlay the DLG texture with a transparent color.
Im using the regular texture as Stage 0 with all the defaults, and I tried to use the DLG overlay in stage 1 with the defaults. That didnt work, so I changed Device.TextureState(1).ColorOperation to SelectArg1, and set ColorArgument0 to TextureColor.
That let me draw the image, but it didnt preserve any of the lighting calculations on the vertex colors, and of course it wasnt transparent.
So far, I havent figured the transparency thing out.
So, what Im asking, is how can I do this? Is there something Im missing? Im trying to figure out what all of the ColorOperation flags mean, but, as we all know, the managed documentation is scarce at best.
Thanks (again) in advance,
Mark
In my 3D mapping program, I give the user an option to spread a texture across the maps surface. The kind of textures available vary, but theres all sorts of good aerial and satellite imagery we want to support.
But, there are also alot of files out there known as Digital Line Graphs (DLG) which are essentially vector image files. I want to allow the users to be able to plot those, too. My approach has been to create a bitmap in memory and render the contents of the DLGs into the bitmap.
What I need to be able to do is first apply the texture and then overlay the DLG texture with a transparent color.
Im using the regular texture as Stage 0 with all the defaults, and I tried to use the DLG overlay in stage 1 with the defaults. That didnt work, so I changed Device.TextureState(1).ColorOperation to SelectArg1, and set ColorArgument0 to TextureColor.
That let me draw the image, but it didnt preserve any of the lighting calculations on the vertex colors, and of course it wasnt transparent.
So far, I havent figured the transparency thing out.
So, what Im asking, is how can I do this? Is there something Im missing? Im trying to figure out what all of the ColorOperation flags mean, but, as we all know, the managed documentation is scarce at best.
Thanks (again) in advance,
Mark