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

Direction for gradients? #60

Closed
kd7tck opened this issue Oct 25, 2015 · 3 comments
Closed

Direction for gradients? #60

kd7tck opened this issue Oct 25, 2015 · 3 comments

Comments

@kd7tck
Copy link
Contributor

kd7tck commented Oct 25, 2015

Will there be any future changes that allow for vector2 directions of gradients?

Something like
1,0 for 0,360
-1,0 for 180...

@raysan5
Copy link
Owner

raysan5 commented Oct 25, 2015

Do you mean for the basic shapes?

void DrawCircleGradient()
void DrawRectangleGradient()

Right now, those functions gradients are automatically generated by the graphic API (OpenGL) using each color vertex information. It's not possible to control de gradient direction directly...

@kd7tck
Copy link
Contributor Author

kd7tck commented Oct 25, 2015

I guess gradients are out then and textures will just have to do. Performance wise, is there any difference between shapes and textures?

@raysan5
Copy link
Owner

raysan5 commented Oct 25, 2015

Textures is the path to follow, actually, shapes are drawn using a white 1x1 texture for shader requirements.
When using textures, the only performance issue you will notice is the gpu memory required to load it. If the texture is very big, color fetching in the shader will be more costly but nothing to worry unless you are developing a really complex-graphics product for a really low-end device.

@raysan5 raysan5 closed this as completed Oct 25, 2015
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