Page 2 of 2

Re: glDrawArrays Invalid Memory Access

Posted: Mon Feb 27, 2017 1:23 pm
by Niffo
luis wrote:In OSX, because Apple is what it is, supposing the driver is supporting GL 4.3 again:
You ask for a legacy RC, you get a legacy RC supporting GL 2.1.
You ask for a COMPATIBILITY PROFILE, you get a legacy RC supporting GL 2.1.
You ask for a CORE PROFILE for the 4.1 version, you get a CORE PROFILE supporting GL 4.1.
You ask for a CORE PROFILE for the 4.5 version, you get NULL.

In short, in OSX you get only GL 2.1 when you are note using a CORE PROFILE.
Thank you very much Luis for this long and clear post. I have started to implement a small multi-platform Opengl 3.2+ framework (shaders only, VBO, VAO, FBO, ...) in PB based on various source codes found here (headers and maths functions) and on the OpenClassRoom tutorial (https://openclassrooms.com/courses/deve ... opengl-3-3) that i will post publicly here soon.

However, one thing is still missing : Do you (or someone else) know how to initialize an Opengl 3.2+ context on MacOS in Purebasic with the OpenGL Gadget or with APIs (Cocoa) ?

Re: glDrawArrays Invalid Memory Access

Posted: Mon Feb 27, 2017 5:56 pm
by Samuel
You can't request the context type or version with PB's OpenGLGadget. You should be able to do it with API on a Mac, but I'm not familiar with the steps as I only use Windows.
Here's a tutorial that sounds a bit promising. https://github.com/beelsebob/Cocoa-GL-Tutorial

If you want PB code Luis may have the answers for you, but he stepped away from the forums a year or so ago. If you want to get a hold of him you could try sending him a PM. If he still has PMs linked to his email account he might respond.

Re: glDrawArrays Invalid Memory Access

Posted: Mon Feb 27, 2017 6:04 pm
by Niffo
Thank you Samuel for your answer. Seems i have found what i was looking for here : http://www.purebasic.fr/english/viewtop ... ca#p490256