JOGL errors on Intel HD Graphics (Ubuntu 12.10)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

JOGL errors on Intel HD Graphics (Ubuntu 12.10)

mikaelhc
Hi,

I am encountering some very weird behavior on some Linux systems.

I've have been working on an application which works on Windows and Mac. But on Linux it only works on some setups, such as Nvidia's GPU with proprietary drivers.

On my Linux test system (Ubuntu 12.10) with Intel HD graphics, I'm not able to draw anything. I'm able to set the background color, but whenever I try to render something, I get errors.

This behavior can be reproduced using this simple program:

package com.clcbio.api.structure.viewer.mockup;

import java.awt.Frame;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.media.opengl.DebugGL2;
import javax.media.opengl.GL;
import javax.media.opengl.GL2;
import javax.media.opengl.GLAutoDrawable;
import javax.media.opengl.GLCapabilities;
import javax.media.opengl.GLEventListener;
import javax.media.opengl.GLProfile;
import javax.media.opengl.awt.GLCanvas;

public class JoglTest implements GLEventListener {
    static GLProfile glp;
    
    private float theta;
    private float s;
    private float c;
    
    static {
        glp = GLProfile.getDefault();
    }
    
    public static void main(String[] args) {
        GLCapabilities caps = new GLCapabilities(glp);
        GLCanvas canvas = new GLCanvas(caps);
        // GLJPanel canvas = new GLJPanel(caps);
        
        Frame frame = new Frame("AWT Window Test");
        frame.setSize(300, 300);
        frame.add(canvas);
        frame.setVisible(true);
        
        frame.addWindowListener(new WindowAdapter() {
            @Override
            public void windowClosing(WindowEvent e) {
                System.exit(0);
            }
        });
        
        canvas.addGLEventListener(new JoglTest());
        // FPSAnimator animator = new FPSAnimator(canvas, 60);
        // animator.add(canvas);
        // animator.start();
    }
    
    @Override
    public void display(GLAutoDrawable drawable) {
        render(drawable);
    }
    
    @Override
    public void dispose(GLAutoDrawable drawable) {
    }
    
    @Override
    public void init(GLAutoDrawable drawable) {
    }
    
    @Override
    public void reshape(GLAutoDrawable drawable, int x, int y, int w, int h) {
    }
    
    private void render(GLAutoDrawable drawable) {
        GL2 gl = drawable.getGL().getGL2();
        
        drawable.setGL(new DebugGL2(gl));
        gl.glClearColor(1.0f, 0.0f, 1.0f, 1.0f);
        gl.glClear(GL.GL_COLOR_BUFFER_BIT);
        
        gl.glBegin(GL.GL_TRIANGLES);
        
        gl.glColor3f(1, 0, 0);
        gl.glVertex3f(-c, -c, 0);
        gl.glColor3f(0, 1, 0);
        gl.glVertex3f(0, c, 0);
        gl.glColor3f(0, 0, 1);
        gl.glVertex3f(s, -s, 0);
        
        gl.glEnd();
        
        theta += 0.1;
        s = (float) Math.sin(theta);
        c = (float) Math.cos(theta);
    }
}

I've attached the debug information I get when running the program:
http://pastebin.com/Q24SmAcq

It should be said, that I'm able to run other OpenGL 3D applications on this system.

Any help would be greatly appreciated!

Regards,
Mikael.
Reply | Threaded
Open this post in threaded view
|

Re: JOGL errors on Intel HD Graphics (Ubuntu 12.10)

Sven Gothel
Administrator
On 04/17/2013 01:18 PM, mikaelhc [via jogamp] wrote:

> Hi,
>
> I am encountering some very weird behavior on some Linux systems.
>
> I've have been working on an application which works on Windows and Mac. But
> on Linux it only works on some setups, such as Nvidia's GPU with proprietary
> drivers.
>
> On my Linux test system (Ubuntu 12.10) with Intel HD graphics, I'm not able to
> draw anything. I'm able to set the background color, but whenever I try to
> render something, I get errors.
...

> I've attached the debug information I get when running the program:
> http://pastebin.com/Q24SmAcq

Many bugs have been fixed in regards to Mesa and the Intel hw renderer
since RC11.
 
+++
 
Please use one of the latest aggregated archives[1],
as described in this section[2].

[1] <http://jogamp.org/deployment/archive/master/?C=M;O=D>
[2] <https://jogamp.org/wiki/index.php/Downloading_and_installing_JOGL#Downloading_the_latest_aggregated_autobuild>

<https://jogamp.org/wiki/index.php/Jogl_FAQ#Bugreports_.26_Testing>

+++

>
> It should be said, that I'm able to run other OpenGL 3D applications on this
> system.

Well .. :)

>
> Any help would be greatly appreciated!
>

I guess the latest aggregated build should work ..

~Sven


signature.asc (911 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: JOGL errors on Intel HD Graphics (Ubuntu 12.10)

mikaelhc
Many, many thanks for the quick response.

The latest aggregated build works - I have not tested in depth yet, but it seems that most functionality, including custom shaders, work.

Best regards, Mikael.