Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

passing structure type references to ALLOC-GL-ARRAY's TYPE argument #25

Open
takagi opened this issue Jul 1, 2014 · 0 comments
Open

Comments

@takagi
Copy link
Owner

takagi commented Jul 1, 2014

In the definition of cl-cuda-interop:alloc-memory-block, since alloc-gl-array function's type argument accepts only symbols, structure type references must be passd to type in bare style which is actually deprecated in CFFI. For example, foo must be passed instead of (:struct foo).

NG: (alloc-gl-array '(:struct foo) count)
OK: (alloc-gl-array 'foo count)

As a working around for this problem, I define bare-cffi-type function which convert structure type references from the form (:struct foo) to foo, and pass its returning value to alloc-gl-array function.

(alloc-gl-array (bare-cffi-type type) count)

This problem is already reported on cl-opengl's issue tracker #41.

@takagi takagi changed the title Passing structure type references to ALLOC-GL-ARRAY function's TYPE argument Passing structure type references to ALLOC-GL-ARRAY's TYPE argument Jul 1, 2014
@takagi takagi changed the title Passing structure type references to ALLOC-GL-ARRAY's TYPE argument passing structure type references to ALLOC-GL-ARRAY's TYPE argument Jul 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant