I have recently started opengl and glut programming, I have tried to compile the examples, and i have read the documentation but i get the same error, can’t convert void to HBRUSH
that is the error, more or less, i have tried all the examples and they all give me the same error, why? am i suposed to do this in win console app instead od win32 app?
More like a user error, please tell us the website you download the example from and the compiler that you are using.
For glut you need to have it set as a console app and if you are compiling as a C try doing it as a C++.
Originally posted by XZero450:
I have recently started opengl and glut programming, I have tried to compile the examples, and i have read the documentation but i get the same error, can’t convert void to HBRUSH
that is the error, more or less, i have tried all the examples and they all give me the same error, why? am i suposed to do this in win console app instead od win32 app?
try replacing this line
wc.hbrBackground= NULL;
with
wc.hbrBackground=(HBRUSH)NUll;
where wc is the name of your window class