le problème viens certainement de Import & ImportC , j'vais essayé avec les prototypes à la place. fé chié...
a mon avis avec import/importc les lib doivent être dans usr/lib , si elle n'est pas inscrite dans les variables d'environement.
Ca va rien donné...
IncludeFile "./OpenGL.pbi"
Structure BE_COLOR
R.b : G.b : B.b : A.b
EndStructure
Structure BE_VECTOR3
X.f : Y.f : Z.f
EndStructure
;-CONSTANTES
Global RADIAN.q = 0.0174532
Import "./BasicEngine.so"
;-engine funcs
BE_InitEngine.l()
BE_RenderWorld(*CCamera)
BE_BeginScene()
BE_EndScene()
BE_EnableZBuffer()
BE_DisableZBuffer()
;- Primitives funcs
BE_CreateCube.l(*Parent = #Null)
BE_CreateSphere.l(Radius.f,Iteration.l,*Parent = #Null)
;- Entity funcs
BE_EntityRendering(*CEntity,*CEntity_Camera)
BE_TranslateEntity(*CEntity,x.f, y.f, z.f, glob.b=#False)
BE_TurnEntity(*CEntity,x.f, y.f, z.f, glob.b=#False)
BE_RotateEntity(*CEntity,x.f, y.f, z.f, glob.b=#False)
BE_PositionEntity(*CEntity,x.f, y.f, z.f, glob.b=#False)
BE_ScaleEntity(*CEntity,x.f, y.f, z.f, glob.b=#False)
BE_MoveEntity(*CEntity,x.f, y.f, z.f)
BE_GetEntityX.f(*CEntity, glob.b=#False)
BE_GetEntityY.f(*CEntity, glob.b=#False)
BE_GetEntityZ.f(*CEntity, glob.b=#False)
BE_GetEntityPitch.f(*CEntity, glob.b=#False)
BE_GetEntityYaw.f(*CEntity, glob.b=#False)
BE_GetEntityRoll.f(*CEntity, glob.b=#False)
BE_PointEntity(*CEntity_Source ,*CEntity_target,roll.f)
BE_EntityWired(*CEntity,state.b)
BE_CountChildreen(*CEntity)
BE_CreatePivot(*Parent=#Null)
BE_SetEntityMesh(*CMesh,*Parent = #Null)
BE_GetEntityNameID.l(*CEntity)
;- Camera funcs
BE_CreateCamera.l(width,height,*Parent = #False)
BE_SetCamera(*Camera,fov.f,ratio.f,near.f,far.f)
;-FOG
BE_ActivateFog(state.b,FogStart.f=0.1,FogEnd.f=0.5,FogDensity.f=0.35)
BE_SetFogColor(red.f,green.f,blue.f,alpha.f)
BE_SetFogFilter(filter) ;0 1 2
;- Picking opérations
BE_PickingOnScene(*CCamera,x,y)
BE_PickedX.d()
BE_PickedY.d()
BE_PickedZ.d()
;- Light funcs
BE_CreateLight.l(num_ordre.l,type.b,*Parent = #False)
BE_SetLightAmbient(*CLight,red.f,green.f,blue.f,w.f=1)
BE_SetLightDiffuse(*CLight,red.f,green.f,blue.f,w.f=1)
BE_SetLightSpecular(*CLight,red.f,green.f,blue.f,w.f=1)
BE_SetLightShininess(*CLight,value.f)
BE_SetLightDirection(*CLight,x.f,y.f,z.f)
BE_SetLightCutOff(*CLight,value.f)
BE_SetLightConstantAttenuation(*CLight,value.f)
BE_SetLightLinearAttenuation(*CLight,value.f)
BE_SetLightQuadraticAttenuation(*CLight,value.f)
BE_SetLightExponent(*CLight,value)
;-Mesh funcs
BE_CreateMesh.l()
BE_AddVertex.l(*CMesh, x.f , y.f , z.f , u.f , v.f , color.l=0)
BE_AddFace.l(*CMesh,A.l,B.l,C.l)
BE_SetVertexColor.b(*CMesh, vertice.l , r.f , g.f , b.f)
BE_RenderingMesh(*CMesh)
BE_UpdateNormal(*CMesh)
BE_CountVertices.l(*CMesh)
BE_TranslateMesh(*CMesh, x.f, y.f, z.f)
BE_RotateMesh(*CMesh, x.f, y.f, z.f)
BE_ScaleMesh(*CMesh, x.f, y.f, z.f)
;- Material func
BE_CreateMaterial.l()
BE_SetMaterialTexture(*CMaterial,*CTexture)
BE_SetMaterialAmbient(*CMaterial,red.f,green.f,blue.f,w.f=1)
BE_SetMaterialDiffuse(*CMaterial,red.f,green.f,blue.f,w.f=1)
BE_SetMaterialSpecular(*CMaterial,red.f,green.f,blue.f,w.f=1)
BE_SetMaterialEmissive(*CMaterial,red.f,green.f,blue.f,w.f=1)
BE_SetMaterialShininess(*CMaterial,value.f)
BE_SetEntityMaterial(*CEntity,*CMaterial)
;- Texture func
BE_CreateTexture.l(width, height)
BE_TexturePutPixel(*CTexture, x, y,red.c ,green.c, blue.c, alpha.c)
BE_GenerateTextureID.l(*CEntity,*CTexture)
BE_SetTextureArray(*CTexture,*Array)
EndImport
XIncludeFile "./BasicEngine_PureBasic_Ext.pbi"
XIncludeFile "./Predefined_Materials.pbi"