Jump to content

macklebee

Members
  • Posts

    3,946
  • Joined

  • Last visited

Everything posted by macklebee

  1. are you setting the collision type? if so, what to? is the collision relationship setup correctly? is the bottom of the box below the surface of the floor/terrain before you set the mass? are you sure the phy body matches the floor mesh?
  2. Try SetBlend() SetBlend(1) DrawImage(...) SetBlend(0)
  3. good to know... was just curious. thanks.
  4. wasn't meant as one towards you, just the ones that seem to take it upon themselves to post their fanboy comments on our topics.
  5. Since the include file is being used for the LE3 editor, the question that comes to mind is whether all of the LE commands will be used for the editor. Are the items listed here just what is currently needed for the editor or will there be a full version released? Or maybe this is just an abbreviated version that you posted for show? SuperStrict Import brl.pngloader Import "le3.lib" Import "le_const.bmx" Import "le_types.bmx" Extern "c" 'General 'Function leSetHook(hookid:Int,hook:Byte Ptr)="SetHook" Function leGetLogText_(char:Byte Ptr,length:Int)="GetLogText" 'Bank Function lePeekBankByte:Int(bank:LEBank,position:Int)="PeekBankByte" Function leGetBankSize:Int(bank:LEBank)="GetBankSize" Function leGetBankBuffer:Byte Ptr(bank:LEBank)="GetBankBuffer" 'Network Function leCreateServer:leServer(port:Int)="CreateServer" Function leUpdateServer:leMessage(server:leServer,timeout:Int)="UpdateServer" Function leDisconnectServer(server:leServer,client:LEPeer,force:Int)="DisconnectServer" Function leSendServer:Int(server:leServer,client:LEPeer,messageid:Int,date:Byte Ptr,size:Int,channel:Int,flags:Int)="SendServer" 'Window Function leCreateWindow:leWindow(title$z,width:Int,height:Int,style:Int)="CreateWindow" Function leCreateCustomWindow:leWindow(hwnd:Int)="CreateCustomWindow" Function leGetWindowWidth:Int(window:leWindow)="GetWindowWidth" Function leGetWindowHeight:Int(window:leWindow)="GetWindowHeight" Function leSetWindowShape(window:LEWindow,x:Int,y:Int,width:Int,height:Int)="SetWindowShape" Function leFreeWindow(window:leWindow)="FreeWindow" 'Graphics driver Function leSetGraphicsDriver(graphicsdriver:LEGraphicsDriver)="SetGraphicsDriver" Function leCreateOpenGL1GraphicsDriver:LEOpenGL1GraphicsDriver()="CreateOpenGL1GraphicsDriver" Function leCreateOpenGL3GraphicsDriver:LEOpenGL3GraphicsDriver()="CreateOpenGL3GraphicsDriver" Function leGetGraphicsDriver:LEGraphicsDriver()="GetGraphicsDriver" Function leGetGraphicsDriverName_:Int(graphicsdriver:LEGraphicsDriver,name:Byte Ptr,length:Int)="GetGraphicsDriverName" Function leGetGraphicsDriverVendor:Int(graphicsdriver:LEGraphicsDriver)="GetGraphicsDriverVendor" Function leGraphicsDriverSupported:Int(graphicsdriver:LEGraphicsDriver)="GraphicsDriverSupported" Function leBuffersSupported:Int()="BuffersSupported" 'File system Function leSetDir(path$z)="SetDir" 'Context Function leCreateContext:LEContext(window:LEWindow,multisamplemode:Int)="CreateContext" Function leSwapContext(context:LEContext,sync:Int)="SwapContext" 'Function leFreeContext(context:LEContext)="FreeContext" 'Buffer Function leCreateBuffer:LEBuffer(width:Int,height:Int,colortextures:Int,depthtexture:Int,multisamplemode:Int)="CreateBuffer" Function leClearBuffer(Buffer:LEBuffer,Mode:Int)="ClearBuffer" Function leGetBufferColorTexture:LETexture(Buffer:LEBuffer,index:Int)="GetBufferColorTexture" Function leGetBufferDepthTexture:LETexture(Buffer:LEBuffer)="GetBufferDepthTexture" Function leGetBuffer:LEBuffer()="GetBuffer" Function leGetBufferWidth:Int(buffer:LEBuffer)="GetBufferWidth" Function leGetBufferHeight:Int(buffer:LEBuffer)="GetBufferHeight" Function leSetBuffer(Buffer:LEBuffer)="SetBuffer" Function leFreeBuffer(Buffer:LEBuffer)="FreeBuffer" Function leGetBufferPixels(buffer:LEBuffer,buf:Byte Ptr,component:Int)="GetBufferPixels" 'World Function leCreateWorld:LEWorld()="CreateWorld" Function leSetWorld(World:LEWorld)="SetWorld" Function leGetWorld:LEWorld()="GetWorld" Function leRenderWorld()="RenderWorld" Function leFreeWorld(World:LEWorld)="FreeWorld" Function leSetWorldAmbientLight(world:LEWorld,r:Float,g:Float,b:Float,a:Float)="SetWorldAmbientLight" 'Entity Function leSetEntityPosition(entity:LEEntity,x:Float,y:Float,z:Float,glb:Int)="SetEntityPosition" Function leSetEntityRotation(entity:LEEntity,x:Float,y:Float,z:Float,glb:Int)="SetEntityRotation" Function leGetEntityPosition(entity:LEEntity,rotation:Byte Ptr,glb:Int)="GetEntityPosition" Function leGetEntityRotation(entity:LEEntity,rotation:Byte Ptr,glb:Int)="GetEntityRotation" Function leGetEntityMatrix(entity:LEEntity,matrix:Byte Ptr)="GetEntityMatrix" Function leMoveEntity(entity:LEEntity,x:Float,y:Float,z:Float,glb:Int)="MoveEntity" Function leTurnEntity(entity:LEEntity,x:Float,y:Float,z:Float,glb:Int)="TurnEntity" Function leAlignEntityToVector(entity:LEEntity,x:Float,y:Float,z:Float,axis:Int,rate:Float,roll:Float)="AlignEntityToVector" Function leSetEntityMaterial(entity:LEEntity,material:LEMaterial)="SetEntityMaterial" Function leFreeEntity(entity:LEEntity)="FreeEntity" Function leHideEntity(entity:LEEntity)="HideEntity" Function leShowEntity(entity:LEEntity)="ShowEntity" Function leGetEntityAABB(entity:LEEntity,aabb:Byte Ptr,Mode:Int)="GetEntityAABB" Function leCountEntityChildren(entity:LEEntity)="CountEntityChildren" Function leGetEntityChild(entity:LEEntity,n:Int)="GetEntityChild" Function leSetEntityParent(entity:LEEntity,parent:LEEntity,glb:Int)="SetEntityParent" Function leEntityHidden:Int(entity:LEEntity)="EntityHidden" 'Pivot Function leCreatePivot:LEPivot(parent:LEEntity)="CreatePivot" 'Camera Function leCreateCamera_:LECamera(parent:LEEntity)="CreateCamera" Function leSetCameraProjectionMode(Camera:LECamera,projectionmode:Int)="SetCameraProjectionMode" Function leGetCameraProjectionMode:Int(Camera:LECamera)="GetCameraProjectionMode" Function leSetCameraClearColor(Camera:LECamera,r:Float,g:Float,b:Float,a:Float)="SetCameraClearColor" Function leGetCameraClearColor(Camera:LECamera,color:TVec4)="GetCameraClearColor" Function leSetCameraZoom(Camera:LECamera,zoom:Float)="SetCameraZoom" Function leGetCameraZoom:Float(Camera:LECamera)="GetCameraZoom" Function leSetCameraDrawMode(Camera:LECamera,Mode:Int)="SetCameraDrawMode" Function leSetCameraRange(camera:LECamera,nearrange:Float,farrange:Float)="SetCameraRange" Function leGetCameraRange(camera:LECamera,Range:Byte Ptr)="GetCameraRange" Function leSetCameraFOV(camera:LECamera,fov:Float)="SetCameraFOV" Function leGetCameraFOV:Float(camera:LECamera)="GetCameraFOV" Function leSetCameraMotionBlurMode(camera:LECamera,mode:Int)="SetCameraMotionBlurMode" Function leSetCameraViewport(camera:LECamera,x:Float,y:Float,width:Float,height:Float)="SetCameraViewport" Function leGetCameraViewport(camera:LECamera,viewport:Byte Ptr)="GetCameraViewport" 'Light Function leCreateDirectionalLight:LEDirectionalLight(parent:LEEntity)="CreateDirectionalLight" 'Model Function leLoadModel:LEModel(path$z,flags:Int)="LoadModel" Function leCreateModelSphere:LEModel(sides:Int)="CreateModelSphere" Function leCreateCube:LEModel(parent:LEEntity)="CreateCube" Function leFlipModelNormals(model:LEModel)="FlipModelNormals" 'Function leCreateModelSphere:Byte Ptr(sides:Int)="CreateModelSphere" 'Timing Function leUPS:Float()="UPS" Function leUpdateTime()="UpdateTime" 'Font Function leLoadfont:LEFont(path$z,size:Int,style:Int,family:Int)="LoadFont" Function leDrawFontText(font:LEFont,text$z,x:Int,y:Int,kerning:Float)="DrawFontText" Function leGetFontTextWidth(font:LEFont,text$z)="GetFontTextWidth" Function leGetFontHeight(font:LEFont)="GetFontHeight" Function leFreeFont(font:LEFont)="FreeFont" 'Drawing Function leDrawLine(x0:Int,y0:Int,x1:Int,y1:Int)="DrawLine" Function leDrawRect(x:Int,y:Int,width:Int,height:Int,style:Int)="DrawRect" Function leDrawImage(image:LETexture,x:Int,y:Int,width:Int,height:Int)="DrawImage" Function leSetBlendMode(blendmode:Int)="SetBlendMode" Function leSetColor(r:Float,g:Float,b:Float,a:Float)="SetColor" Function leSetClearColor(r:Float,g:Float,b:Float,a:Float)="SetClearColor" Function leSetScale(x:Float,y:Float)="SetScale" Function leSetRotation(rotation:Float)="SetRotation" Function leSetTranslation(x:Float,y:Float)="SetTranslation" Function leTileImage(texture:LETexture)="TileImage" Function leSetViewport(x:Int,y:Int,width:Int,height:Int)="SetViewport" 'Asset Function leGetAssetName_:Int(asset:LEAsset,name:Byte Ptr,length:Int)="GetAssetName" Function leGetAssetAssetReference:LEAssetReference(asset:LEAsset)="GetAssetAssetReference" Function leReloadAsset:Int(asset:LEAsset,flags:Int)="ReloadAsset" 'Asset Reference Function leFindAssetReference:LEAssetReference(name$z)="FindAssetReference" Function leReloadAssetReference:Int(assetreference:LEAssetReference,flags:Int)="ReloadAssetReference" Function leSetAssetReferenceName(assetreference:LEAssetReference,name$z)="SetAssetReferenceName" 'Texture Function leCreatetexture:LETexture(width:Int,height:Int,format:Int,flags:Int,frames:Int)="CreateTexture" Function leLoadTexture_:LETexture(path$z,flags:Int)="LoadTexture" Function leGetTextureTarget:Int(texture:LETexture)="GetTextureTarget" 'Function leLockTexture(texture:LETexture,miplevel:Int,framenumber:Int)="LockTexture" 'Function leUnlockTexture(texture:LETexture,miplevel:Int,framenumber:Int)="UnlockTexture" 'Function leWriteTexturePixel(texture:LETexture,x:Int,y:Int,r:Int,g:Int,b:Int,a:Int,miplevel:Int,framenumber:Int)="WriteTexturePixel" 'Function leReadTexturePixel:Int(texture:LETexture,x:Int,y:Int,miplevel:Int,framenumber:Int)="ReadTexturePixel" Function leGetTexturePixels(texture:LETexture,buf:Byte Ptr,miplevel:Int,framenumber:Int,face:Int)="GetTexturePixels" Function leSetTexturePixels(texture:LETexture,buf:Byte Ptr,miplevel:Int,framenumber:Int,face:Int)="SetTexturePixels" Function leGetTextureWidth(texture:LETexture,miplevel:Int)="GetTextureWidth" Function leGetTextureHeight(texture:LETexture,miplevel:Int)="GetTextureHeight" Function leSetTextureFilter(texture:LETexture,texturefilter:Int)="SetTextureFilter" Function leFreeTexture(texture:LETexture)="FreeTexture" 'Function leTextureLocked(texture:LETexture,miplevel:Int,framenumber:Int)="TextureLocked" 'Function leReloadTexture:Int(texture:LETexture,flags:Int)="ReloadTexture" Function leBindTexture(texture:LETexture,index:Int)="BindTexture" Function leGetTextureData:Byte Ptr(texture:LETexture,miplevel:Int,framenumber:Int)="GetTextureData" Function leCountTextureMipmaps:Int(texture:LETexture)="CountTextureMipmaps" Function leGetTextureMipmapSize:Int(texture:LETexture)="GetTextureMipmapSize" Function leGetTextureFormat:Int(texture:LETexture)="GetTextureFormat" Function leSetTextureClampMode(texture:LETexture,x:Int,y:Int,z:Int)="SetTextureClampMode" Function leGetTextureClampMode:Int(texture:LETexture,axis:Int)="GetTextureClampMode" Function leGetTextureAnisotropy:Float(texture:LETexture)="GetTextureAnisotropy" Function leSetTextureAnisotropy(texture:LETexture,anisotropy:Float)="SetTextureAnisotropy" 'Shader Function leLoadshader:LEShader(path$z,flags:Int)="LoadShader" Function leSetShader(shader:LEShader)="SetShader" 'Function leReloadShader:Int(shader:LEShader,flags:Int)="ReloadShader" Function leSetShaderFloat:Int(shader:LEShader,name$z,f:Float)="SetShaderFloat" Function leSetShaderVec2:Int(shader:LEShader,name$z,x:Float,y:Float)="SetShaderVec2" Function leSetShaderVec4:Int(shader:LEShader,name$z,x:Float,y:Float,z:Float,w:Float)="SetShaderVec4" Function leSetShaderMat4:Int(shader:LEShader,name$z,mat:Byte Ptr)="SetShaderMat4" Function leFreeShader(shader:LEShader)="FreeShader" Function leSetShaderSource(shader:LEShader,source$z,n:Int)="SetShaderSource" Function leGetShaderSource_:Int(shader:LEShader,n:Int,s:Byte Ptr,l:Int)="GetShaderSource" Function leGetShaderError_:Int(shader:LEShader,s:Byte Ptr,l:Int)="GetShaderError" Function leCompileShader:Int(shader:LEShader,n:Int)="CompileShader" Function leLinkShader:Int(shader:LEShader)="LinkShader" Function leCreateShader:LEShader()="CreateShader" 'Material Function leLoadmaterial:LEMaterial(path$z,flags:Int)="LoadMaterial" Function leChooseMaterialShader:LEShader(material:LEMaterial)="ChooseMaterialShader" Function leGetMaterialTexture:LETexture(material:LEMaterial,index:Int)="GetMaterialTexture" Function leSetMaterialShader(material:LEMaterial,shader:LEShader)="SetMaterialShader" Function leGetMaterialShader:LEShader(material:LEMaterial)="GetMaterialShader" Function leSetMaterialTexture(material:LEMaterial,texture:LETexture,index:Int)="SetMaterialTexture" Function leFreeMaterial(material:LEMaterial)="FreeMaterial" Function leSetMaterialBlendMode(material:LEMaterial,mode:Int)="SetMaterialBlendMode" Function leGetMaterialBlendMode:Int(material:LEMaterial)="GetMaterialBlendMode" Function leSetMaterialShadowMode(material:LEMaterial,mode:Int)="SetMaterialShadowMode" Function leGetMaterialShadowMode:Int(material:LEMaterial)="GetMaterialShadowMode" Function leSetMaterialBackFaceCullMode(material:LEMaterial,mode:Int)="SetMaterialBackFaceCullMode" Function leGetMaterialBackFaceCullMode:Int(material:LEMaterial)="GetMaterialBackFaceCullMode" Function leSetMaterialZSortMode(material:LEMaterial,mode:Int)="SetMaterialZSortMode" Function leGetMaterialZSortMode:Int(material:LEMaterial)="GetMaterialZSortMode" Function leSetMaterialDepthTestMode(material:LEMaterial,mode:Int)="SetMaterialDepthTestMode" Function leGetMaterialDepthTestMode:Int(material:LEMaterial)="GetMaterialDepthTestMode" Function leSetMaterialFloat(material:LEMaterial,name$z,x:Float)="SetMaterialFloat" Function leSetMaterialVec2(material:LEMaterial,name$z,x:Float,y:Float)="SetMaterialVec2" Function leSetMaterialVec3(material:LEMaterial,name$z,x:Float,y:Float,z:Float)="SetMaterialVec3" Function leSetMaterialVec4(material:LEMaterial,name$z,x:Float,y:Float,z:Float,w:Float)="SetMaterialVec4" Function leGetMaterialFloat:Float(material:LEMaterial,name$z)="GetMaterialFloat" Function leGetMaterialVec4(material:LEMaterial,name$z,v:Byte Ptr)="GetMaterialVec4" Function leMaterialContainsValue:Int(material:LEMaterial,name$z)="MaterialContainsValue" EndExtern Private Global char:Byte[102400] Public Function leGetShaderSource:String(shader:LEShader,n:Int) Local char:Byte[] char=char[..leGetShaderSource_(shader,n,Null,0)+1] leGetShaderSource_(shader,n,char,char.length) Return String.FromCString(char) EndFunction Function leGetShaderError:String(shader:LEShader) Local char:Byte[] char=char[..leGetShaderError_(shader,Null,0)+1] leGetShaderError_(shader,char,char.length) Return String.FromCString(char) EndFunction Function leGetAssetName:String(asset:LEAsset) Local char:Byte[] char=char[..leGetAssetName_(asset,Null,0)+1] leGetAssetName_(asset,char,char.length) Return String.FromCString(char) EndFunction Function leGetGraphicsDriverName:String(graphicsdriver:LEGraphicsDriver) Local char:Byte[] char=char[..leGetGraphicsDriverName_(graphicsdriver,Null,0)+1] leGetGraphicsDriverName_(graphicsdriver,char,char.length) Return String.FromCString(char) EndFunction Function leGetLogText:String() Local char:Byte[] char=char[..leGetLogText_(Null,0)+1] leGetLogText_(char,char.length) Return String.FromCString(char) EndFunction Function leLoadtexture:LETexture(path:String,flags:Int=0) Local ext:String Local pixmap:TPixmap ext=ExtractExt(path).tolower() Select ext Case "tex","thb" Return leLoadTexture_(path,flags) Default pixmap=LoadPixmap(path) If pixmap Return lePixmapToTexture(pixmap) EndIf EndSelect EndFunction Function leSaveTexture:Int(texture:LETexture,path:String) Local pixmap:TPixmap=leTextureToPixmap(texture) If pixmap Select ExtractExt(path).tolower() Case "png" Return SavePixmapPNG(pixmap,path) 'Case "bmp" Return SavePixmapBMP(pixmap,path) 'Case "tga" Return SavePixmapTGA(pixmap,path) Default Return False EndSelect EndIf Return False EndFunction Function leTextureToPixmap:TPixmap(texture:LETexture) Local pixmap:TPixmap=CreatePixmap(leGetTextureWidth(texture,0),leGetTextureHeight(texture,0),PF_RGBA8888) Local x:Int,y:Int,color:Int 'Local lockmode:Int=leTextureLocked(texture,0,0) 'If Not lockmode leLockTexture(texture,0,0) 'For x=0 To pixmap.width-1 ' For y=0 To pixmap.height-1 ' pixmap.WritePixel(x,y,leReadTexturePixel(texture,x,y,0,0)) ' Next 'Next 'If Not lockmode leUnlockTexture(texture,0,0) leGetTexturePixels texture,pixmap.pixels,0,0,0 Return pixmap EndFunction Function leCreateCamera:LECamera(parent:LEEntity) 'DebugStop Return leCreateCamera_(parent) EndFunction Function lePixmapToTexture:LETexture(pixmap:TPixmap) Local texture:LETexture Local x:Int,y:Int,color:Byte[4],colori:Int If pixmap.format<>PF_RGBA8888 pixmap=pixmap.convert(PF_RGBA8888) texture = leCreateTexture(pixmap.width,pixmap.height,LE_TEXTURE_RGBA,0,1) If texture 'leLockTexture(texture,0,0) 'For x=0 To pixmap.width-1 ' For y=0 To pixmap.height-1 ' colori = pixmap.ReadPixel(x,y) ' MemCopy color,Varptr colori,4 ' leWriteTexturePixel(texture,x,y,color[2],color[1],color[0],color[3],0,0) ' Next 'Next 'leUnlockTexture(texture,0,0) leSetTexturePixels(texture,pixmap.pixels,0,0,0) 'Print "BMX: "+Int(pixmap.pixels) EndIf Return texture EndFunction
  6. I am pretty sure he is saying what most of us think: the topic was about support for bmax and as usual you arse clowns have to take it off topic. Where do you people get the nerve to bash bmax and make comments that we shouldn't get support? And where is this bashing of the c++ devs? It is always the c++ers that go out of their way to post comments about bmax and now have made comments that bmax should not even get a forum or any support. I guess the question is why do you even care? Use the language that you want and we will use the language we want. @rick: seriously... you are calling MG cocky? you mean the guy that has helped you out on this forum repeatedly when you do not have a clue on how to do something? which for the most part is all the time? You are constantly struggling with every aspect of LE and yet you still have the gall to make statements on how LE should be done when half the time you do not even know how to do anything with what is currently available in LE. Seems to me, you are the cocky one while at the same time not even with good reason to be so.
  7. did we? I think you are mistaking sarcasm concerning the reasoning of not providing a bmax subforum when other languages have one as an agreement to remove all the subforums. The point was the argument against it made no sense since all the languages will be using the same dll.
  8. easiest is to just add a body much like shown in the Spectator tutorial
  9. well considering the topic was support for bmax for LE3 and requesting a subforum, I really don't understand why anyone that doesn't use bmax feels the need to make a case against it or even comment on this subject.
  10. anyways.... personally would like to see a bmax forum... i see no reasoning for there to be a separation. Everyone will be using the same dll so the excuse not to provide one since its using the same dll is kind of a moot point. If this is the reasoning then why have separate forums for any of the other languages? just have one big general Programming forum....
  11. wrong renderer.bmx file released btw... and the corona's AABB is still referencing the origin
  12. Use DrawText() with SetBlend(). SetBlend(1) DrawText("hello",0,50) SetBlend(0) as for the other fonts, i just use bitmap fonts created with fontstudio (which used to be posted here but was lost due to the forum data loss)
  13. Does the 'improved raycast performance' refer to loading the raycast structure when the model is first loaded to prevent the stutter caused by first raycast?
  14. yeah my modeling apps do not allow me to add stand alone vertices... would have to make a face... is there not a way to prevent that culling on animated models? no way to disable that in realtime?
  15. how can one do that? are you talking about adding a plane that uses the invisible material?
  16. ?? why not just a bmax category in the LE3 programming forums? seems that would make more sense...
  17. it can be set using the model's lua script under the Properties Appearance tab.
  18. For the C++ code when using the SetSkyBox() command, you have to set the background color: http://www.leadwerks.com/wiki/index.php?title=Framework#SetBackgroundColor. The default is Vec4(0,0,0,0). Set it to Vec4(1,1,1,1). The atmosphere script also does this. For the C++ code when using the atmosphere object script, you need to make sure you are passing the framework to the lua state since the script is using the 'fw' framework variable: TFramework framework=CreateFramework(); //Set Lua variable BP L=GetLuaState(); lua_pushobject(L,framework); lua_setglobal(L,"fw"); lua_pop(L,1);
  19. cool... glad to see some new items from you afecelis
  20. why do you need a login account for the old forum? you can search the forum without being logged in... which was one of the problems with the old forum because it was wide open to everyone
  21. thanks Richard. i love free models! especially odds and ends!
  22. Use FlushMouse() to reset the value to zero.
×
×
  • Create New...