Loading...
Logo
Processing Forum
I am getting the following error when I run any code with OpenGL:
Copy code
  1. OpenGL error 1280 at bot beginDraw(): invalid enumerant
  2. OpenGL error 1280 at bot endDraw(): invalid enumerant

and the sketch runs incorrectly. even something as simple as the next code triggers it

Copy code
  1. void setup(){
      size(10,10,P3D);
     
    }

    void draw(){
    }

I'm using Linux Mint 15, the latest release, with the open source graphics drivers. But the drivers don't seem to be the problem, these sketches worked fine with Ubuntu 12.10 in this same PC and open source drivers, also the sketches throw the same errors on a laptop with the same Mint.

I did some tests and it seems to be the bundled JOGL libraries the ones that are causing the errors.

I appreciate any help you can give me.

Replies(8)

Using Lubuntu 13.04 here! 

I always remove the bundled /java folder from any of my Processing's installations.
No matter it's v1.5.1 or v2+. And neither if it's a Unix or a Windows.
This way, Processing is obliged to use the OS's installed JDK! 

Only exception is for Windows + Processing 2+ combo.
The newest launcher executable demands a /java folder! 
To get around it, I create a hardlink junction to the installed Java anyway! 

In Linux, even though Processing 2+ works, many warnings show up at the IDE's console,
when using anything different from JAVA2D default:

This shows up when starting @ P2D, P3D or OPENGL:
"libEGL warning: DRI2: failed to authenticate".

And below when program closes:
"X11Util.Display: Shutdown (JVM shutdown: false, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:0.0, 0x7f06dc439790, refCount 1, unCloseable false]
X11Util.Display: Shutdown (JVM shutdown: true, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
X11Util: Open X11 Display Connections: 1
X11Util: Open[0]: NamedX11Display[:0.0, 0x7f06dc439790, refCount 1, unCloseable false]"

I did a symlink to the Oracle Java 7 I have installed in this PC, and there hasn't been any change with the error. As I said it must be a problem with the bundled JOGL libraries and this version of Mint.
ah, I'm using Processing 2.0.1
I'm surprised you get any sort of performance with open-source drivers on linux with processing-2.0.1. Have you tried running the  examples/demos/tests/SpecsTest, and if so what do you get as output?
This is the terminal output

Copy code
  1. X.Org
  2. Gallium 0.4 on AMD JUNIPER
  3. 3.1 (Core Profile) Mesa 9.1.3
  4. OpenGL error 1280 at bot beginDraw(): invalid enumerant
  5. 1.40
  6. GL_ARB_ES2_compatibility GL_ARB_base_instance GL_ARB_blend_func_extended GL_ARB_color_buffer_float GL_ARB_copy_buffer GL_ARB_conservative_depth GL_ARB_debug_output GL_ARB_depth_buffer_float GL_ARB_depth_clamp GL_ARB_draw_buffers GL_ARB_draw_buffers_blend GL_ARB_draw_elements_base_vertex GL_ARB_draw_instanced GL_ARB_explicit_attrib_location GL_ARB_fragment_coord_conventions GL_ARB_fragment_shader GL_ARB_framebuffer_object GL_ARB_framebuffer_sRGB GL_ARB_get_program_binary GL_ARB_half_float_pixel GL_ARB_half_float_vertex GL_ARB_instanced_arrays GL_ARB_internalformat_query GL_ARB_invalidate_subdata GL_ARB_map_buffer_alignment GL_ARB_map_buffer_range GL_ARB_occlusion_query2 GL_ARB_pixel_buffer_object GL_ARB_point_sprite GL_ARB_provoking_vertex GL_ARB_robustness GL_ARB_sampler_objects GL_ARB_seamless_cube_map GL_ARB_shader_bit_encoding GL_ARB_shader_objects GL_ARB_shader_stencil_export GL_ARB_shader_texture_lod GL_ARB_sync GL_ARB_texture_buffer_object GL_ARB_texture_compression_rgtc GL_ARB_texture_cube_map_array GL_ARB_texture_float GL_ARB_texture_non_power_of_two GL_ARB_texture_rectangle GL_ARB_texture_rgb10_a2ui GL_ARB_texture_rg GL_ARB_texture_storage GL_ARB_texture_swizzle GL_ARB_timer_query GL_ARB_transform_feedback2 GL_ARB_transform_feedback3 GL_ARB_transform_feedback_instanced GL_ARB_uniform_buffer_object GL_ARB_vertex_array_bgra GL_ARB_vertex_array_object GL_ARB_vertex_shader GL_ARB_vertex_type_2_10_10_10_rev GL_EXT_abgr GL_EXT_blend_equation_separate GL_EXT_draw_buffers2 GL_EXT_draw_instanced GL_EXT_framebuffer_blit GL_EXT_framebuffer_multisample GL_EXT_framebuffer_object GL_EXT_framebuffer_sRGB GL_EXT_packed_depth_stencil GL_EXT_packed_float GL_EXT_pixel_buffer_object GL_EXT_provoking_vertex GL_EXT_texture_array GL_EXT_texture_compression_dxt1 GL_ANGLE_texture_compression_dxt3 GL_ANGLE_texture_compression_dxt5 GL_EXT_texture_compression_latc GL_EXT_texture_compression_rgtc GL_EXT_texture_compression_s3tc GL_EXT_texture_filter_anisotropic GL_EXT_texture_integer GL_EXT_texture_mirror_clamp GL_EXT_texture_shared_exponent GL_EXT_texture_snorm GL_EXT_texture_sRGB GL_EXT_texture_sRGB_decode GL_EXT_texture_swizzle GL_EXT_timer_query GL_EXT_transform_feedback GL_EXT_vertex_array_bgra GL_OES_EGL_image GL_OES_read_format GL_AMD_conservative_depth GL_AMD_draw_buffers_blend GL_AMD_seamless_cubemap_per_texture GL_AMD_shader_stencil_export GL_ATI_blend_equation_separate GL_ATI_texture_compression_3dc GL_ATI_texture_float GL_ATI_texture_mirror_once GL_IBM_multimode_draw_arrays GL_MESA_pack_invert GL_MESA_texture_signed_rgba GL_NV_conditional_render GL_NV_depth_clamp GL_NV_packed_depth_stencil GL_NV_texture_barrier GL_S3_s3tc
  7. OpenGL error 1280 at bot endDraw(): invalid enumerant
  8. X11Util.Display: Shutdown (JVM shutdown: false, open (no close attempt): 1/1, reusable (open, marked uncloseable): 0, pending (open in creation order): 1)
  9. X11Util: Open X11 Display Connections: 1
  10. X11Util: Open[0]: NamedX11Display[:0.0, 0x7f06e42d4ae0, refCount 1, unCloseable false]

I'll try and install the privative drivers. If my desktop runs ok after that I'll do more tests.


I did a symlink to the Oracle Java 7 I have installed in this PC...
The hardlink/junction/symlink is necessary for Windows + Processing 2+ only.
In Linux and any other combos, it's enough to erase/rename bundled /java subfolder
to force Processing to use OS's default Java!

Gallium 0.4 on AMD JUNIPER
AFAIK, Gallium is the open source driver for ATI/AMD graphics card.

I wasn't able to use OPENGL in Linux while using Nouveau,
which is the nVidia's open source counterpart driver.
This was true for both Processing 1.5.1 & Processing 2.0!

OPENGL worked here after I've installed the closed source driver!
After that, even WebGL was fixed! 
I installed the privative drivers and everything works now! well, almost. libEGL still complains.

But now processing's interface is buggy, it freezes and nothing within it works... but that is a different question.
I think you can ignore the libEGL message, I think its part of a disconnect between linux and closed source drivers. Interesting that Gallium reports 3.1 opengl capability, which should be sufficient for processing-2.0. However certainly with Nvidia graphics cards the performance is greatly enhanced with the closed source drivers (well 3D acceleration in particular). Regarding "symbolic"link to java, using it allows you to choose which jdk to use so you could link to Oracle jdk, even when you have OpenJDK installed. Of course on Mint you could use update-alternatives to choose between java versions but that is more work.