i have installed the new mp3d on Purebasic v5.00 (i have many versions on the same C:\) but i run it in winxp not win7 like you, it runs okay from the ide or as a compiled .exe. i have used the following code, have you tried to right click the exe file then choose run as administrator ?
Code: Select all
Global xres=800, yres=600
MP_Graphics3D (xres,yres,0,3)
SetWindowTitle(0, "plane")
camera=MP_CreateCamera()
light=MP_CreateLight(2)
MP_InitShadow()
Width=256
Height=256
;to make a background with gradient color
If CreateImage(0, Width, Height)
MP_CreateImageColored(0, 0, RGB(0,255,255), RGB(0,255,255), RGB(200,0,255), RGB(200,0,255))
EndIf
Surface = MP_ImageToSurface(0,0)
FreeImage(0)
MP_SurfaceSetPosition(Surface,0,0,1)
MP_SurfaceDestRect(Surface,0, 0, xres, yres)
texture = MP_CreateTextureColor(256, 256, RGBA(0, 0, 255, 255))
plane = MP_CreatePlane(1, 1)
MP_ScaleMesh(plane, 4, 4, 4)
MP_EntitySetTexture(plane, texture)
MP_RotateEntity(plane, 90, 0, 90)
MP_PositionEntity(light, 0, 20, 20)
MP_EntityLookAt(light,0,0,0)
MP_PositionCamera (Camera, 3, 2, 6)
MP_CameraLookAt(Camera,0,0,0)
While Not MP_KeyDown(#PB_Key_Escape) And Not WindowEvent() = #PB_Event_CloseWindow
MP_RenderWorld()
MP_Flip ()
Wend