PDA

View Full Version : beginner question about "camera" in openGL



ashi08104
01-31-2011, 08:26 AM
I'm new to openGL,I wonder whether the job as below openGL can do,if yes,and how to:
in a scene rendered by openGL,if I can put a camera(I don't know if there is a concept also called camera in openGL?I just consider it a kind of camera in real life) in the scene,and get image from it,then process the image by any other program.

thanks for any replying!
best regards.

ZbuffeR
01-31-2011, 09:07 AM
Yes of course, render your scene, glReadPixels the result (like a screenshot), and use whatever image i/o library to create a file with this raw pixel data.

_arts_
01-31-2011, 11:46 AM
you can use gluPerspective to mimics real life view perspective and gluLookAt to mimics camera.

ashi08104
01-31-2011, 07:08 PM
ZbuffeR,thanks,I'll try it.

you can use gluPerspective to mimics real life view perspective and gluLookAt to mimics camera.
hello,arts,is there any spec about this two function?

mhagain
01-31-2011, 09:05 PM
First hit on Google ;)

http://www.opengl.org/sdk/docs/man/xhtml/gluPerspective.xml

ashi08104
02-01-2011, 07:20 PM
sorry.I mean any good tutorial or book.I read the super bible recently,and search the book,find no gluPerspective related subject.any way,thanks,google should be the first way:)