Advertisement

Need Help!

Started by March 15, 2003 09:06 PM
2 comments, last by isuckatopengl 21 years, 11 months ago
I am trying to write code that allows the user to view only part of an image, so i have an image (for example a car rotating) on the screen, and i press the number "1" key, I will view only the top 4th of the screen, pressing "2" would tell opengl to only render the 2nd quarter of the screen and so on to 4. I should still be able to speed up the rotation of the car and slow it down, zoom in and out as usual, using my aarow keys, but I want to only view what would occur in the 4th of the screen I have selected. The eventual result of this would be to be able to send the points in each 4th of the screen to 1 of 4 computers on a network, each with open GL, have each computer render its portion, and send it back to the master computer to composite the image. I have tried "glViewport" command, but that makes the entire image appears in the set window, id like the image dimansions to stay the same, but onlt be able to view that section of the screen. Any help anyone can give me with this or any parallel techniques they may have experimented with would be greatly appreciated (if you have any code that demonstrates anything of this sort, it would also be tremendously appreciated) Thank You Dave
You can just cover up parts of the screen with quads to not show the whole thing. Why would you want to have 4 seperate computers rendering a single image? Depending on the complexity of the scene, it will probably take more time to transfer the data than to render it all on a single comp. If you want to do it anyway, use frustum culling to find what points are inside each 4th of the screen.
Advertisement
what are the commands i need to know for frustum culling?

I realize this will most likely be slower, but I am talking about eventaully applying this to extremely large scenes to see if it would make a difference.

thanks again
There are no built in commands in OpenGl. All you have to do is make 6 planes which give viewing boundries to your scene. Then just check which points are on the inside of all 6 planes.

This topic is closed to new replies.

Advertisement