Archived

This topic is now archived and is closed to further replies.

isuckatopengl

Need Help!

Recommended Posts

isuckatopengl    122
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

Share this post


Link to post
Share on other sites
xiros    122
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.

Share this post


Link to post
Share on other sites
isuckatopengl    122
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

Share this post


Link to post
Share on other sites
xiros    122
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.

Share this post


Link to post
Share on other sites