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

SetColor not working as demonstrated #73

Open
Schmel924 opened this issue Dec 16, 2021 · 2 comments
Open

SetColor not working as demonstrated #73

Schmel924 opened this issue Dec 16, 2021 · 2 comments

Comments

@Schmel924
Copy link

Schmel924 commented Dec 16, 2021

In lecture during presentation of pong-6 (fps update), new function was introduced:
love.graphics.setColor(0, 255/255, 0, 255/255)
In love2d this "new" color should persist between frames (or calls to love.draw function)
But in this example it seems each frame defaults back to white color, without explicitly calling love.graphics.setColor

I highly suspect push library is an actual reason behind this, especially line love.graphics.setColor(white, white, white) which is called during "push:finish" function, which is actually called with push:apply('end')

@Ashish-sarmah
Copy link

@Schmel924 You have suspected it very well, as I put the displayfps() function outside the push:apply('start') and push:apply('end') boundaries and the color didn't changed to white(default) it remained same as in displayfps() function. Also to be more specific I just commented the line in the push:finish() function where the color was set to white and the displayfps() color persisted.
So you can just comment out the line in push.lua file where color is changed to white and your problem is solved

@Ashish-sarmah
Copy link

Please assign me , I will do it.

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