http://bugs.freedesktop.org/show_bug.cgi?id=15297

           Summary: Bug opengl (incorect display)
           Product: Mesa
           Version: 6.5
          Platform: Other
        OS/Version: Linux (All)
            Status: NEW
          Severity: major
          Priority: high
         Component: Drivers/DRI/Unichrome
        AssignedTo: dri-devel@lists.sourceforge.net
        ReportedBy: [EMAIL PROTECTED]


Created an attachment (id=15594)
 --> (http://bugs.freedesktop.org/attachment.cgi?id=15594)
BugOpenshrome

Please look attachment
Incorect display Xtree (if use vesa drv - ok, openchrome - no display) , for
example code :

main.cpp
#include <qapplication.h>
#include "myglwidget.h"
int main(int argc,char** argv)
{
  QApplication app(argc,argv);
  MyGLWidget myglw;
  myglw.setFixedSize(500,500);
  myglw.show();
  app.setMainWidget(&myglw);
  return app.exec();
}
myglwidget.h
#ifndef _myglwidget_h_
#define _myglwidget_h_
#include <qgl.h>
class MyGLWidget:public QGLWidget
{
  Q_OBJECT
  protected:
   virtual void paintGL();
   virtual void initializeGL();
   virtual void resizeGL(int nWidth,int nHeight);
};
#endif //_myglwidget_h_
myglwidget.cpp
#include "myglwidget.h"
void MyGLWidget::initializeGL()
{
  qglClearColor(white);
}
void MyGLWidget::resizeGL(int nWidth,int nHeight)
{
  glViewport(0,0,(GLint)nWidth,(GLint)nHeight);
  glMatrixMode(GL_PROJECTION);
  glLoadIdentity();
  glOrtho(0,100,0,100,-1,1);
  glMatrixMode(GL_MODELVIEW);
  glLoadIdentity();
}
void MyGLWidget::paintGL()
{
  glClear(GL_COLOR_BUFFER_BIT);
  glColor3f(0.0,0.0,0.0);
  glEnable(GL_LINE_STIPPLE);
  GLint linepattern=0xFF18;
  glLineStipple(2,linepattern);
  glLineWidth(2.0f);
  glBegin(GL_LINE_LOOP);
  glVertex2f(5,5);
  glVertex2f(5,95);
  glVertex2f(95,95);
  glVertex2f(95,5);
  glEnd();
  glDisable(GL_LINE_STIPPLE);
  glColor3f(0.5,0.2,0.2);
  glBegin(GL_TRIANGLES);
  glVertex2f(50,90);
  glVertex2f(46,10);
  glVertex2f(54,10);
  glVertex2f(30,10);
  glVertex2f(50,15);
  glVertex2f(70,10);
  glEnd();
  glColor3f(0.0,1.0,0.0);
  glEnable(GL_POLYGON_STIPPLE);
  GLubyte rightpattern[]=
  {
   0xFF,0xF0,0xFF,0xFF,
   0xFF,0x0F,0xFF,0x0F,
   0xFF,0xFF,0xF0,0xFF,
   0x0F,0xFF,0x0F,0xFF,
   0xFF,0xFF,0xFF,0xF0,
   0xFF,0x0F,0xFF,0x0F,
   0xF0,0xFF,0xFF,0xFF,
   0x0F,0xFF,0x0F,0xFF,
   0xFF,0xF0,0xFF,0xFF,
   0xFF,0x0F,0xFF,0x0F,
   0xFF,0xFF,0xF0,0xFF,
   0x0F,0xFF,0x0F,0xFF,
   0xFF,0xFF,0xFF,0xF0,
   0xFF,0x0F,0xFF,0x0F,
   0xF0,0xFF,0xFF,0xFF,
   0x0F,0xFF,0x0F,0xFF,
   0xFF,0xF0,0xFF,0xFF,
   0xFF,0x0F,0xFF,0x0F,
   0xFF,0xFF,0xF0,0xFF,
   0x0F,0xFF,0x0F,0xFF,
   0xFF,0xFF,0xFF,0xF0,
   0xFF,0x0F,0xFF,0x0F,
   0xF0,0xFF,0xFF,0xFF,
   0x0F,0xFF,0x0F,0xFF,
   0xFF,0xF0,0xFF,0xFF,
   0xFF,0x0F,0xFF,0x0F,
   0xFF,0xFF,0xF0,0xFF,
   0x0F,0xFF,0x0F,0xFF,
   0xFF,0xFF,0xFF,0xF0,
   0xFF,0x0F,0xFF,0x0F,
   0xF0,0xFF,0xFF,0xFF,
   0x0F,0xFF,0x0F,0xFF
  };
  glPolygonStipple(rightpattern);
  glBegin(GL_TRIANGLES);
  glVertex2f(50,70);
  glVertex2f(60,70);
  glVertex2f(50,90);
  glVertex2f(50,50);
  glVertex2f(70,50);
  glVertex2f(50,80);
  glVertex2f(50,30);
  glVertex2f(80,30);
  glVertex2f(50,70);
  glEnd();
  GLubyte leftpattern[]=
  {
   0xFF,0xFF,0x0F,0xFF,
   0xF0,0xFF,0xF0,0xFF,
   0xFF,0x0F,0xFF,0xFF,
   0xFF,0xF0,0xFF,0xF0,
   0x0F,0xFF,0xFF,0xFF,
   0xF0,0xFF,0xF0,0xFF,
   0xFF,0xFF,0xFF,0x0F,
   0xFF,0xF0,0xFF,0xF0,
   0xFF,0xFF,0x0F,0xFF,
   0xF0,0xFF,0xF0,0xFF,
   0xFF,0x0F,0xFF,0xFF,
   0xFF,0xF0,0xFF,0xF0,
   0x0F,0xFF,0xFF,0xFF,
   0xF0,0xFF,0xF0,0xFF,
   0xFF,0xFF,0xFF,0x0F,
   0xFF,0xF0,0xFF,0xF0,
   0xFF,0xFF,0x0F,0xFF,
   0xF0,0xFF,0xF0,0xFF,
   0xFF,0x0F,0xFF,0xFF,
   0xFF,0xF0,0xFF,0xF0,
   0x0F,0xFF,0xFF,0xFF,
   0xF0,0xFF,0xF0,0xFF,
   0xFF,0xFF,0xFF,0x0F,
   0xFF,0xF0,0xFF,0xF0,
   0xFF,0xFF,0x0F,0xFF,
   0xF0,0xFF,0xF0,0xFF,
   0xFF,0x0F,0xFF,0xFF,
   0xFF,0xF0,0xFF,0xF0,
   0x0F,0xFF,0xFF,0xFF,
   0xF0,0xFF,0xF0,0xFF,
   0xFF,0xFF,0xFF,0x0F,
   0xFF,0xF0,0xFF,0xF0
  };
  glPolygonStipple(leftpattern);
  glBegin(GL_TRIANGLES);
  glVertex2f(40,70);
  glVertex2f(50,70);
  glVertex2f(50,90);
  glVertex2f(30,50);
  glVertex2f(50,50);
  glVertex2f(50,80);
  glVertex2f(20,30);
  glVertex2f(50,30);
  glVertex2f(50,70);
  glEnd();
  glDisable(GL_POLYGON_STIPPLE);
}


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to