Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Perost

Black lines in textures

This topic is 5173 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! I''m working on a 2D rpg game in opengl, and I''ve got a small problem. Sometimes small black lines show up around the textures, and as you move around the map they flicker. Sometimes they''re there, sometimes not. Here''s a screenshot: http://hem.passagen.se/perost/screen1.jpg Notice the black lines above the trees? Do anyone know what''s the cause of this. I''ve searched the internet, but couldn''t find anything. I''d really appreciate some help.

Share this post


Link to post
Share on other sites
Advertisement
Those lines are the bottom of the trees wrapping around to the top. Either clamp the textures in openGL (search for clamp), or edit the texture file so that the tree trunk doens''t go all the way to the bottom of the image. (Delete the last couple of rows at the bottom of your image. Replace with transparency.)

-Madgap

Share this post


Link to post
Share on other sites
I got it to work, and I think I used GL_CLAMP_TO_EDGE (I''m using another computer, so I can''t see right now). I didn''t need any extra header-files, only gl.h. I think that''s because I use linux, I don''t think you need glext.h in linux. Or am I wrong?

Share this post


Link to post
Share on other sites
quote:
Original post by Perost
I didn''t need any extra header-files, only gl.h. I think that''s because I use linux, I don''t think you need glext.h in linux. Or am I wrong?


That''s correct, most of the time (although the it''s dependent on which headers you''re using). If you intend to make it cross-platform it at some point, you''ll need a cross-platform solution though.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!