Wow, you are the best!
It seems to work perfectly now. I will test some more and if there are no more 
problems I will see about fixing it up for long-term use (checks for OSX 
version and profile type).

On 13.10.2012, at 17:50, Joe Groff <[email protected]> wrote:

> On Sat, Oct 13, 2012 at 8:27 AM, PGGB <[email protected]> wrote:
>> I have encountered a new problem.
>> Generating and binding vertex arrays seems to be broken with core-profile. 
>> The problem is that in core-profile it needs to use gl3.h and not gl.h (I 
>> had the same problem with GLFW in C++) which I assume is the source of the 
>> problem.
>> 
>> Any ideas how to fix that?
> 
> The header only affects what symbols are visible to a C program; the
> underlying entry points are the same from Factor's point of view. The
> problem in Factor is that it tries to substitute equivalent extension
> functions where it can, because under compatibility profile the
> extensions are usually equivalent to the standardized. However, in the
> case of a core profile context, only the standard entry points are
> available. Unfortunately, Apple made the annoying decision to have it
> so only `glBindVertexArrayAPPLE` works in compatibility profile, and
> only `glBindVertexArray` works in core profile. Since until now Factor
> only supported the compatibility profile, it favors the extension
> entry points over the standard ones. You can flip it around by going
> into `opengl.gl.extensions` and modifying the `GL-FUNCTION:` syntax
> word's implementation to `prefix` rather than `suffix` the standard
> name to the list of candidates it checks:
> 
> ```
> SYNTAX: GL-FUNCTION:
>    gl-function-calling-convention
>    scan-function-name
>    "{" expect "}" parse-tokens over prefix ! <-- was suffix
>    gl-function-counter '[ _ _ gl-function-pointer ]
>    ";" scan-c-args define-indirect ;
> ```
> 
> You'll probably have to re-bootstrap for that to take effect. A
> longer-term fix would be for the `gl-function-pointer` code to detect
> whether it's currently running in a core or compatibility context and
> adjust its behavior appropriately.
> 
> -Joe
> 
> ------------------------------------------------------------------------------
> Don't let slow site performance ruin your business. Deploy New Relic APM
> Deploy New Relic app performance management and know exactly
> what is happening inside your Ruby, Python, PHP, Java, and .NET app
> Try New Relic at no cost today and get our sweet Data Nerd shirt too!
> http://p.sf.net/sfu/newrelic-dev2dev
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk


------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk

Reply via email to