From: Andrew Stewart (x_andrewstewart++at++hotmail.com)
Date: 02/06/2003 18:53:53
Hi all,
The current project im working on involves a win32 app with performer
support. The single window that is created is opened and handled by win32
code. I can successfully create a pipe and pfPipeWindow and pass the
relevant window handles and gl context to the pfPipeWindow and it all works.
Interestingly enough, i am unable to create a pfChannel *after* the call
to 'new pfPipeWindow(_pipe)'. If i do try and create the channel after that
call i get an error saying "the memory could not be read". Doesn't that
error usually mean a pointer hasn't been initialised ? here's the sample
code extract:
pixelFormat = ChoosePixelFormat(_hDC, &pfd);
SetPixelFormat(_hDC, pixelFormat, &pfd);
_glContext = wglCreateContext(_hDC);
wglMakeCurrent(_hDC, _glContext);
// show the window
ShowWindow(_hWnd, SW_NORMAL);
pfInit();
pfConfig();
_pipe = pfGetPipe(0);
_channel = new pfChannel(_pipe);
_pWindow = new pfPipeWindow(_pipe);
_pWindow->setOriginSize(0,0,windowRect.right - windowRect.left,
windowRect.bottom - windowRect.top);
_pWindow->setGLCxt(_glContext);
_pWindow->setWinType(PFPWIN_TYPE_UNMANAGED);
_pWindow->setFBConfig(pixelFormat);
_pWindow->setWSDrawable(_hInstance, _hWnd);
_pWindow->open();
this is correct isn't it ? i have never had any problems in linux creating
the channel after the new pfPipeWindow call. although i think its working
right now i'm not sure because i haven't drawn a model on screen yet. any
help would be appreciated explaining why this is happening.
cheers,
andrew stewart
_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*
http://join.msn.com/?page=features/junkmail
This archive was generated by hypermail 2b29 : Thu Feb 06 2003 - 18:58:08 PST