ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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).
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.