Hello
I’m currently into 3ds models.
So I’ve tried to create a file that looked similar to player.c(the example of lib3ds).
But I’m getting a segmentation fault when I call glMaterialfv()
Here’s a piece of my renderNode function:
#0 0x40e7e3d4 in _nv001079gl () from /usr/lib/libGLcore.so.1 #1 0x4190a040 in ?? () #2 0x00000030 in ?? () #3 0x00000018 in ?? () #4 0x00001201 in ?? () #5 0x40e0c347 in ?? () from /usr/lib/libGLcore.so.1 #6 0x08101d88 in ?? () #7 0x00000030 in ?? () #8 0x00000000 in ?? () #9 0x4190a040 in ?? () #10 0x00000010 in ?? () #11 0x08062588 in ?? () #12 0x000000dc in ?? () #13 0x0804b1b8 in ?? () #14 0x40ae8a48 in ?? () from /usr/lib/libGL.so.1 #15 0x00000000 in ?? () #16 0x00000000 in ?? () #17 0x40f12fd2 in _nv000812gl () from /usr/lib/libGLcore.so.1 #18 0x0815c750 in ?? ()
Is it a problem in my driver or in my code, I gues it’s the last but you never can be sure enough.
And if it’s a problem in my code, how can I fix it?
Thanx Hylke
Thank you for your reply.
About how advanced this topic is: I gues it isn’t that advanced, but I thought I would have a better chance on a good answere on the advanced forum than the beginners forum.
And about the pointers:
Could this be the problem:
Lib3dsVector *normals;
(float*)normals = new Lib3dsVector;
?
Cus the original code did not work for me, with a c++ compiler.