Can't see Debug Drawing

sussumu
Posts: 3
Joined: Fri Mar 20, 2015 3:43 pm

Can't see Debug Drawing

Post by sussumu »

I'm pretty sure I setup the debug drawing correctly but still can't see the wireframe and stuff.
I copied the code (although I don't remember from where) that implements the derivative class from btIDebugDraw and called it on my code. The function is called since I can get a printf() response from it but there's no draw...

The simulation is a simple cube that falls until it hits a plane that I represented by a finite square using glew+glfw and modern opengl. I saw that the drawLine() function on debug class implements an old version using glBegin(), glEnd(), etc... but I think this is the problem.

I'm trying to do this because the cube have the size (1, 1, 1) with the collider (1, 1, 1) but it's floating. Probably this is my misunderstanding of sizes and positions.

Thanks in advance (:

Setting up the debug on main outside of loop:

Code: Select all

GLDebugDrawer *debugDraw = new GLDebugDrawer();
	dynamicsWorld->setDebugDrawer(debugDraw);
	debugDraw->setDebugMode(btIDebugDraw::DBG_DrawWireframe);
Calling the function inside of loop:

Code: Select all

dynamicsWorld->debugDrawWorld();
You do not have the required permissions to view the files attached to this post.