Page 1 of 1

ABSTRACT CLASS ERROR

Posted: Fri Sep 22, 2006 2:33 pm
by belfegor
WHEN I CREATE OBJECT OF MY class MyShaderCallBack
in VS2005 i get an error"cannot instantied object becouse its abstract
due to following members OnSetShaderConstant ...(sory my english is bad)"

Posted: Fri Sep 22, 2006 3:06 pm
by Dibalo
You can´t make new instances from abstract class. So you have to derive your own shader-class using ShaderCallBack-class. That means that you have to override all pure virtual functions from ShaderCallBack-class.

I think that message is trying to tell you that you haven´t overrided OnSetShaderConstant-method yet.

Posted: Sun Sep 24, 2006 3:44 pm
by belfegor
thanx for reply.i solved it by adding second parametar to
method OnSetShaderConstant even if that parametar is not used
(s32 userData).i m still learning c++.
for what then this parametar can be used, i'v like to se some example of
it.please anyone? thanx in advance.