Jump to content
  • Advertisement
Sign in to follow this  
AdamGL

OpenGL OpenGl movement problem(textures)

This topic is 4808 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

I made my program smooth scroll and my sprite moves perfectly but when my world scrolls, I get weird lines like these: Image hosted by Photobucket.com Please help! This only happens when it scrolls

Share this post


Link to post
Share on other sites
Advertisement
It appears you are skipping a pixel when tiling, you couldn't possible post some code could you? Just make sure you are rendering out tiles at the same width as you are moving along the x-axis.

Share this post


Link to post
Share on other sites
I had the same problem tiling in my game. Try using:

glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE );
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE );




when you load your textures.

Alternatively, try making your tiles over lap just a little bit, and that might alleviate the problem.

Nice screen by the way :D.

Share this post


Link to post
Share on other sites
Thanks! I like feedback on the looks of my game :D

I know this sounds weird but I get a compiler error that says GL_CLAMP_TO_EDGE is not defines, even though it is part of the OpenGL standard library. Any thoughts?

Share this post


Link to post
Share on other sites
it all worked, except now i get darker less visible lines like the old ones but only when I scroll down. Any Ideas?

Share this post


Link to post
Share on other sites
are you using a frame buffer for rendering? If not it could be that the time it takes to refresh the screen (i.e. paint the client rectangle of your app) is out of synch with the time it takes you to render a frame. It may be this delay is causing you to see a flickering of sort (not sure if that's actually the problem or something else)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!