SPU compile problem
"???? ??" <[email protected]> Thu, 11 Aug 2005 08:10:49 +0000
| Newsgroups | gmane.comp.graphics.chromium.devel |
|---|---|
| Message-ID | <[email protected]> |
I write a SPU called warpvertexspu to warp the image by a Cg program. In
the warpvertexspu.h,
I include the cg.h and cgGL.h and in warpvertexspu_init.c and
warpvertexspu.c I call cg and cgGL functions. But after I compile the source
by adding -lCgGL and -lCg to the LDFLAGS variable in the makefile, when I
use the warpvertexspu.so , It says "DLL could find/open the
warpvertexspu.so". But if I comment the cg and cgGL functions in the
warpvertexspu.c and keep the cg functions in the warpvertexspu_init.c, after
compile the SPU can work well.
the warpvertexspu.c:
#include <stdio.h>
#include "cr_spu.h"
#include "warpvertexspu.h"
static void WARPVERTEXSPU_APIENTRY warpvertexBegin(GLenum mode)
{
if(WarpParam!=NULL)
cgGLSetMatrixParameterfc(WarpParam,WarpM);
if(ModelViewProjParam!=NULL)
cgGLSetStateMatrixParameter(ModelViewProjParam,
CG_GL_MODELVIEW_PROJECTION_MATRIX,
CG_GL_MATRIX_IDENTITY);
cgGLEnableProfile(profile);
warpvertex_spu.super.Begin(mode);
}
static void WARPVERTEXSPU_APIENTRY warpvertexEnd(void)
{
warpvertex_spu.super.End();
cgGLDisableProfile(profile);
}
SPUNamedFunctionTable _cr_warpvertex_table[] = {
{ "Begin", (SPUGenericFunction)warpvertexBegin },
{ "End", (SPUGenericFunction)warpvertexEnd },
{ NULL, NULL }
};
I don't know why calling cg functions in the warpvertexspu_int.c can work
well but calling in the warpvertexspu.c cannot work. Maybe there is
something wrong with the makefile.could you give me some help?
Thanks very much!
Sincerely yours
Yang Tingjun
_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar get it now!
http://toolbar.msn.click-url.com/go/onm00200415ave/direct/01/
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf