I just started working my way though the basics of using Leadwerks with BlitzMax and I noticed that my end result with the Lighting tutorial seems a bit Grainy:
I have a ATI 4870 using the 10.1 drivers. As far as I can tell I am not getting the same effect in the editor.
And this is the code I copied and pasted from the pdf file:
'Use the Leadwerks Engine module as our base
Framework leadwerks.engine
'Create an OpenGL graphics window
Graphics 800,600
'Allows the engine to find files and load files from zip packages
RegisterAbstractPath AppDir
'Create a world
If Not CreateWorld() RuntimeError "Failed to create world."
'Create a camera
cam:TCamera=CreateCamera()
MoveEntity cam,Vec3(0,0,-5)
'Create a visual mesh
mesh:TMesh=CreateCube()
'Create another mesh to cast a shadow on
ground:TMesh=CreateCube()
ScaleMesh ground,Vec3(10,0.1,10)
PositionEntity ground,Vec3(0,-2,0)
'Create a render buffer
buffer:TBuffer=CreateBuffer(800,600,BUFFER_COLOR0|BUFFER_DEPTH|BUFFER_NORMAL)
'Create a light
light:TLight=CreateSpotLight()
PositionEntity light,Vec3(2,2,-2)
RotateEntity light,Vec3(45,45,0)
'Main loop
While Not KeyHit(KEY_ESCAPE)
TurnEntity mesh,Vec3(0.5)
'Update timing, physics, and other miscellaneous updates
UpdateWorld
'Make our render buffer the current buffer
SetBuffer buffer
'Draw the world
RenderWorld
'Make the back buffer the current buffer
SetBuffer BackBuffer()
'Call the RenderLights command, passing our buffer which contains
'color, depth, and normal data
RenderLights(buffer)
'Swap the graphics buffers so we can see what we drew
Flip
Wend
Thanks