...afraid not...
The bind is in effect for the next draw operation unless I either unbind by binding to another texture (haven't got the bind number for the drawimage) or deletetextures which delete all textures or my texture '1' resulting in texture '0' being used again.
SetGraphicsDriver GLMax2DDriver() Graphics 800,600,0 Global w,h Global tex=LoadTexture("my_shadow.png") Global my_image = LoadImage("max.png") glTexParameteri GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR glTexParameteri GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR glLoadIdentity glEnable GL_TEXTURE_2D While Not KeyHit(KEY_ESCAPE) Cls mx=MouseX() ; my=MouseY() DrawImage my_image,600,400 glLoadIdentity glBindTexture GL_TEXTURE_2D,tex glBegin GL_POLYGON glTexCoord2f 0.0, 0.0 ; glVertex2f mx , my glTexCoord2f 1.0, 0.0 ; glVertex2f mx+w , my glTexCoord2f 1.0, 1.0 ; glVertex2f mx+w , my+h glTexCoord2f 0.0, 1.0 ; glVertex2f mx , my+h glEnd ' glDeleteTextures(1,Varptr tex) ' glbindtexture GL_TEXTURE_2D,0 FlushMem Flip Wend End Function LoadTexture(f$) Local pm:TPixmap=LoadPixmap(f$) w=pm.width ; h=pm.height Local texname=bglTexFromPixmap(pm) Return texname End Function
The bind is in effect for the next draw operation unless I either unbind by binding to another texture (haven't got the bind number for the drawimage) or deletetextures which delete all textures or my texture '1' resulting in texture '0' being used again.