Skip to content

added rsgl_unused and changed unsigned comparison - #43

Open
CrackedPixel wants to merge 1 commit into
ColleagueRiley:mainfrom
CrackedPixel:rsgl-gl-suppress-warnings
Open

CrackedPixel wants to merge 1 commit into
ColleagueRiley:mainfrom
CrackedPixel:rsgl-gl-suppress-warnings

Conversation

@CrackedPixel

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread renderers/RSGL_gl.h
program.model = glGetUniformLocation(program.program, "model");

if (program.perspectiveView < 0 || program.model < 0) {
if (program.perspectiveView == SIZE_MAX || program.model == SIZE_MAX) {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only real notable change. both perspectiveView and model are size_t so -1 value would wrap to SIZE_MAX

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but this is a little weird to do. It might be better to check the return values from glGetUniformLocation as signed ints first, just so this part is less 'odd'.

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