I would in no way consider myself an advanced openGL programmer; I believe the code I inherited from previous colleagues is and I am having a problem with some changes that were made before they left that went unseen. So I hope my posting to the advanced forum doesn’t ruffle too many feathers.
I work on visualization software for a medical company. OpenGL (jogl) is used for both 2D and 3D rendering. Until these changes mentioned above were made, when a monitor displayed multiple viewports, each viewport ‘owned’ an openGL canvas. additional requirements were added that required simultaneous scrolling of multiple viewports at a specified rate. with each viewport having it’s own canvas, the scrolling speed was limited by the screen refresh rate since each viewport required a single screen refresh to update. so, the design was changed to use one single canvas for a monitor and then create ‘virtual’ viewports on top of that canvas. There have been no problems with the 2D implementation. But recently a situation was encountered with 3D that has stumped me for several weeks now. I realize that I probably cannot describe the implementation as well as might be required and to upload the code that renders/displays the 3D images would be near impossible since it is so embedded in the entire application. I will try and explain the best I can and hope that there might be someone who can shed some light on what I clearly cannot see.
For those familiar with GPU-based volume rendering, there is a paper, “Acceleration Techniques for GPU-based Volume Rendering”, written by j. Kruger and R. Westerman that was used to implement 3D rendering (which I can make available to anyone who would like to read it). Quote from the paper which I consider to be my focus as to where the problem might lie: “Instead of using the frame buffer, the rendering can be directed to a 2D texture map that is aligned with the viewport. The texture can be accessed in the following rendering passes. consequently, this mechanism allows different passes to communicate their rendering results to consecutive passes”. This is achieved by glCopyTexSubImage2D() after each pass. What is happening in a nutshell is that the viewport at (0,0) displays correctly; any other viewport(s) display black. I have used ‘glGetTexImage()’ to determine that the texture image is black when the viewport coordinates are anything other than (0,0). I have used ‘glReadPxels()’ to determine that the image is correct in the back buffer for all viewports, regardless of the coordinates.
Instead of waxing on with additional information and details, if anyone has any expertise in this area and is able to help, let me know and I will provide whatever additional details/information you need.
thx,
CAK