glTexSubImage2D

Hai,
Iam a beginner in openGL graphics and started with texturing and iam currently writing test procedure for testing the API - glTexSubImage2D.But though i have searched enough i couldnot find much coding guidelines on this API.Please kindly send me information on this API.My problem is that the API is replacinng the original texture array but the subimage is not carrying itz original looks;It is distorted…Can u please tell me why this is so???

Thanxs and Regards,
Krishna

You are writing API but it seems like you only mean the function glTexSubImage2D. I do not understand what “replacinng the original texture array” means?