How to get where is an OpenGL error

benoitlahoz's picture

Hello !

I guess this is not really the place to post this question. But I can't manage to find an answer. (or aybe - surely - I don't understand the answers).

I have a recurrent 0x0502 error in my plugin. As it seems that it is a very common error, I would like to know where it is situated in my code. Is there a way (like an NSLog) to do this ? `

Thanks a lot !

Ben

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

cybero's picture
Re: How to get where is an OpenGL error

It is an invalid operation error code. You ought to try examining your code to see how clean it is in xCode, as , so far as I'm aware, for this type of error code you then need to look further down the line as it can be the result of any invalid call or operation at the time of execution / compiling. Look in your Console logs for such a code referenced.

Seeing as how you headed this as being an OpenGL error, can you profile your code in OpenGL Profiler? Is it some shader fs / vs code? You could see if that works AOK in OpenGL shader Builder.

benoitlahoz's picture
Re: How to get where is an OpenGL error

Thank you cybero. I have this message from the console. There is no shader in the code. I'll try the OpenGL Profiler and tell you more.

I suspect this is my way of determining the edge width of my objects with a condition that is not good. I will verify my assignations.

vade's picture
Re: How to get where is an OpenGL error

OpenGL Profiler -> Launch app -> Break on Error.

"Run"

Error is thrown. Look at the code, resources, and OpenGL Call to determine if you are setting incorrect state, accessing an OpenGL object that is not created, or are trying to create invalid objects.

502 is: GL_INVALID_OPERATION

Which is pretty generic, but means you are trying to do something on an object or state, when you cannot.

benoitlahoz's picture
Re: How to get where is an OpenGL error

Thanks so much !!! You give me light in the darkness !