Question

I have made two objects in googlesketchup. link1 .On the link you can see a picture of the model. I just made two rectangles and then used push and pull, later I used paint bucket to paint the textures on.

I export this file as .obj and then imported in opengl. The weird thing is that you can see one object through the other object. There is a picture. link2

Any ideas how to make the objects non-transparent?

Was it helpful?

Solution

It looks to me a depth test problem.

You can notice it by rotating the model view matrix and you will notice that the transparency will follow an odd behavior.

Try to enable the DEPTH test in your code by adding the following code line:

Using C:

glEnable(GL_DEPTH_TEST);

Cheers

OTHER TIPS

Forgot to enable depth testing? (glEnable(GL_DEPTH_TEST);)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top