title: C++ How to replace a function but still use the original function in it?
body: <p>I want to modify the glBindTexture() function to keep track of the previously binded texture ID's. At the moment i just created new function for it, but then i realised that if i use other codes that use glBindTexture: then my whole system might go down to toilet.</p>
  
  <p>So how do i do it?</p>
  
  <p><strong>Edit:</strong> Now when i thought it, checking if i should bind texture or not is quite useless since opengl probably does this already. But i still need to keep track on the previously used texture.</p>