I updated openfl and lime (haxelib upgrade) and now, in a project using away3D, I have this error message that appear in the console each ~1s on windows target (with -debug flag):
GL Error: 1282 640x46
This doesn’t seem to impact the execution of the app though as it do not crash and display the expected content correctly… So I just wanted to know what could produce this error message and if I had to worry about it…
EDIT: OK I found what is causing the error message. I have an haxeflixel sprite with a chrono (rendered as an Flxtext) wich change every second rendered on top of the away3D view3D. Each time the chrono time change (each second) I have this GL error message that appear in the console. If I remove my chrono from my FlxState, I don’t have it anymore…
But I don’t know how to fix this and I hadn’t this kind of error message with previous versions of lime/openfl.
1282 is a shader error. Are you using any custom shaders? If not then you should report this to the Flixel team.
Turns out this is actually INVALID_OPERATION and can be cause by just about anything.
well the away3D view which is below the chrono is probably using some shading for lightening effects yes. The chrono itself to not have any particular shading (this is just a textfiel that changes its text every second)…
The problem with OpenGL’s errors is you don’t know when they’re happening. If you knew when they were happening, you could look up the function in question and find out why. All you know is that the error flag was set at some point in the past.
To make this easier, I wrote this function. Copy-paste it around your program, until you find out where it starts happening. This will almost certainly be in Away3D’s code, so hopefully you know where those files are stored.
Once you narrow it down to a single OpenGL function, Google that function’s name to find its man page. The man page will list the errors the function can throw, and the reasons for throwing those errors.
I have seen GL errors in the Away3D code at times and yes they can be difficult to track down. Looks like I’ll be making use of that function you’ve provided to help narrow down these errors.
Thanks for sharing
On native targets, you may be able to use gDEBugger for OpenGL debuging. It has issues with current version of lime though can be avoided with custom build.
On html5, you can use WebGL Inspector