   Problem wiht masking.
  I'm having a problem with my game.  Its 2d and there is a map made up of tiles, I've just added a transition tile layer however. There is problem with the masking, the invisible parts are overlaying the tile and darkening that area of that tile. My confusion arises from the fact that my sprites are masked correctly, and I'm using basically the same method to draw the transition tiles.Anyone have an idea where my problem is arising?   -----------------------------------------------------Writer, Programer, Cook, I'm a Jack of all TradesCurrent Design projectChaos Factor Design Document[edited by - TechnoGoth on August 1, 2003 6:10:29 PM]
quote:Original post by TechnoGoth  transitionIs this some sort of a yet unknown to me english word, or do you mean tranparent?Anyway post some code and explain better your problem. May be it is only me (or the fact that it is 1:00 am) but I don''t understand your problem.   "C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"  ;  I guess its one of the many english words you don''t know.Transition -  passage from one state, stage, subject, or place to another.Or simply I have 3 base tiles grass tiles, water tiles, and forest tiles.  Then there are tiles that are draw over these tiles to show the change from grass to water or base tile to base tile.Now the problem is that when I draw the change tiles part of the tile should be transparent. But Instead  its translucent and causing the base tile to be darker then it should.  My question is why? glEnable(GL_BEND);glDisable(GL_DEPTH_TEST);glBlendFunc(GL_DST_COLOR,GL_ZERO);//draw tile maskglBlendFunc(GL_ONE,GL_ONE);//draw tilethats the basic of the routine there also some for loops and if statments there to get the tiles.   Part of my problem is that simiar routine is used else where in my program to draw a sprite and it is masked correctly....   -----------------------------------------------------Writer, Programer, Cook, I''m a Jack of all TradesCurrent Design projectChaos Factor Design Document ;  are you using the alpha channel of the texture to blend? Without knowing enough I''ll venture a guess, the blend mode (equation) is probably incorrect for the type of blending you want to do, so the results are not showing. ;  never mind I fixed the problem its seems that paint program wasn''t using absolute black and white. -----------------------------------------------------Writer, Programer, Cook, I''m a Jack of all TradesCurrent Design projectChaos Factor Design Document ;quote:Original post by TechnoGoth  I guess its one of the many english words you don''t know.Well thats right!  "C lets you shoot yourself in the foot rather easily. C++ allows you to reuse the bullet!"  