Bug 15297 - Bug opengl (incorect display)
Summary: Bug opengl (incorect display)
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/Unichrome (show other bugs)
Version: 6.5
Hardware: Other Linux (All)
: high major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-01 00:43 UTC by Dmitriy
Modified: 2012-11-12 13:07 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
BugOpenshrome (4.89 KB, image/png)
2008-04-01 00:43 UTC, Dmitriy
Details
If use vesa drv (9.51 KB, image/png)
2008-04-01 00:44 UTC, Dmitriy
Details
Example code for test this bug (69.89 KB, application/octet-stream)
2008-04-01 00:44 UTC, Dmitriy
Details

Description Dmitriy 2008-04-01 00:43:43 UTC
Created attachment 15594 [details]
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);
}
Comment 1 Dmitriy 2008-04-01 00:44:14 UTC
Created attachment 15595 [details]
If use vesa drv
Comment 2 Dmitriy 2008-04-01 00:44:55 UTC
Created attachment 15596 [details]
Example code for test this bug
Comment 3 James Simmons 2012-11-12 13:07:24 UTC
No longer supported in Mesa.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.