problem with my program

Hello everybody,
I wrote a program using openGL and openCV - the program takes image from webcam an uses it as a texture to display it as a background in an opengl window. When done, I draw a 3D cube in foreground of the same window, and translate and rotate it around -> everything works fine, except when I move the cube towards and away from the camera. When moving away, the cube just disappears into the texture, when moving forward, it just becomes transparent at some point… Its very strange, I tried to remove the texture and its still the same… I believe its a very simple thing to fix the problem, but I am not so experienced with opengl, so I’ll be more than happy to get some good advices to try to solve the situation. If somebody is willing to help I can also paste the code…

Thank you in advance fellow humans :smiley: Your kindness shall be known to all forum members

Sounds like you need to check out your near and far plane values for your projection matrix.

hey… thanks for the answer - I already found the solution. I rewrote my program, made some changes and now it works just fine :slight_smile: