[fixed]compiling 1.7; Invalid conv. from 'void*' to 'GLuint'

You discovered a bug in the engine, and you are sure that it is not a problem of your code? Just post it in here. Please read the bug posting guidelines first.
Post Reply
DavidJE13
Posts: 165
Joined: Tue Jan 09, 2007 7:17 pm

[fixed]compiling 1.7; Invalid conv. from 'void*' to 'GLuint'

Post by DavidJE13 »

Refraining from posting this in bug reports because it's probably something I missed, but when I compile 1.7 on OSX I get several errors about this.

The line complained about is this one in COpenGLExtensionHandler.h, line 1796;

Code: Select all

glProgramParameteriEXT(program, pname, value);
2 errors:
Invalid conversion from 'void*' to 'GLuint'
Initializing argument 1 of 'void glProgramParameteriEXT(GLuint, GLenum, GLint)'

Did I miss a compile option?
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Hmm, thougt I tested the 1.7 branch under OSX. Will check this out in the next days.
booltox
Posts: 7
Joined: Thu Nov 05, 2009 5:35 am

Post by booltox »

I was able to move forward by changeing the line to

Code: Select all

glProgramParameteriEXT(GLuint)program, pname, value);
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yeah, you're right. The first parameter is GLuint. I need to figure out how to create the shader program properly, now. Because right now it's created as handle, which means a void*. Will be fixed soon :)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

This seems to be a little more problematic, because I need to adapt the new OpenGL 2.x shader creation scheme. I'll try to avoid the compilation problems (need to test under OSX), and will fix all things for Irrlicht 1.8 then.
fabietto
Posts: 93
Joined: Wed Sep 24, 2008 4:38 pm
Location: Plymouth, UK
Contact:

Post by fabietto »

There's one missing bracket in the code above, which should look like:

Code: Select all

glProgramParameteriEXT((GLuint)program, pname, value);
By the way, I incurred in the same compiling error on Snow Leopard. And thanks to this post I've been able to fix it quickly. Nice one! :)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Just try the latest SVN (or wait for 1.7.1) where it should also be fixed else. BTW: SVN/trunk has an enhanced version which should work even better, at least more reliable for versions of OpenGL 2.x and up.
alexionne
Posts: 55
Joined: Fri Jun 22, 2007 9:55 am
Location: Novi Sad, Serbia

Post by alexionne »

I've just updated to trunk, but there are still problems with void* to GLuint conversion inc COpenGLSLMaterialRenderer.cpp on lines: 330, 340, 343, 354, 365, 367 and 387. Adding (GLuint) indeed makes Irrlicht compile.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Yeah, but it wouldn't work then anymore. This was a typo. It's fixed now. Thanks for mentioning.
alexionne
Posts: 55
Joined: Fri Jun 22, 2007 9:55 am
Location: Novi Sad, Serbia

Post by alexionne »

It works now! Thanks for the quick fix :-)
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Actually, it took some more tweaks to really get it working :? I tested it on a machine which I supposed to have OpenGL2, but in fact didn't have... That's why it's so much worth to have your known machines!
alexionne
Posts: 55
Joined: Fri Jun 22, 2007 9:55 am
Location: Novi Sad, Serbia

Post by alexionne »

Unfortunately, it's not my personal Mac, so I don't have access to it all the time, but only during development, so I cannot guarantee I'll have it when next beta comes out to test it...
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Well, I just had to switch to a different machine with OpenGL 2 on it, where I could see at least some of the compiler warnings and also the non-functionality of the resulting code :)
Post Reply