im tryin to drape a texture of contours onto my terrain. and im settin the alpha (opacity) to 0 when the R,G & B values are 0. just before binding, the values are right, but when its draped it doesnt show as transparent. could anyone tell me what could be goin on. heres some code : (VB6)
blnIsOpenglList = glIsList(intI * 100000001 + intK * 101 + intJ)
'if so then render it
If glIsList(intI * 100000001 + intK * 101 + intJ) Then
'set the depth function to always so that the image is above everything
glDepthFunc cfAlways
glPolygonMode faceFrontAndBack, pgmFILL
glColorMaterial faceFront, cmmAmbientAndDiffuse
'enable 2D texture and color material property
glEnable glcColorMaterial
glEnable glcTexture2D
glTexEnvf tetTextureEnv, tenTextureEnvMode, tepDecal
glBindTexture glTexture2D, TEX_DRAPE_IMAGES + 101 * intI + intJ
'call the DL
glCallList (intI * 100000001 + intK * 101 + intJ)
'disable 2D texture and color material property
glDisable glcTexture2D
glDisable glcColorMaterial
glDepthFunc (cfLess)
End If
thank u