glortho problems

If you have any questions on programming, this is the place to ask them, whether you're a newbie or an experienced programmer. Discussion on programming in general is also welcome. We will help you with programming homework, but we will not do your work for you! Any porting requests must be made in Developmental Ideas.
Post Reply
dcTom
DCEmu Junior
DCEmu Junior
Posts: 43
https://www.artistsworkshop.eu/meble-kuchenne-na-wymiar-warszawa-gdzie-zamowic/
Joined: Mon Feb 20, 2017 7:49 pm
Has thanked: 0
Been thanked: 0

glortho problems

Post by dcTom »

Hello, i had this Problem already a view years ago, but coult not fix it until now..

when im using glortho, the depth check doesnt work.

Code: Select all

        glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	glOrtho(0, 640, 0, 480, -10, 10);
	glMatrixMode(GL_MODELVIEW);
	glEnable(GL_DEPTH_TEST);
	glDepthFunk(GL_LESS);
	glLoadIdentity();

I set 3 rectangle + texture and one background as long is rectangle are 64x64 or 32x32 .. they are displayed infront of the BG
i changed on to 30x30 and now its displayed behind the background.

if i use gluPerspective(...) Depth test is working fine.

do i have a mistake in my code or forgot somthing?
does anyone uses glortho in his code and its working there?

im using kos 2.0
i also used glortho with older Kos version i think 1.3 (around 15 years old)
in at this time it works
Attachments
DSC03226.JPG
DSC03225.JPG
User avatar
Ian Robinson
DC Developer
DC Developer
Posts: 116
Joined: Mon Mar 11, 2019 7:12 am
Has thanked: 209 times
Been thanked: 41 times

Re: glortho problems

Post by Ian Robinson »

Are you using https://gitlab.com/simulant/GLdc ? Might get more help at the https://discord.gg/R9YFUZ6Y simulant discord
Post Reply