-
DevIL screenshot
Hi,
I am using the package DevIL for screenshot. However, I encounter a problem.
In my program, the viewport is only part of the window.
glViewport((GLsizei)w*0.1, (GLsizei)h*0.1 (GLsizei)w*0.8, (GLsizei)h*0.8);
Then when I use
ilutGLScreenie();
But the tga image I get is not what in the viewport as indicate in the tutorial. Instead, the tga image starts from the lower left corner of the window and going right 0.8 w and up 0.8 h(which is the viewport size)
What can I do if I want to the image to be everything in the whole window/or only in the viewport? Thanks.
-
Re: DevIL screenshot
I took a look at the source code. It seems that this is how ilutGLScreen is hard coded. It queries the size of viewport by glGetInteger() then use glReadPixels(0,0,Viewport[2],viewport[3],.....);
I want to fix it and it requires to query the window size. Which function can return the window size? I am using GLUT under linux. Thanks.
-
Re: DevIL screenshot
I find it, it is glutGet().
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules