[fixed]1.7 issue addHighLevelShaderMaterialFromFiles

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
Bate
Posts: 364
Joined: Sun Nov 01, 2009 11:39 pm
Location: Germany

[fixed]1.7 issue addHighLevelShaderMaterialFromFiles

Post by Bate »

Code: Select all

GPU = driver->getGPUProgrammingServices();

io::path vshader = "data/vshader.txt";
io::path pshader = "data/pshader.txt";

s32 newMat = GPU->addHighLevelShaderMaterialFromFiles
(
  vshader, "vmain", video::EVST_VS_2_0,
  pshader, "pmain", video::EPST_PS_2_0
);
doesn't compile anymore (it did with 1.6.1)

Ambiguous call of a overloaded function. Since the only parameter differences are IReadFile / io::path I don't see why it doesn't compile anymore. vshader obiously is a path type.

EDIT:

Works like that:

Code: Select all

s32 newMat = GPU->addHighLevelShaderMaterialFromFiles
(
  vshader, "vmain", video::EVST_VS_2_0,
  pshader, "pmain", video::EPST_PS_2_0, 0
);
However, the callback parameter is zero by default, so it should work without it. Maybe a tiny bug?
Never take advice from someone who likes to give advice, so take my advice and don't take it.
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Hmm, looks like a problematic overload, should have worked. Fixed for 1.7.1, at least most situations. If one still wants to add the default '0' in that situation, it will still be ambigous. Just because we have those pointers at that position, and 0 could be any pointer.
Post Reply