2012-04-06 33 views
5

Tôi muốn thử nghiệm mã WebGL không đầu bằng Xvfb. Có ai biết làm thế nào để làm điều đó?Hiển thị WebGL trong Xfvb

Tôi có 2 máy - cả hai đều chạy Ubuntu. Một với thẻ NVidia và một với ATI:

Máy NVidia:

ipmi:~ $>xvfb-run glxinfo 
name of display: :455 
display: :455 screen: 0 
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose) 
server glx vendor string: SGI 
server glx version string: 1.4 
server glx extensions: 
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method, 
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event 
client glx vendor string: NVIDIA Corporation 
client glx version string: 1.4 
... 

ipmi:~ $>xvfb-run glxgears 
3725 frames in 5.0 seconds = 741.884 FPS 
3840 frames in 5.0 seconds = 767.310 FPS 
4080 frames in 5.0 seconds = 814.811 FPS 
4120 frames in 5.0 seconds = 821.859 FPS 

Máy ATI:

shaka:~ $>xvfb-run glxinfo 
name of display: :99 
display: :99 screen: 0 
direct rendering: Yes 
server glx vendor string: SGI 
server glx version string: 1.4 
server glx extensions: 
    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating, 
    GLX_EXT_import_context, GLX_EXT_texture_from_pixmap, GLX_OML_swap_method, 
    GLX_SGI_make_current_read, GLX_SGIS_multisample, GLX_SGIX_fbconfig, 
    GLX_SGIX_pbuffer, GLX_MESA_copy_sub_buffer, GLX_INTEL_swap_event 
client glx vendor string: Mesa Project and SGI 
client glx version string: 1.4 

shaka:~ $>xvfb-run glxgears 
4326 frames in 5.0 seconds = 865.095 FPS 
4343 frames in 5.0 seconds = 868.540 FPS 

Thậm chí nếu shaka hỗ trợ vẽ trực tiếp sử dụng Mesa, tôi không thể có được một Ngữ cảnh WebGL.

Cảm ơn!

Trả lời

0

Với X11 hiện đại, bạn nên tắt chế độ Xvfb và sử dụng trình điều khiển hiển thị dummy. Xem "Ghi chú bổ sung" tại http://www.x.org/wiki/XorgTesting để biết thông tin về cách sử dụng nó (có thể bạn sẽ chỉ định một tùy chỉnh xorg.conf với phần Device cần thiết). http://www.karlrunge.com/x11vnc/Xdummy là một cách khác để sử dụng trình điều khiển giả.

+0

Có vẻ tốt nhưng đáng buồn thay, trình điều khiển giả không hỗ trợ WebGL: ( – haehn