[solved] [lwjgl] Cannot enable <cap> in the current profile.

Can someone explain this lwjgl error to me:

[quote][LWJGL] ARB_debug_output message
ID: 1280
Source: API
Type: ERROR
Severity: HIGH
Message: GL_INVALID_ENUM error generated. Cannot enable in the current profile.
[/quote]
It recently started popping up in an old project of mine; I am not quite sure why.

Are you using Core profile?

yes:

.withProfileCompatibility(false).withProfileCore(true).withDebug(true)

I suspect that your old code is using [icode]glEnable[/icode] function. That function is deprecated in core profile.

Interesting o:
I’ve used glEnable() a ton in my projects using core profile and I haven’t run into this strange error.

Is there an alternative to glEnable?

You can only enable/disable certain flags in Core profile, like, for example, GL_BLEND is perfectly valid there, but GL_TEXTURE_2D is not, that is deprecated. What flags are you using?

That was it. Texture 2d :slight_smile: Thanks!

Quite odd that this error was not spamming in the console before.