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

compileErrors() doesn't work as intended #27

Open
YourAverageFTCPerson opened this issue Jan 27, 2024 · 0 comments
Open

compileErrors() doesn't work as intended #27

YourAverageFTCPerson opened this issue Jan 27, 2024 · 0 comments

Comments

@YourAverageFTCPerson
Copy link

YourAverageFTCPerson commented Jan 27, 2024

// Checks if the different Shaders have compiled properly
void Shader::compileErrors(unsigned int shader /* Sidenote: shouldn't this be GLuint for maximum generality? */, const char* type)
{
	// ...
	if (type != "PROGRAM") // This is never true because const char* is not std::string and this simply compares the memory addresses. If you want to check to see if the values aren't the same use strcmp(type, program) != 0 in <cstring>
	{
		// ...
	}
	else
	{
		// ...
	}
}
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

1 participant