Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Is it normal that opengl display me error message in debug mode only ?  (Read 4057 times)

0 Members and 1 Guest are viewing this topic.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
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.





Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Yes, that's intended. The idea is that in release mode, you don't waste time to check for OpenGL errors.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Ok but there are errors so I think that I've to investigate the issue.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
There are some errors in sfml source code, indead.  ;)

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
We are all waiting for you to share what you've found...
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
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
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
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 ?


Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
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.
Laurent Gomila - SFML developer