PDA

View Full Version : lua & opengl



Septimra
03-09-2015, 03:42 PM
Hi. I am using lua, glut, and opengl, with C++

I have a skinning algorithm that works just fine when I simply do not use any lua calls in the main loop

the momment i do this:

while(true){
glutMainLoopEvent();
luaL_dofile(L, "C:\\Users\\...\\test.lua");
}

make a lua call in the main loop, I get wierd artifacts.

I am using nothing fancy to render right now. I am simply using vertexpointers, enabledclientstate(vertex_arrays) and its all going fine
the momment I throw any lua code into the mix, it does not lag, rather--the vertices appear to stick...

Whats the cause of sticking vertices? it was happening with SLD then i switched to glut and still. THey are veritces that get "stuck" and pop back into place frames later, and its all random. Its not like the 6th frame of the animation the vertex sticks, random ones stick for random intervals.

Isn't using lua and opengl an common happenstance? What am I missing?