Jump to content

Josh

Staff
  • Posts

    23,352
  • Joined

  • Last visited

Everything posted by Josh

  1. These are not supported in LE2.
  2. It's a callback that gets run when the entity is actually culled in the rendering process. Once it is determined this entity is visible, the Draw() and DrawEach() functions will be called. (The Draw() function only gets called once per render, so it won't be called again if an entity is rendered by two cameras or two light sources). This is useful for animation, because you can perform animation only when you are sure an entity is going to be drawn.
  3. There's an object:DrawEach(camera) function you can declare in Lua. I recommend the object:Draw() function for animation, since it will only get called once per render, and DrawEach() can be called multiple times.
  4. obj2gmf.exe "mymodel.obj" There aren't any other options.
  5. I don't know yet. Real-time feedback would be nice, but there's also a lot of ways to produce these with Photoshop etc, that might be superior to poking around with color curves. For example, it would be trivial to make a black and white color table in photoshop, but I am not sure how you would do that with RGB curves. How frequently do you think the color grading will need to be adjusted? Is it sufficient to include a dozen or so lookup tables for the most common looks you might want to achieve?
  6. Leadwerks Engine 2.43 ...will be released tomorrow, along with a new source distro. I've fixed a number of bugs, but I don't like compiling releases when I am tired because there's a lot of little steps to mess up, so I will do it in the morning. Leadwerks Engine 3 Optics was always my favorite subject in physics, and I've been getting some amazing results lately by modeling computer graphics after real lighting phenomena. Once I decided to make the materials system like 3ds max, everything became easy. The engine chooses an "ubershader" variation based on what texture slots a material has a texture assigned to. Creating a normal mapped material is as easy as creating a material and adding two textures. The engine will assume texture slot 0 is the diffuse map and slot 1 is the normal map, and will load a shader based on that. Predefined slots include diffuse, normal, specular, displacement, reflection, emission, refraction, and opacity maps. Of course, you can still explicitly assign a shader if you need something special. The material below was created just by dragging some textures into different slots and adjusting their strength: Cubemaps are built into the model ubershader, and there's support for reflection, refraction, or both using a fresnel term to combine them. Chromatic aberrtion is also supported, which splits refracted light into its RGB components: While I was getting into all these advanced optics, I decided to take a stab at color grading, and the results are great. You create a 3D texture (it's easier than it sounds) which gets used as a color lookup table in the post-processing filter. To make a new color table you can just run the source 2D image through a photoshop filter and save it. Color grading gives a scene an overall feel and makes colors look consistent. It's a technique that's used extensively in film, starting with 2000's Oh Brother Where Art Thou: Here's anpther example: And here's a simple shot in the engine. The original: And graded with a "cool" color table: It's more advanced than just tinting the screen a certain color, because this effect will actually emphasize a range of colors. Preparing the Asset Store Now that Leadwerks.com is hosted on our own dedicated server, I was able to create a more secure folder to store asset store files in that can only be accessed by the forum system. Previously, we had dynamic download URLs working, but the same file could still be downloaded from any browser within a few minutes before the dynamic URL changed. This will give better security for asset store merchants. According to my big flowchart, the only things left to do are to fix the side-scrolling main page and set up a merchant account with our bank, and then we'll be ready to launch. Great movie and soundtrack, by the way:
  7. Yes, but it costs less total to buy LE2 and upgrade than to buy LE3 when it's released.
  8. Your callback functions must use the Windows function protocol (unless you are using BlitzMax) and use the following arguments: void MessageReceiveCallback(entity:TEntity,name:Byte Ptr,extra:Byte Ptr) "win32" void CollisionCallback(entity0:TEntity,entity1:TEntity,position:Byte Ptr,normal:Byte Ptr,force:Byte Ptr,speed:Float) If you still have problems, please post a simple example I can run, in a bug report.
  9. I do not have a console developer license, but Leadwerks Engine 3 is being developed with the eventual goal to be on the consoles.
  10. It is possible it may be if the binding library is faster. I wouldn't be surprised if this is the case, but it's hard to perform an objective test.
  11. The deferred renderer requires OpenGL 3.2. It is possible to make a deferred renderer with earlier versions of the API, but OpenGL 3 is designed for modern rendering techniques, has better driver support, and is much easier to use.
  12. If you're comfortable using BlitzMax, I don't see any reason to change. If I was making a PC game my personal preference would be to definitely use that with LE3, over C# or C++. It's more cross-platform compatible with less mess. Of course, LE3's implementation of Lua has the best cross-platform support, based on the fact it works without having to install any separate compilers or IDEs, and it runs the same on everything. With the LE3 Lua debugger I hope it will be useful for more complex programming. I like it because I have complete control and can provide a programming environment with no reliance on third party software or compilers.
  13. You can have vertices in a model that aren't connected to anything. If your modeling program deletes unused vertices, you could always make a triangle with three verts in the same position.
  14. It's very hard for us to tell what the problem is without seeing the actual model, but from your description it sounds like the model is moving out of its original bounds, and is being culled. Add a couple of dummy vertices to increase the size of the model's bounding box so it doesn't get culled.
  15. There's no need for the community to implement this because I have the include file I am using for the editor. It just calls the C API, so there's no need for separate docs in BMX syntax. The C API is what the DLL exposes, so you just look at the docs and it matches the BMX commands. I am interested in getting a Leadwerks Engine 3 subforum in the BMX modules forum category, and I'll write Mark and ask when the time is closer. 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
  16. A BlitzMax import file or module will be provided. There will be no documentation or official tutorials for BlitzMax. It's only being supported at this point because I am using it to write the editor. The language is no longer being developed, unfortunately , so it's not something I want to promote. Blitz is a really good illustration why free upgrades for life is a bad idea.
  17. SM4 is required for the deferred renderer. Anything less than that will use the fixed function pipeline. There would not be any disadvantage to using le3 for a 2d game, since the minimum specs are so low.
  18. This package of tutorials is the best place to start: http://www.leadwerks.com/werkspace/page/Documentation/LE2/tutorials/_/programming/cpp/leadwerks-c-tutorials-r25 There's also a lesson on getting started here: http://www.leadwerks.com/werkspace/page/Documentation/le2/_/tutorials/getting-started-with-c-r85
  19. A debugger with pause and stepping is a pretty big task, which you can read about here: http://www.leadwerks.com/werkspace/blog/1/entry-658-lua-and-c-debugger/
  20. Certainly, but I don't recommend rendering to an extra image like a mirror with full effects enabled, since it will be much slower. I'd use minimum rendering, as demonstrated in the beginning tutorial, with shadows disabled.
  21. Josh

    Lua and C++ Debugger

    Yeah, it's a weird time right now. I'm making a lot of progress, but the finished LE3 is still miles away. This has sort of taught me why software companies usually keep adding to their existing product until they become totally unmanagable, rather than starting new IP. There never really comes a time where starting something new is profitable in the short-term, so it just keeps getting put off.
  22. It would be good to support DAE of all formats better.
  23. Always set these values right before you do anything with OpenGL images and pixels: glPixelStorei GL_PACK_ROW_LENGTH,w glPixelStorei GL_UNPACK_ROW_LENGTH,w glPixelStorei GL_UNPACK_ROW_LENGTH,pixmap.pitch/BytesPerPixel[pixmap.format] glPixelStorei GL_PACK_ALIGNMENT,1 glPixelStorei GL_UNPACK_ALIGNMENT,1
  24. Have you tried the Collada to FBX converter?
  25. Loading a model, loading a mesh, or copying either will all result in the minimum number of vertex and indice buffers used. Every instance in the engine will use the same data and be rendered in a single draw call.
×
×
  • Create New...