Hi Petr
i have downloaded your m15 package. and have saved the following m15 viewer code in the folder m15Model which have 9 files. but there is an error msg : Dim type not defined , Dim model As m15Model http://s9.postimg.org/id378qp0f/msg.png
how to edit this viewer code so to work with your new package.
thanks
'#INCLUDE "m15Model.tbasicu"
Uses "TBGL","math"
Dim hWnd As DWord
Global tot, num, flag, indx, wireframe As Long
num = 1
Global v, ro, y2, x2, z2, part As Single
part = 0.99
hWnd = TBGL_CreateWindowEx("press 'W' for wire/solid Frame .... press ESC to quit", 640, 600, 32, 0)
TBGL_ShowWindow
'Dim model As m15Model
TBGL_m15InitModelBuffers 1, 2000
'TBGL_PolygonLook %GL_LINE
TBGL_m15LoadModel "womanhead.m15", "", 1, 0, %TBGL_NORMAL_SMOOTH
TBGL_GetAsyncKeyState(-1) ' Resets status of all keys
Dim gFrameTime As Long
TBGL_UseLighting 1
TBGL_UseLightSource %GL_LIGHT0, 1
gFrameTime = GetTickCount
While TBGL_IsWindow(hWnd)
If TBGL_GetWindowKeyOnce( hWnd, %VK_W) Then
If wireframe = 0 Then
TBGL_PolygonLook %GL_LINE
wireframe = 1
Else
TBGL_PolygonLook %GL_FILL
wireframe = 0
End If
End If
gFrameTime = GetTickCount
TBGL_ClearFrame
TBGL_Camera 0,7,16,0,2,0
'waves()
TBGL_m15RecalcNormals 1, %TBGL_NORMAL_SMOOTH
ro+1
TBGL_Rotate ro-90 , 0, 1, 0
TBGL_m15DrawModel 1
'model.render 1
TBGL_DrawFrame
If TBGL_GetWindowKeyState( hWnd, %VK_ESCAPE) Then Exit While
Wend
TBGL_DestroyWindow
Bookmarks