Closed cartuchogl closed 10 years ago
I'm experimenting the same bug.
Regards
I made a little change to node-glfw to compile using system libraries. Then I update code in node-webgl to use modified feature/nan_glfw3 branch of node-glfw and updated to glfw3 new style.
Now test/lesson02.js, 05 and 07 runs nice.
commits at node-webgl: https://github.com/cartuchogl/node-webgl/commit/6802587762b6f2a537b6488d92ab71b1035db503 https://github.com/cartuchogl/node-webgl/commit/34938c33b7d693d68b002976b450331683ed052e
at node-glfw https://github.com/cartuchogl/node-glfw/commit/b659aa0764db5ab036c46523a16ba5a3f0a31a13
I tested osx with deps libraries installed using brew.
gondor:test cartucho$ git clone git@github.com:cartuchogl/node-webgl.git
Cloning into 'node-webgl'...
remote: Counting objects: 773, done.
remote: Compressing objects: 100% (370/370), done.
remote: Total 773 (delta 393), reused 770 (delta 391)
Receiving objects: 100% (773/773), 4.52 MiB | 972.00 KiB/s, done.
Resolving deltas: 100% (393/393), done.
Checking connectivity... done
gondor:test cartucho$ cd node-webgl/
gondor:node-webgl cartucho$ npm install
npm http GET https://registry.npmjs.org/nan
npm http 304 https://registry.npmjs.org/nan
npm WARN engine node-glfw@0.2.0: wanted: {"node":"0.6.5-0.11.10"} (current: {"node":"v0.10.28","npm":"1.4.9"})
> node-glfw@0.2.0 install /Users/cartucho/Repositories/webgl/test/node-webgl/node_modules/node-glfw
> node-gyp rebuild
CXX(target) Release/obj.target/glfw/src/atb.o
CXX(target) Release/obj.target/glfw/src/glfw.o
SOLINK_MODULE(target) Release/glfw.node
SOLINK_MODULE(target) Release/glfw.node: Finished
> node-webgl@0.4.1 install /Users/cartucho/Repositories/webgl/test/node-webgl
> node-gyp rebuild
CXX(target) Release/obj.target/webgl/src/bindings.o
CXX(target) Release/obj.target/webgl/src/image.o
CXX(target) Release/obj.target/webgl/src/webgl.o
../src/webgl.cc:492:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
../src/webgl.cc:560:1: warning: control may reach end of non-void function [-Wreturn-type]
}
^
../src/webgl.cc:842:63: warning: cast to 'const void *' from smaller integer type 'int' [-Wint-to-void-pointer-cast]
glVertexAttribPointer(indx, size, type, normalized, stride, (const GLvoid *)offset);
^
3 warnings generated.
SOLINK_MODULE(target) Release/webgl.node
ld: warning: directory not found for option '-L/Users/cartucho/Repositories/webgl/test/node-webgl/deps/darwin'
SOLINK_MODULE(target) Release/webgl.node: Finished
nan@0.8.0 node_modules/nan
node-glfw@0.2.0 node_modules/node-glfw
gondor:node-webgl cartucho$ node test/lesson02.js
Status: Using GLEW 1.10.0
Thanks it seems to work.
Though there is some issue with retina:
but it is maybe unrelated to your changes right?
May be related with http://www.glfw.org/faq.html#why-is-my-output-in-the-lower-left-corner-of-the-window I update with https://github.com/cartuchogl/node-webgl/commit/727e3fa0f9cac9b63c9a638a2bfa4716e5a68b06 Can you test if that fix your problem?
It's fixed :-) Thanks
I tried with lastest master code and runs nice.
I'm glad the new release works well. I tested it on Mac 10.9.2 and windows 7/8.1.
-- mike On Jul 6, 2014 8:44 AM, "Carlos Bolaños" notifications@github.com wrote:
Closed #11 https://github.com/mikeseven/node-webgl/issues/11.
— Reply to this email directly or view it on GitHub https://github.com/mikeseven/node-webgl/issues/11#event-138522850.
Hello @mikeseven, I try same examples and demos an runs nice on osx 10.8.5 Thanks for your support.
Hi mike,
Getting are nonworking tests under linux (Linux Mint 16 - Ubuntu 13.10 64bit - Intel HD3000). All I get is a 800x800 black window that only can closed with a force quit on cube, lesson02, lesson05, lesson08. The window title is 'undefined'.
Tried the npm package, and master branch. Same issue. glversion.js works fine. glfw (3.0.4) tests works fine. glew (1.10.0) tests works fine. node-glfw tests works fine as well.
Really struggling with this one, and not sure how to proceed from here. Any help would be appreciated.
Output from glversion.js;
Status: Using GLEW 1.10.0
OpenGL
vendor : Intel Open Source Technology Center
version : 3.0 Mesa 9.2.1
shading language version : 1.30
renderer : Mesa DRI Intel(R) Sandybridge Mobile
extensions : 175
GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color
GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_polygon_offset
GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array
GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters
GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal
GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp
GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB GL_ARB_multitexture
GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_3DFX_texture_compression_FXT1
GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate
GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add
GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square
GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc
GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object
GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil
GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow
GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat
GL_ARB_window_pos GL_ATI_envmap_bumpmap GL_EXT_stencil_two_side GL_EXT_texture_cube_map
GL_NV_depth_clamp GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ARB_draw_buffers
GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program
GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float
GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture
GL_NV_primitive_restart GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel
GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync
GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate
GL_OES_read_format GL_ARB_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc
GL_ARB_texture_float GL_ARB_texture_rectangle GL_EXT_packed_float GL_EXT_pixel_buffer_object
GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_rectangle GL_EXT_texture_sRGB
GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample
GL_EXT_packed_depth_stencil GL_APPLE_object_purgeable GL_ARB_vertex_array_object GL_ATI_separate_stencil
GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_texture_array
GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image
GL_MESA_texture_array GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced
GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_rg
GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_separate_shader_objects GL_EXT_texture_swizzle
GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_AMD_draw_buffers_blend GL_ARB_ES2_compatibility
GL_ARB_blend_func_extended GL_ARB_debug_output GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex
GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sampler_objects
GL_ARB_seamless_cube_map GL_ARB_shader_texture_lod GL_ARB_texture_cube_map_array GL_ARB_texture_multisample
GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev
GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_ARB_get_program_binary
GL_ARB_robustness GL_ARB_shader_bit_encoding GL_ARB_timer_query GL_ANGLE_texture_compression_dxt3
GL_ANGLE_texture_compression_dxt5 GL_ARB_internalformat_query GL_ARB_shading_language_420pack GL_ARB_shading_language_packing
GL_ARB_texture_storage GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_transform_feedback GL_ARB_ES3_compatibility
Just to be sure about your configuration. You installed the latest versions of glew, glfw3 and built AntTweakBar? Did u test examples coming with glfw3? If all this works, then let's test the example in node-glfw. You should see a triangle. And the other one should show AntTweakBar menu window.
If node-glfw works, then node-webgl should work as well.
Let me know.
-- mike On Jul 20, 2014 7:16 PM, "hschougaard" notifications@github.com wrote:
Hi mike,
Getting are nonworking tests under linux (Linux Mint 16 - Ubuntu 13.10 64bit - Intel HD3000). All I get is a 800x800 black window that only can closed with a force quit on cube, lesson02, lesson05, lesson08. The window title is 'undefined'.
Tried the npm package, and master branch. Same issue. glversion.js works fine. glfw (3.0.4) tests works fine. glew (1.10.0) tests works fine. node-glfw tests works fine as well.
Really struggling with this one, and not sure how to proceed from here. Any help would be appreciated.
Output from glversion.js;
Status: Using GLEW 1.10.0 OpenGL vendor : Intel Open Source Technology Center version : 3.0 Mesa 9.2.1 shading language version : 1.30 renderer : Mesa DRI Intel(R) Sandybridge Mobile extensions : 175 GL_ARB_multisample GL_EXT_abgr GL_EXT_bgra GL_EXT_blend_color GL_EXT_blend_minmax GL_EXT_blend_subtract GL_EXT_copy_texture GL_EXT_polygon_offset GL_EXT_subtexture GL_EXT_texture_object GL_EXT_vertex_array GL_EXT_compiled_vertex_array GL_EXT_texture GL_EXT_texture3D GL_IBM_rasterpos_clip GL_ARB_point_parameters GL_EXT_draw_range_elements GL_EXT_packed_pixels GL_EXT_point_parameters GL_EXT_rescale_normal GL_EXT_separate_specular_color GL_EXT_texture_edge_clamp GL_SGIS_generate_mipmap GL_SGIS_texture_border_clamp GL_SGIS_texture_edge_clamp GL_SGIS_texture_lod GL_ARB_framebuffer_sRGB GL_ARB_multitexture GL_EXT_framebuffer_sRGB GL_IBM_multimode_draw_arrays GL_IBM_texture_mirrored_repeat GL_3DFX_texture_compression_FXT1 GL_ARB_texture_cube_map GL_ARB_texture_env_add GL_ARB_transpose_matrix GL_EXT_blend_func_separate GL_EXT_fog_coord GL_EXT_multi_draw_arrays GL_EXT_secondary_color GL_EXT_texture_env_add GL_EXT_texture_filter_anisotropic GL_EXT_texture_lod_bias GL_INGR_blend_func_separate GL_NV_blend_square GL_NV_light_max_exponent GL_NV_texgen_reflection GL_NV_texture_env_combine4 GL_S3_s3tc GL_SUN_multi_draw_arrays GL_ARB_texture_border_clamp GL_ARB_texture_compression GL_EXT_framebuffer_object GL_EXT_texture_env_combine GL_EXT_texture_env_dot3 GL_MESA_window_pos GL_NV_packed_depth_stencil GL_NV_texture_rectangle GL_ARB_depth_texture GL_ARB_occlusion_query GL_ARB_shadow GL_ARB_texture_env_combine GL_ARB_texture_env_crossbar GL_ARB_texture_env_dot3 GL_ARB_texture_mirrored_repeat GL_ARB_window_pos GL_ATI_envmap_bumpmap GL_EXT_stencil_two_side GL_EXT_texture_cube_map GL_NV_depth_clamp GL_APPLE_packed_pixels GL_APPLE_vertex_array_object GL_ARB_draw_buffers GL_ARB_fragment_program GL_ARB_fragment_shader GL_ARB_shader_objects GL_ARB_vertex_program GL_ARB_vertex_shader GL_ATI_draw_buffers GL_ATI_texture_env_combine3 GL_ATI_texture_float GL_EXT_shadow_funcs GL_EXT_stencil_wrap GL_MESA_pack_invert GL_MESA_ycbcr_texture GL_NV_primitive_restart GL_ARB_depth_clamp GL_ARB_fragment_program_shadow GL_ARB_half_float_pixel GL_ARB_occlusion_query2 GL_ARB_point_sprite GL_ARB_shading_language_100 GL_ARB_sync GL_ARB_texture_non_power_of_two GL_ARB_vertex_buffer_object GL_ATI_blend_equation_separate GL_EXT_blend_equation_separate GL_OES_read_format GL_ARB_color_buffer_float GL_ARB_pixel_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_float GL_ARB_texture_rectangle GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_texture_compression_dxt1 GL_EXT_texture_compression_rgtc GL_EXT_texture_rectangle GL_EXT_texture_sRGB GL_EXT_texture_shared_exponent GL_ARB_framebuffer_object GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_packed_depth_stencil GL_APPLE_object_purgeable GL_ARB_vertex_array_object GL_ATI_separate_stencil GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_gpu_program_parameters GL_EXT_texture_array GL_EXT_texture_integer GL_EXT_texture_sRGB_decode GL_EXT_timer_query GL_OES_EGL_image GL_MESA_texture_array GL_ARB_copy_buffer GL_ARB_depth_buffer_float GL_ARB_draw_instanced GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_map_buffer_range GL_ARB_texture_rg GL_ARB_texture_swizzle GL_ARB_vertex_array_bgra GL_EXT_separate_shader_objects GL_EXT_texture_swizzle GL_EXT_vertex_array_bgra GL_NV_conditional_render GL_AMD_draw_buffers_blend GL_ARB_ES2_compatibility GL_ARB_blend_func_extended GL_ARB_debug_output GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_provoking_vertex GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_shader_texture_lod GL_ARB_texture_cube_map_array GL_ARB_texture_multisample GL_ARB_texture_query_lod GL_ARB_texture_rgb10_a2ui GL_ARB_uniform_buffer_object GL_ARB_vertex_type_2_10_10_10_rev GL_EXT_provoking_vertex GL_EXT_texture_snorm GL_MESA_texture_signed_rgba GL_ARB_get_program_binary GL_ARB_robustness GL_ARB_shader_bit_encoding GL_ARB_timer_query GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_ARB_internalformat_query GL_ARB_shading_language_420pack GL_ARB_shading_language_packing GL_ARB_texture_storage GL_EXT_framebuffer_multisample_blit_scaled GL_EXT_transform_feedback GL_ARB_ES3_compatibility
— Reply to this email directly or view it on GitHub https://github.com/mikeseven/node-webgl/issues/11#issuecomment-49567438.
Hi mike,
The versions I have (and compiled) are; AntTweakBar 1.16, GLFW 3.0.4, GLEW 1.10.0.
GLFW3 tests works, ie output from glfwinfo (all the other ones works too, windows, titles, etc)
GLFW header version: 3.0.4
GLFW library version: 3.0.4
GLFW library version string: "3.0.4 X11 GLX glXGetProcAddress clock_gettime /dev/js shared"
OpenGL context version string: "3.0 Mesa 9.2.1"
OpenGL context version parsed by GLFW: 3.0.0
OpenGL context flags (0x00000000):
OpenGL context flags parsed by GLFW: debug robustness
OpenGL robustness strategy (0x00008261): none
OpenGL robustness strategy parsed by GLFW: none
OpenGL context renderer string: "Mesa DRI Intel(R) Sandybridge Mobile "
OpenGL context vendor string: "Intel Open Source Technology Center"
OpenGL context shading language version: "1.30"
GLEW tests works. Output from glewinfo;
---------------------------
GLEW Extension Info
---------------------------
GLEW version 1.10.0
Reporting capabilities of display :0, visual 0xa9
Running on a Mesa DRI Intel(R) Sandybridge Mobile from Intel Open Source Techno
logy Center
OpenGL version 3.0 Mesa 9.2.1 is supported
GL_VERSION_1_1: OK
---------------
etc etc etc
Both tests for node-glfw works fine. Spinning triangle in both, with atb working fine in its test. glversion.js works fine in node-webgl/test/
Putting in some simple logging into lesson02 seems to suggest that the app halts on the second time through drawScene in the gl.clear statement. The result being a solid black window with 'undefined' in its title requiring a force quit to kill the app. No other messages. Not sure how to debug this further?
Maybe it'll help, maybe not... I replaced the requestAnimationFrame with a setTimeout. Nothing gets drawn. Title is 'undefined'. Changing the clear colour to red, still gives a black screen.
Your setup is good. I don't see any reason it wouldn't work.
I'll test on a Linux machine tomorrow.
-- mike On Jul 20, 2014 9:58 PM, "hschougaard" notifications@github.com wrote:
Maybe it'll help, maybe not... I replaced the requestAnimationFrame with a setTimeout. Nothing gets drawn. Title is 'undefined'. Changing the clear colour to red, still gives a black screen.
— Reply to this email directly or view it on GitHub https://github.com/mikeseven/node-webgl/issues/11#issuecomment-49572026.
everything I have ran in node-webgl is working OK on my ubuntu 14.04 64bit
stens@kamchatka ~/bin/nodejs/lib/node_modules/node-webgl/test $ node glversion.js Status: Using GLEW 1.10.0 OpenGL vendor : NVIDIA Corporation version : 4.4.0 NVIDIA 331.89 shading language version : 4.40 NVIDIA via Cg compiler renderer : GeForce GT 645M/PCIe/SSE2 extensions : 292 ...
As a preliminary step to get node-webgl working I installed glfw from source. Here is its test
glfwinfo GLFW header version: 3.1.0 GLFW library version: 3.1.0 GLFW library version string: "3.1.0 X11 GLX glXGetProcAddress clock_gettime /dev/js shared" OpenGL context version string: "4.4.0 NVIDIA 331.89" OpenGL context version parsed by GLFW: 4.4.0 OpenGL context flags (0x00000000): OpenGL context flags parsed by GLFW: robustness OpenGL profile mask (0x00000000): unknown OpenGL profile mask parsed by GLFW: compat OpenGL robustness strategy (0x00008261): none OpenGL robustness strategy parsed by GLFW: none OpenGL context renderer string: "GeForce GT 645M/PCIe/SSE2" OpenGL context vendor string: "NVIDIA Corporation" OpenGL context shading language version: "4.40 NVIDIA via Cg compiler"
That bottom line in above regarding shading language version is very important. Code will fail if you attempt to run a shader which demands a higher version than your OpenGL context provides.
@hschougaard I see your driver implements shading version up to 1.30
which is fine for rendering lines and such but will fall over when attempting
to run webgl using a shader demanding a newer driver. Assure you are using the newest graphics card driver your hardware can handle. Also take note - if you are on a laptop often they have more than one GPU card - one for everyday light use and another for intensive use. On linux issue this to list your hardware video card(s)
lspci -nnk | grep -iA2 vga
here is what my laptop says ( NOTICE I have Intel for light use BUT an Nvidia GPU as well)
00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core processor Graphics Controller [8086:0166](rev 09) Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10b8]
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GK107M [GeForce GT 645M] [10de:0fd9](rev a1) Subsystem: Micro-Star International Co., Ltd. [MSI] Device [1462:10b8] Kernel driver in use: nvidia
If you have dual cards install drivers for the beefy GPU not the light use one
Could maybe be related to this bug on intel GPUs: https://bugs.freedesktop.org/show_bug.cgi?id=84252
I captured an (incomplete due to missing debug symbols) backtrace from gdb:
from /usr/lib/x86_64-linux-gnu/libxcb.so.1
drawable=<optimized out>, brw=<optimized out>)
at ../../../../../../../src/mesa/drivers/dri/i965/brw_context.c:1453
context@entry=0x810460, drawable=0x80ef60)
at ../../../../../../../src/mesa/drivers/dri/i965/brw_context.c:1145
at ../../../../../../../src/mesa/drivers/dri/i965/brw_context.c:1166
at ../../../../../../../src/mesa/drivers/dri/i965/brw_clear.c:234
from /home/lukas/Programmieren/vvvv_js/node_modules/node-webgl/build/Release/webgl.node
hschougaard, could you please run an example in gdb, interrupt the process when it hangs and capture a backtrace in order to confirm we are having the same issue?
Hello,
I clone the lastest version and I try to run test/glversion.js with that result
I try to change the call to OpenWindowHint to WindowHint and then fail with
After Modify OpenWindow call to CreateWindow and minor dirty changes like:
And now this test runs... But when try another tests like lesson02.js, it open a 800x800 black window that only can force close to exit.
This tests are over a MacOSX 10.8.5 with a NVIDIA GeForce GTX 660M
Any idea?
Thanks for your support.