Farabi.Onan - 2012-05-13

Hello SIr, Sorry to disturb you.
Your Assimp project is amazing sir. I very impressed by your skill on math and programming. Unfortunately Im stupid enough on programming and cannot catch your skill on your programming and only able to use partial of Assimp function. Can you make assimp support OpenGL Vertex Buffer Object so I can draw the function by using the method like the code below?

fDrawTri proc uses esi edi lpfTri:dword,nFlag:dword
LOCAL nIndex:dword
LOCAL texture:dword
LOCAL i:BITMAP

mov esi,lpfTri

push 0
pop texture
.if .fTri.TexID!=0
invoke glEnable,GL_TEXTURE_2D
invoke glBindTexture,GL_TEXTURE_2D,.fTri.TexID
push 1
pop texture
.endif

invoke glEnableClientState,GL_VERTEX_ARRAY
invoke glEnableClientState,GL_NORMAL_ARRAY
invoke glEnableClientState,GL_TEXTURE_COORD_ARRAY
invoke glEnableClientState,GL_COLOR_ARRAY

.if .fTri.nBlend==TRUE
    invoke glEnable,GL_BLEND
.endif
.if .fTri.bLight==TRUE
invoke glEnable,GL_LIGHTING
.else
invoke glDisable,GL_LIGHTING
.endif
.if .fTri.bCull==TRUE
invoke glEnable,GL_CULL_FACE
invoke glCullFace,.fTri.bCull
.endif
  
   invoke glColor4f,FP4(1.0),FP4(1.0),FP4(1.0),.fTri.nTransp
   invoke glColorPointer,3,GL_FLOAT,0,.fTri.lpColor
invoke glVertexPointer,3,GL_FLOAT,0,.fTri.lpVertex
invoke glNormalPointer,GL_FLOAT,0,.fTri.lpNormals
invoke glTexCoordPointer,2,GL_FLOAT,0,.fTri.lpTextC
invoke glDrawArrays,nFlag,0,.fTri.nVertex

mov ecx,.fTri.nVertex
add gVertex,ecx

invoke glDisable,GL_BLEND
invoke glDisable,GL_CULL_FACE
invoke glDisableClientState,GL_VERTEX_ARRAY
invoke glDisableClientState,GL_NORMAL_ARRAY
invoke glDisableClientState,GL_TEXTURE_COORD_ARRAY
invoke glDisableClientState,GL_COLOR_ARRAY
invoke glDisable,GL_TEXTURE_2D
invoke glBindTexture,GL_TEXTURE_2D,0

ret
fDrawTri endp

I need the vertex, Normals and Texture Coordinate compiled as an array so I only need to pass the pointer to OpenGL directly. If you do so, the rendering system will be fast and tinier. Thanks for the advance, I also send this message on the mailing list.

Thanks,
Onan Farabi.