LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-29-2004, 11:11 PM   #1
jspenguin
Member
 
Registered: Feb 2003
Location: Wichita, KS
Distribution: Heavily modified Redhat
Posts: 194

Rep: Reputation: 30
Black speckles in OpenGL


I am writing a simple game using OpenGL, and I am seeing black speckles at the edges of polygons on the floor and ceiling, as if somehow they aren't lining up properly. The speckes do not appear when I look straight up or down. Is this a problem with my program or with OpenGL? I am using Mesa GL with DRI (Radeon 7500).

Screenshots and video
 
Old 07-30-2004, 08:40 AM   #2
deiussum
Member
 
Registered: Aug 2003
Location: Santa Clara, CA
Distribution: Slackware
Posts: 895

Rep: Reputation: 32
Do you use mipmapping for your textures? I don't have the codec for playing your AVI, but looking at the screenshots it appears that the black spots appear more frequent the further away from the near clip plane you get. My first thought is that there is a lack of mipmapping, or that somehow the different mipmap levels aren't being lined up properly, though that is just a guess.

Maybe post a bit of the code you use for setting up the textures in OpenGL...

It doesn't look like depth fighting to me, but that is also a possibility. What are your near and far clip planes set at? Trying to tighten that up might help too. If you have too big of a distance between them, your precision suffers, especially further away.
 
Old 07-30-2004, 05:36 PM   #3
jspenguin
Member
 
Registered: Feb 2003
Location: Wichita, KS
Distribution: Heavily modified Redhat
Posts: 194

Original Poster
Rep: Reputation: 30
C source
Tarball with source, makefile and game data

To compile, run make (requires SDL, OpenGL, and SDL_Image). To run the game, run './game -nofs dukedc6.map'

I am using mipmaps; however, the problem also occurs when I turn off textures (glDisable(GL_TEXTURE_2D)). I don't think it's depth fighting, I can reduce the far clipping plane and see the cutoff ahead. I can overlap the textures some, which seems to help, but the only way to eliminate the problem with this method is to overlap them so much that the floor visibly hangs over.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Tooltips are black-on-black mooreted Slackware 3 03-16-2005 06:12 AM
X going black rhoekstra Fedora 6 01-11-2005 02:51 AM
Overwrite Mesa OpenGL with ATI OpenGL Carl-Fredrik Slackware 12 10-01-2004 03:33 PM
Changing from MESA OpenGL to ATI OpenGL tillyoubreakit Linux - Hardware 19 10-07-2003 07:32 PM
OpenGL is needed by plib-1.7.0- but i have opengl ! qwijibow Linux - Newbie 0 08-05-2003 07:12 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 11:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration