Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with crop functions and tex_repeat #3

Open
nikmes opened this issue Apr 4, 2016 · 2 comments
Open

Problem with crop functions and tex_repeat #3

nikmes opened this issue Apr 4, 2016 · 2 comments

Comments

@nikmes
Copy link

nikmes commented Apr 4, 2016

Hi,

I am not sure if you are still working on this but i see that you made SDL port. I have an issue when running code on PSP and it has to do with crop functions. When i g2dSetCropXY(cx, cy); and i increase cx by 1 or decrease by 1 depending on which direction i am scrolling i have an issue. Basicaly when i start scrolling cx-=1 i get weird artifacts, when i scroll the other direction cx+=1 all is good. Same happens when i scolling the image using cy.

Here is a screen shot with artifacts:
image

I get the same problem on a real PSP.

I am using your rendering library (an opengl version as well) to render all my graphics for this tool www.facebook.com/2dleveleditor

Thanks for this library! Is amazing!

Regards

@libcg
Copy link
Owner

libcg commented Apr 5, 2016

Not sure how to fix this but I would suggest to change your view on this. Don't crop your texture but draw it large enough so it covers the screen.

Always happy to hear that someone is using that library!

@nikmes
Copy link
Author

nikmes commented Apr 6, 2016

Hi, Thanks a lot for the response. Actually I crop the texture to achieve the infinite scrolling effect of the background. I figure out another work around. Before I start cx-=1 or cx+=1 to scroll it, i initialize cx=text->width_1000 and cy=text->height_1000 and now no matter which direction i scroll left or right up or down i do not get the artifacts.

Thanks a lot for your response! I learned a lot from your code, especially from the gSquare game. Thanks for your open source contributions.

Regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants