glDrawArrays Invalid Memory Access

Everything related to 3D programming
Niffo
Enthusiast
Enthusiast
Posts: 500
Joined: Tue Jan 31, 2006 9:43 am
Location: France

Re: glDrawArrays Invalid Memory Access

Post 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) ?
Last edited by Niffo on Sat Mar 04, 2017 11:18 am, edited 1 time in total.
Niffo
User avatar
Samuel
Enthusiast
Enthusiast
Posts: 755
Joined: Sun Jul 29, 2012 10:33 pm
Location: United States

Re: glDrawArrays Invalid Memory Access

Post 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.
Niffo
Enthusiast
Enthusiast
Posts: 500
Joined: Tue Jan 31, 2006 9:43 am
Location: France

Re: glDrawArrays Invalid Memory Access

Post 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
Niffo
Post Reply