forked from creationix/node-webgl
-
Notifications
You must be signed in to change notification settings - Fork 60
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
getArrayData doesn't support Arrays, breaks three js support #56
Comments
Thanks for your feedback.
It is just time to test and API changes in nodejs. I should revisit the code in light of the new API for arrays.
…--mike
From: Matt Hirsch
Sent: Wednesday, May 31, 12:34
Subject: [mikeseven/node-webgl] getArrayData doesn't support Arrays, breaks three js support (#56)
To: mikeseven/node-webgl
Cc: Bourges-sevenier, Mikael, Mention
In three.js if you use MeshStandardMaterial, the code path eventually calls gl.uniform3fv with an array argument. This hits webgl.cc line 49 which looks like
if(!arg->IsNull()) { if(arg->IsArray()) { Nan::ThrowError("Not support array type"); /* Local<Array> arr = Local<Array>::Cast(arg); if(num) *num=arr->Length(); data = reinterpret_cast<Type*>(arr->GetIndexedPropertiesExternalArrayData());*/ }
I see that GetIndexedPropertiesExternalArrayData is now deprecated in node. I found this comment by @mikeseven<https://github.com/mikeseven> in the node repo: nodejs/node#2977 (comment)<nodejs/node#2977 (comment)>
I assume this is the problem now? In this case is it a big deal to make a copy of the buffer? Is there a good reason this was never replaced with the new API mentioned in that node issue?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#56>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAxYLCDVpXld051KXM_C5elXCVHfpxRLks5r_cDCgaJpZM4NsFvQ>.
|
That would be really awesome! I'd love to have a way to access a standard OpenGL context through javascript + three.js, and your project looks like a great way to do it. |
Indeed it is exactly what it does: expose GL context and wrap it as webgl standard calls. But on desktops, you have full access to OpenGL so extra methods not in webgl are also available. OpenGL has many more methods, it's a matter of time to add them all ;-)
…--mike
________________________________
From: Matt Hirsch <[email protected]>
Sent: Wednesday, May 31, 2017 9:47:49 PM
To: mikeseven/node-webgl
Cc: Bourges-sevenier, Mikael; Mention
Subject: Re: [mikeseven/node-webgl] getArrayData doesn't support Arrays, breaks three js support (#56)
That would be really awesome! I'd love to have a way to access a standard OpenGL context through javascript + three.js, and your project looks like a great way to do it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#56 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAxYLFblH20ISscdKeWNzEXdkNejNYgiks5r_kJ1gaJpZM4NsFvQ>.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In three.js if you use
MeshStandardMaterial
, the code path eventually callsgl.uniform3fv
with an array argument. This hitswebgl.cc
line 49 which looks likeI see that GetIndexedPropertiesExternalArrayData is now deprecated in node. I found this comment by @mikeseven in the node repo: nodejs/node#2977 (comment)
I assume this is the problem now? In this case is it a big deal to make a copy of the buffer? Is there a good reason this was never replaced with the new API mentioned in that node issue?
The text was updated successfully, but these errors were encountered: