My game engine has a GL1 renderer which runs on both the PC, and Dreamcast which lets me compare behaviour between the two. I currently am trying to render a scene that does the following:
- glDepthMask(GL_FALSE);
- Render a textured background quad at z == 0
- glDepthMask(GL_TRUE);
- Render a textured cube at z == -5
On the PC this works as expected; I see a textured cube in front of the background.
On the Dreamcast (both emulator and on hardware) I just see the background.
Are there any known issues with glDepthMask? Anyone have any idea what the problem could be?
[SOLVED] Issue with glDepthMask
-
- Insane DCEmu
- Posts: 145
- https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
- Joined: Tue May 02, 2017 3:11 pm
- Has thanked: 3 times
- Been thanked: 34 times
[SOLVED] Issue with glDepthMask
Last edited by kazade on Fri Sep 15, 2017 2:03 pm, edited 1 time in total.
-
- Insane DCEmu
- Posts: 145
- Joined: Tue May 02, 2017 3:11 pm
- Has thanked: 3 times
- Been thanked: 34 times
Re: Issue with glDepthMask
Bump...
I'm at a loss; I can't see anything obviously wrong with the libGL code.. yet that's where the problem must lie
I'm at a loss; I can't see anything obviously wrong with the libGL code.. yet that's where the problem must lie
-
- Insane DCEmu
- Posts: 145
- Joined: Tue May 02, 2017 3:11 pm
- Has thanked: 3 times
- Been thanked: 34 times
Re: Issue with glDepthMask
Has anyone ever seen glDepthMask working? I've followed the code all the way down into KOS and everything looks fine, yet it definitely seems like depth writes are happening even when I've disabled them
- BlueCrab
- The Crabby Overlord
- Posts: 5658
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: Issue with glDepthMask
I'm not sure, as I've honestly never really worked with the current libgl at all.
That was pretty much all PH3NOM's thing, and unfortunately, he's not around maintaining it anymore.
That was pretty much all PH3NOM's thing, and unfortunately, he's not around maintaining it anymore.
-
- Insane DCEmu
- Posts: 145
- Joined: Tue May 02, 2017 3:11 pm
- Has thanked: 3 times
- Been thanked: 34 times
Re: Issue with glDepthMask
BlueCrab, have you ever disabled depth writes with PVR commands directly? Looking at the code it seems that the depth.write flag is correctly set when compiling the polygon header - it just doesn't seem to work.
- BlueCrab
- The Crabby Overlord
- Posts: 5658
- Joined: Mon May 27, 2002 11:31 am
- Location: Sailing the Skies of Arcadia
- Has thanked: 9 times
- Been thanked: 69 times
- Contact:
Re: Issue with glDepthMask
Honestly, no, I haven't. I've never done any sort of 3D work at all on the Dreamcast, unfortunately.
Just a thought, but are either of the objects translucent or punch-throughs? If so, then they're possibly tripping up the automatic depth-sorting for translucent polygons that the hardware does unless you specifically disable it.
Just a thought, but are either of the objects translucent or punch-throughs? If so, then they're possibly tripping up the automatic depth-sorting for translucent polygons that the hardware does unless you specifically disable it.
-
- Insane DCEmu
- Posts: 145
- Joined: Tue May 02, 2017 3:11 pm
- Has thanked: 3 times
- Been thanked: 34 times
Re: Issue with glDepthMask
Yep it was down to the auto-sorting. I've disabled that now in my libGL fork so that the behaviour is more like traditional OpenGL.