Sunday, September 6, 2009

3D to 2D Rendering, OpenGL and MATLAB

Short notes on OpenGL rendering and attempted integration with MATLAB.

Vertex Buffer Objects (VBO)

  • Allows you to give vertex, vertexnoms, face array locations directly for openGL to render (as opposed to drawing triangles one by one)
Frame Buffer Objects (FBO)
  • Allows you to draw to a buffer/texture (without directly to the screen)

MEX and OpenGL
  • Use mex -v -lGL -lglut -lGLU cfile.c
  • Problems with glutinit() when calling mex file (MATLAB crashes when mex file is caleld again - cant do repeated rendering/calculations)
  • Probably not possible?