JOGL depth buffer and changing viewport

classic Classic list List threaded Threaded
3 messages Options
rm
Reply | Threaded
Open this post in threaded view
|

JOGL depth buffer and changing viewport

rm
Hello everyone !

I am a real newbie to JOGL and Graphics programming in general and have been searching the Internet for days to find a simple working code for what I am trying to do . So, I would really appreciate it if you could help me out with the following steps:
1. Load a .obj 3d model to the program.
2. In a loop, keep changing the viewport and reading the depth buffer that results ( to be used in other processing)

I don't need to draw anything to screen and am merely interested in the values of the depth buffer at different viewports.

Thanks for reading my message :)
Reply | Threaded
Open this post in threaded view
|

Re: JOGL depth buffer and changing viewport

gouessej
Administrator
Hi

There is an OBJ loader in jogl-utils and there are several examples of offscreen rendering in jogl-demos and in our unit tests.
Julien Gouesse | Personal blog | Website
Reply | Threaded
Open this post in threaded view
|

Re: JOGL depth buffer and changing viewport

elect
In reply to this post by rm
About changing the viewport a simple glViewport() is enough.

About reading the depth buffer instead, what do you need it for? Keep in mind it is a relative expensive operation.