Multitexturing/texture splatting
BlitzMax Forums/OpenGL Module/Multitexturing/texture splatting
| ||
I'm trying to use a mask on an image and drawing in another to build composite map tiles. DirectX works (tonyg's code), but in OpenGL it seems like something isn't being released/set back to normal (drawn images are always full white). OpenGL technique: http://www.gamedev.net/community/forums/topic.asp?topic_id=372568 Full code, binary and images (left mouse to do the splatting): http://files.filefront.com/tilecompilatorzip/;13317692;/fileinfo.html EDIT: Here is a shot of the problem: ![]() EDIT2: It also seems that DirectX settings are not being unset aswell (the mask image that is drawn goes completely black; alpha is turned off?) |
| ||
Alternatively, using just colors for the mask texture would be better (can invert, more easily change, etc).. |
| ||
I think the default active texture ARB need to be restored after the draw.. Or something similar? |
| ||
hacked around a bit with your code. dumped the drawimage as that seemed to be the bit screwing it up and modified your splat routine to draw the base tex. Mind you I was just being a troll and I know very little about GL. but it seems to work for me, hope it helps. |