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

linuxglx/ - loadBMP() is not working on 64bit systems #3

Open
t-w opened this issue Sep 9, 2018 · 0 comments
Open

linuxglx/ - loadBMP() is not working on 64bit systems #3

t-w opened this issue Sep 9, 2018 · 0 comments

Comments

@t-w
Copy link

t-w commented Sep 9, 2018

The loadBMP() function, used in several examples, is not working properly on 64bit Linux, it shows:

Error: number of Planes not 1!

It seems that the problem is due to the assumption that long int is 32bit - while it is not on x86_64. In consequence the header of the BMP file is not read properly.

Anyway - changing long int to int (and %ld to %d) in the function seems to solve the problem.

t-w added a commit to t-w/nehe-opengl that referenced this issue Sep 10, 2018
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