# Depth problem?

**URL:** <https://discourse.glfw.org/t/depth-problem/429>\
**Category:** support\
**Created:** [May 26, 2007, 5:27pm UTC](https://discourse.glfw.org/t/depth-problem/429 "2007-05-26T17:27:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 26, 2007, 5:27pm UTC](https://discourse.glfw.org/t/depth-problem/429/1 "2007-05-26T17:27:45Z")

</div>

**nobody** wrote on [Saturday, May 26, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/6ab2cb3b/#9650):

Hey people,

Can anyone help me out with this strange problem?  
Take a look at these screenshots if you will:

this one shows the problem:  
[http://gouranga.info/Gouranga.jpg](http://gouranga.info/Gouranga.jpg)

this is how it should be:  
[http://gouranga.info/Gouranga2.jpg](http://gouranga.info/Gouranga2.jpg)

If you walk through the world the world having  
the problem, you will see that the water is drawn over the  
the land and if you approach the land it will "sink" in the  
water. So it seems like you could never reach the land. Also  
notice the weird blue shadow effect on the land. I dont have a  
clue what the reason for this could be, but i could be  
something with the depth or so? Who can help me out?

It seems to render ok on ATI cards and not on NVIDIA and  
Intel cards. The problem came up since we started using the  
GLFW window.

Thanks in advance,

Dennis

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 26, 2007, 5:43pm UTC](https://discourse.glfw.org/t/depth-problem/429/2 "2007-05-26T17:43:39Z")

</div>

**nobody** wrote on [Saturday, May 26, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/6ab2cb3b/#a65a):

another screenshot:

[http://gouranga.info/Gouranga3.png](http://gouranga.info/Gouranga3.png)

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 26, 2007, 7:02pm UTC](https://discourse.glfw.org/t/depth-problem/429/3 "2007-05-26T19:02:18Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Saturday, May 26, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/6ab2cb3b/#a7b9):

GLFW does not affect the result of your rendering in any way. It merely provides you with a context. Please check your rendering code.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 27, 2007, 10:02am UTC](https://discourse.glfw.org/t/depth-problem/429/4 "2007-05-27T10:02:50Z")

</div>

**[kohaistyle](https://sourceforge.net/u/kohaistyle/)** wrote on [Sunday, May 27, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/6ab2cb3b/#a65a/0720):

Have you checked your Z-Buffer at window creation ?  
Some modes are just behaving stangely on Nvidia, some other on ATI … try fiddling with it !

And are you sure you’re not playing with the glDepthFunc(); mode somewhere, that would distrub your rendering ?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 27, 2007, 11:47am UTC](https://discourse.glfw.org/t/depth-problem/429/5 "2007-05-27T11:47:27Z")

</div>

**nobody** wrote on [Sunday, May 27, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/6ab2cb3b/#9650/570f):

Hey this is what I set initialiy:

glEnable( GL\_DEPTH\_TEST );  
glDepthFunc( GL\_LESS );  
glFrontFace( GL\_CCW );  
glShadeModel( GL\_SMOOTH );  
glCullFace( GL\_BACK );  
glEnable( GL\_CULL\_FACE );

Somethimes u set gldepthmask( false ) and back to true  
and that doesnt seem to be the problem…

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex035/uploads/glfw/original/1X/b8cdefe6b61b8d5aee6c43b2c56e9cf5eabecfe4.svg) [@system](https://discourse.glfw.org/u/system)\
**Post date:** [May 27, 2007, 2:46pm UTC](https://discourse.glfw.org/t/depth-problem/429/6 "2007-05-27T14:46:11Z")

</div>

**[elmindreda](https://sourceforge.net/u/elmindreda/)** wrote on [Sunday, May 27, 2007](https://sourceforge.net/p/glfw/discussion/247562/thread/6ab2cb3b/#9650/570f/1cb2):

Sorry, no, we never call glDepthMask in GLFW.
