markbiddlecom
Newcomer
Well, here I am with yet another question (who knows, maybe someday I'll know enough to answer other people's questions):
In my 3D mapping program, I give the user an option to spread a texture across the map's surface. The kind of textures available vary, but there's 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.
I'm 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 didn't preserve any of the lighting calculations on the vertex colors, and of course it wasn't transparent.
So far, I haven't figured the transparency thing out.
So, what I'm asking, is how can I do this? Is there something I'm missing? I'm 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 map's surface. The kind of textures available vary, but there's 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.
I'm 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 didn't preserve any of the lighting calculations on the vertex colors, and of course it wasn't transparent.
So far, I haven't figured the transparency thing out.
So, what I'm asking, is how can I do this? Is there something I'm missing? I'm 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