Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualGraphic_Programmer

Posted 11 August 2012 - 01:16 PM

For starters, get rid of the "ekran" variable and use screen or temp in its place.

Look at this thread: http://www.gamedev.n...g-glreadpixels/

Check what is the value of gluErrorString(glGetError()) after the call to glReadBuffer. Overall, the code seems legit, but I'm not an OpenGL expert by any means.

Do you draw something in OpenGL? When do you call this Screenshot function?

Edit:
GL_FRONT_AND_BACK seems to be illegal value for glReadBuffer. Try with GL_FRONT_LEFT instead. Quoting the documentation:

mode
Specifies a color buffer.
Accepted values are
GL_FRONT_LEFT,
GL_FRONT_RIGHT,
GL_BACK_LEFT,
GL_BACK_RIGHT,
GL_FRONT,
GL_BACK,
GL_LEFT,
GL_RIGHT, and
GL_AUXi,
where i is between 0 and the value of GL_AUX_BUFFERS minus 1.
...

Nonstereo double-buffered configurations have only a front left and a back left buffer

Thank you very much for your help! Me too not a expert of OpenGL but sure, you know it better than me becuse i am new in OpenGL and my English isn't very good to understand everything.
Oh, i am an idiot Posted Image First, I might say thats:
Already, I called Screenshot function with screen surface and drew something to screen.The problem weren't them.
When i tried GL_FRONT_LEFT, i made it just and i have a question: why doesn't it be when i tried GL_FRONT_RIGHT instead?
What is different between LEFT and RIGHT? Does it mean front face and back face. I will try all of them.

#2Graphic_Programmer

Posted 11 August 2012 - 12:46 PM

For starters, get rid of the "ekran" variable and use screen or temp in its place.

Look at this thread: http://www.gamedev.n...g-glreadpixels/

Check what is the value of gluErrorString(glGetError()) after the call to glReadBuffer. Overall, the code seems legit, but I'm not an OpenGL expert by any means.

Do you draw something in OpenGL? When do you call this Screenshot function?

Edit:
GL_FRONT_AND_BACK seems to be illegal value for glReadBuffer. Try with GL_FRONT_LEFT instead. Quoting the documentation:

mode
Specifies a color buffer.
Accepted values are
GL_FRONT_LEFT,
GL_FRONT_RIGHT,
GL_BACK_LEFT,
GL_BACK_RIGHT,
GL_FRONT,
GL_BACK,
GL_LEFT,
GL_RIGHT, and
GL_AUXi,
where i is between 0 and the value of GL_AUX_BUFFERS minus 1.
...

Nonstereo double-buffered configurations have only a front left and a back left buffer

Thank you very much for your help! Me too not a expert of OpenGL but sure, you know it better than me becuse i am new in OpenGL and my English isn't very good to understand everything.
Oh, i am an idiot Posted Image First, I might say thats:
Already, I called Screenshot function with screen surface and drew something to screen.The problem weren't them.
When i tried GL_FRONT_LEFT, i made it and i have a question: why doesn't it be when i tried GL_FRONT_RIGHT instead?
What is different between LEFT and RIGHT? Does it mean front face and back face. I will try all of them.

#1Graphic_Programmer

Posted 11 August 2012 - 12:45 PM

For starters, get rid of the "ekran" variable and use screen or temp in its place.

Look at this thread: http://www.gamedev.n...g-glreadpixels/

Check what is the value of gluErrorString(glGetError()) after the call to glReadBuffer. Overall, the code seems legit, but I'm not an OpenGL expert by any means.

Do you draw something in OpenGL? When do you call this Screenshot function?

Edit:
GL_FRONT_AND_BACK seems to be illegal value for glReadBuffer. Try with GL_FRONT_LEFT instead. Quoting the documentation:

mode
Specifies a color buffer.
Accepted values are
GL_FRONT_LEFT,
GL_FRONT_RIGHT,
GL_BACK_LEFT,
GL_BACK_RIGHT,
GL_FRONT,
GL_BACK,
GL_LEFT,
GL_RIGHT, and
GL_AUXi,
where i is between 0 and the value of GL_AUX_BUFFERS minus 1.
...

Nonstereo double-buffered configurations have only a front left and a back left buffer

Thank you very much for your help! Me too not a expert of OpenGL but sure, you know it better than me becuse i am new in OpenGL and my English isn't very good to understand everything.
Oh, i am an idiot :( First, I might say thats.
Already, I called Screenshot function with screen surface and drew something to screen.The problem weren't them.
When i tried GL_FRONT_LEFT, i made it and i have a question: why doesn't it be when i tried GL_FRONT_RIGHT instead?
What is different between LEFT and RIGHT? Does it mean front face and back face. I will try all of them.

PARTNERS