some renderstates that are used by your model are not reset for your background image, thus continuing to affect the rendering pipeline. some code on how you do model rendering would help. maybe glColor3f(1.0f,1.0f,1.0f) before the texture helps if you used this function elsewhere or disable lighting if your model is lit.
Thnks every one for the reply.
I fixed the problem by disabling the lighting for the model.
but one more problem i am facing is that in the application the model dosen’t appear.
But when i moved the texture image slowly(by varying the mapping coordinates in glVertex3f(); )the model started appearing on the screen as the texture moves out and the model was having the texture of the image.
I hope the model is created at the background of the image or it is taking the texture of the image and hence is not visible.
Plz suggest me how to bring the model over the texture.
I am not using any texture for the 3D model.texture is used only for the background of the model which i am binding through glBindTexture()
Hence its not clear where the problem is???
Also i cannot move texture with glTexCoord()because my background is a terrain image which has to be contineous.I have 3-4 images of the terrain and if i use glTextCoord() to move the texture only one image is repeated.
So i am mapping different images at diff ay different coordinates using glVertex() and varying those coordinates to get a contineous effect.
but my problem now is the model not appearing infront of the background.
the model started appearing on the screen as the texture moves out and the model was having the texture of the image.
I am not using any texture for the 3D model.texture is used only for the background of the model which i am binding through glBindTexture()
No, it is not clear at all.
Could you elaborate more about:
What you want to do
What you have achieved and how. + screenshots.
issues you are experiencing.
but my problem now is the model not appearing infront of the background.
So now, the problem is not the same?
There could be many reasons why the model is not appearing… (object is behind, has the background color, is not in the camera frustum…)
I am developing an application in which a 3D aircraft model is flying over a terrain. For this i an mapping texture for terrain and sky and them varying the coordinates in glVertex3f() so that the images moves and it appears that the 3d model is moving.
What you have achieved and how. + screenshots.
The texture mapping is well and proper. Loading of 3D model is also fine but it dosen’t appear over the texture. The model appears only when the Texture is moved out of screen.
My screen shots are on my system and i didn’t get option to enter those so i couldn’t enter the screen shot.
So now, the problem is not the same?
There could be many reasons why the model is not appearing… (object is behind, has the background color, is not in the camera frustum…)
The object can be behind the image. How do i bring it to front???
Also it is inside the camera frustum because it appears when the images moves out of the screen.