76
Graphics / GL_INVALID_ENUM at image creation
« on: June 01, 2010, 05:07:57 pm »
I have encountered a very strange behaviour. This simple code:
leads to the following output:
"EUM" and "agument" are not typographic errors, GLCheck.cpp contains the correct strings. I seriously don't know how that can happen. :shock:
However, the actual problem is those failed OpenGL calls. These two lines in sf::Image::CreateTexture() cause the problem:
I'm using the newest SVN revision (1523) of SFML2 on Windows 7 and Microsoft Visual Studio 2008 SP1, I just recompiled SFML. Any ideas?
Code: [Select]
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::Image image;
bool created = image.Create(30, 40, sf::Color(0,0,0,0));
std::cout << "Success? " << std::boolalpha << created << std::endl;
}
leads to the following output:
Code: [Select]
An internal OpenGL call failed in image.cpp (633) : GL_INVALID_EUM, an unaccepta
ble value has been specified for an enumerated agument
An internal OpenGL call failed in image.cpp (634) : GL_INVALID_EUM, an unaccepta
ble value has been specified for an enumerated agument
Success? true
"EUM" and "agument" are not typographic errors, GLCheck.cpp contains the correct strings. I seriously don't know how that can happen. :shock:
However, the actual problem is those failed OpenGL calls. These two lines in sf::Image::CreateTexture() cause the problem:
Quote
GLCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE));
GLCheck(glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE));
I'm using the newest SVN revision (1523) of SFML2 on Windows 7 and Microsoft Visual Studio 2008 SP1, I just recompiled SFML. Any ideas?