if (pixelBuffer) {
int width=pixelBuffer->getWidth();
int height=pixelBuffer->getHeight();
//printf(“Image size is %i x %i\n”, width, height);
MsgStr += “Image width is :”;
MsgStr += width;
it all compiles fine, but when i try to build the project i get an error:
error LNK2019: unresolved external symbol “class ClassDesc2 * __cdecl GetInterfaceToolDesc(void)” (?GetInterfaceToolDesc@@YAPAVClassDesc2@@XZ) referenced in function “class ClassDesc * __cdecl LibClassDesc(int)” (?LibClassDesc@@YAPAVClassDesc@@H@Z)
the only thing i change in this code (what was taken from the help file) was :EXT_PIXEL_BUFFER_INTERFACE
the helpfile it says without EXT_ and that i not working.
Perhaps you c++ guru’s know why i get this error ?
i added a couple of lib files to my project but that does not seem to solve it.
ps: there is a little typo error in the help by getting the width
Just copy and paste the InterfaceID for EXT_PIXEL_BUFFER_INTERFACE and it should be fine. For some weird reason it is not a #define like other extensions.
if (pixelBuffer) {
int width=pixelBuffer->getWidth();
int height=pixelBuffer->getHeight();
//printf(“Image size is %i x %i\n”, width, height);
MsgStr += “Image width is :”;
MsgStr += width;
for some reason pixelBuffer is null and i get connect to vfb failed.
i tried using the const value instead of : EXT_PIXEL_BUFFER_INTERFACE but that also does not work. the declaration for the vrayVFB is : VUtils::VRayVFB *vrayVFB;
You can obtain a pointer to the current frame buffer if you use the V-Ray renderer interface (e.g. you get a pointer to the current renderer, obtain from it a VRENDER_INTERFACE interface, cast it to a VRenderInterface class and call its method for accessing the current VFB). I don’t have the code in front of me right now, but I’ll check later and post it.
hmm i tried something but still doing things wrong hehehe c++ is hard to get used to. but well i’ll keepon trying. this is what i have sofar:
VRenderInterface *vrender=GetVRenderInterface(GetCOREInterface()->GetCurrentRenderer());
if (vrender) {
// Renderer is V-Ray
//now get a pointer to the vrayrender.. ?
MessageBox(NULL,“Render is vray”,“Warning”, MB_OK);
//VR::VRayVFB * getRenderVFB(vrayVFB);
VUtils::VRayVFB *vrayVFB=static_castVR::VRayVFB\*(getRenderVFB);
VUtils::PixelBufferInterface *pixelBuffer=static_castVUtils::PixelBufferInterface\*(GET_INTERFACE(vrayVFB,LARGE_CONST(2005120901)));
if (pixelBuffer) {
int width=pixelBuffer->getWidth();
int height=pixelBuffer->getHeight();
//printf(“Image size is %i x %i\n”, width, height);
MsgStr += “Image width is :”;
MsgStr += width;