Montoya
08-10-2001, 12:31 AM
Hey people. Well although Im not new to C++, OpenGL I only started about 3 or so months ago in bits and pieces.
Anyways, like a lot of people, Im starting a "project" in the form of a 2d tile engine. How original you cry. So the question I have is basically this:
I have a 20x20 map with a 20x20 overlay ontop of it containing things like buildings, trees etc. What I want to achieve is an effect whereby I can walk infront of it if Im infront of it and obviously behind it if Im behind it http://www.opengl.org/discussion_boards/ubb/smile.gif A sort of fake perspective basically. With DepthFunc set to GL_LEQUAL, I was wondering whether anybody had any good ideas as to what to do. Was thinking of a toggle maybe between GL_LESS and LEQUAL depending on where you are or something.
Thanks in Advance,
Montoya
Anyways, like a lot of people, Im starting a "project" in the form of a 2d tile engine. How original you cry. So the question I have is basically this:
I have a 20x20 map with a 20x20 overlay ontop of it containing things like buildings, trees etc. What I want to achieve is an effect whereby I can walk infront of it if Im infront of it and obviously behind it if Im behind it http://www.opengl.org/discussion_boards/ubb/smile.gif A sort of fake perspective basically. With DepthFunc set to GL_LEQUAL, I was wondering whether anybody had any good ideas as to what to do. Was thinking of a toggle maybe between GL_LESS and LEQUAL depending on where you are or something.
Thanks in Advance,
Montoya