Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • mesa mesa
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3,032
    • Issues 3,032
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 993
    • Merge requests 993
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • MesaMesa
  • mesamesa
  • Issues
  • #289
Closed
Open
Issue created Sep 18, 2019 by Bugzilla Migration User@bugzilla-migration

swrast: drawing a line 2.0px in width has incorrect offset

Submitted by Campbell Barton

Assigned to mes..@..op.org

Link to original bug (#11956)

Description

Hi, when using blender3d with Mesa's libGL.so I notice a display problem that isnt present with NVidia's or ATI's drivers.

http://members.optusnet.com.au/cjbarton/mesabug.png

This looks to be a bug in Mesa's line drawing function since blender uses it to draw the outline.

Note that mesa has done this for a long time, and older versions had this problem also.

The example below uses glLineWidth(2.0) and glDepthMask(0) and I assume line drawing with glLineWidth(2.0) to be the problem.

is the function in blender that draws the outline around the mesh - drawobject.c:1938

/* Mesh drawing routines */

static void draw_mesh_object_outline(Object *ob, DerivedMesh *dm) {

if(G.vd->transp==0) {	// not when we draw the transparent pass
	glLineWidth(2.0);
	glDepthMask(0);
	
	/* if transparent, we cannot draw the edges for solid select... edges have no material info.
	   drawFacesSolid() doesn't draw the transparent faces */
	if(ob->dtx & OB_DRAWTRANSP) {
		glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); 
		dm->drawFacesSolid(dm, set_gl_material);
		glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
	}
	else {
		dm->drawEdges(dm, 0);
	}
				
	glLineWidth(1.0);
	glDepthMask(1);
}

}

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking