SFML community forums

Help => Graphics => Topic started by: Lolilolight on April 06, 2014, 11:27:34 am

Title: Is it normal that opengl display me error message in debug mode only ?
Post by: Lolilolight on April 06, 2014, 11:27:34 am
Hi, opengl always display those error messages when I compile a library using SFML in debug mode and when I use render textures and shaders :

An internal OpenGL call failed in Texture.c++(497) : GL_INVALID_VALUE, a numeric argument is out of range.

I've the same error message for this location : shader.cpp (469)

But when I compile in release mode, the error message disappears.




Title: Re: Is it normal that opengl display me error message in debug mode only ?
Post by: Nexus on April 06, 2014, 11:48:00 am
Yes, that's intended. The idea is that in release mode, you don't waste time to check for OpenGL errors.
Title: Re: Is it normal that opengl display me error message in debug mode only ?
Post by: Lolilolight on April 06, 2014, 12:02:20 pm
Ok but there are errors so I think that I've to investigate the issue.
Title: Re: Is it normal that opengl display me error message in debug mode only ?
Post by: Lolilolight on April 06, 2014, 12:22:20 pm
There are some errors in sfml source code, indead.  ;)
Title: Re: Is it normal that opengl display me error message in debug mode only ?
Post by: Laurent on April 06, 2014, 02:38:36 pm
We are all waiting for you to share what you've found...
Title: Re: Is it normal that opengl display me error message in debug mode only ?
Post by: eXpl0it3r on April 06, 2014, 02:44:19 pm
We are all waiting for you to share what you've found...
Not really. I'm waiting for him to find out that it was his mistake (again). ;D
Title: Re: Is it normal that opengl display me error message in debug mode only ?
Post by: Lolilolight on April 07, 2014, 11:14:29 am
I think that the problem comes from line :

glCheck(glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size));
 

opengl indicate me an error at this line. (Invalid argument)

But this function returns the max texture's width and height in the same value ?

Or is it always the same maximum for the texture's width and height ?

My screen is very large but not so hight so....

And I have size problems with rendertextures also, are you sure that you create your textures with the right dimensions ?

Title: Re: Is it normal that opengl display me error message in debug mode only ?
Post by: Laurent on April 07, 2014, 11:27:30 am
Quote
I think that the problem comes from line :
glCheck(glGetIntegerv(GL_MAX_TEXTURE_SIZE, &size));
I'm pretty confident that you're right, given the error message that you got:
Quote
An internal OpenGL call failed in Texture.cpp(497)
;)

Quote
But this function returns the max texture's width and height in the same value ?
Yes. Don't forget that there is a (actually, several) documentation for OpenGL functions, when you're not sure of something.

Quote
My screen is very large but not so hight so....
It has nothing to do with the screen size.

Quote
And I have size problems with rendertextures also, are you sure that you create your textures with the right dimensions ?
The texture size is given by you.