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

[rlgl] Add support for glPolygonOffset() #4580

Closed
wants to merge 2 commits into from

Conversation

mikeemm
Copy link
Contributor

@mikeemm mikeemm commented Dec 5, 2024

Added the following functions into rlgl.h;

void rlEnablePolygonOffsetFill(void);
void rlDisablePolygonOffsetFill(void);
void rlEnablePolygonOffsetLine(void);
void rlDisablePolygonOffsetLine(void);
void rlEnablePolygonOffsetPoint(void);
void rlDisablePolygonOffsetPoint(void);
void rlSetPolygonOffset(float factor, float units);

This allows us to call glPolygonOffset(), which helps minimize z-fighting when we want to draw lines or other shapes along the surface of a mesh.

@raysan5
Copy link
Owner

raysan5 commented Dec 8, 2024

@mikeemm I prefer to avoid that set of functions on rlgl, anyone with that specific need can use OpenGL directly.

@raysan5 raysan5 closed this Dec 8, 2024
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

Successfully merging this pull request may close these issues.

2 participants