PDA

View Full Version : xlib: extension "XFree86-DRI" missing on display ":0.0".



kiransu123
17th March 2007, 08:52
when i trying to display image the above error is coming
my program is


#include "qgl.h"
#include "qapplication.h"
#include "qimage.h"
class PaintWidget : public QGLWidget{
public:
PaintWidget(const QString &filename,QWidget *parent=0);
void paintGL();
void resizeGL(int w,int h);
protected:
QImage data,gldata;
float width,height;
};

PaintWidget::PaintWidget(const QString &filename,QWidget *parent):QGLWidget(parent){
data.load(filename);
resize(data.size());
}


void PaintWidget::paintGL(){
QImage half=data.copy(0,0,data.width()/2,data.height()/2);

gldata = QGLWidget::convertToGLFormat(half);
glDrawPixels(gldata.width(), gldata.height(), GL_RGBA, GL_UNSIGNED_BYTE, gldata.bits());

}

void PaintWidget::resizeGL(int w, int h){
glViewport(0,0,w,h);
width=w;
height=h;
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glOrtho(0,w,0,h,-1,1);
glMatrixMode(GL_MODELVIEW);
}

int main(int argc, char** argv){
QApplication app(argc,argv);
PaintWidget pw(argv[1]);
pw.showFullScreen();
return app.exec();

}

wysota
17th March 2007, 09:57
It means your OpenGL driver lacks hardware acceleration. But the application should still work on software renderer. Isn't this the case?

kiransu123
17th March 2007, 11:12
It means your OpenGL driver lacks hardware acceleration. But the application should still work on software renderer. Isn't this the case?
now i am installed the Mesa this error is disappear
but now when i try to display image on client it is showing

cannot connect to X server

i am using mpich for interface communication but normal mpich program is running properly

i gave "xhost +" the command on client sides but it is not working
do we have to set display or something else plz help

wysota
17th March 2007, 13:00
This is really not a Qt issue. If the application can't connect to an X server then obviously DISPLAY is not set correctly or the server is blocking the connection. What does echo $DISPLAY return?

kiransu123
17th March 2007, 18:54
thanks for help

henk
3rd August 2009, 15:43
This is really not a Qt issue. If the application can't connect to an X server then obviously DISPLAY is not set correctly or the server is blocking the connection. What does echo $DISPLAY return?

quite long post.. but I have similar problem.. echo $DISPLAY have the following result on my machine:

:0.0