Jump to content

Recommended Posts

Posted

Hi!

 

I have a little problem with buffers here, run the code below and it works fine.

Rem the first code block, and unrem the second one and it'll crash.

Is it supposed to behave this way? :)

 

(BlitzMax code)

Framework Leadwerks.Engine

RegisterAbstractPath AppDir
Graphics 1024,768

CreateWorld
MoveEntity CreateCamera(),Vec3(0,0,-10)
MoveEntity CreatePointLight(5),Vec3(0,0,-3)
Local cube:TMesh=CreateCube()
Local buffer:TBuffer=CreateBuffer(1024,768,BUFFER_COLOR0|BUFFER_DEPTH|BUFFER_NORMAL)

'####################################################################################
Local TempBuffer:TBuffer = CreateBuffer( 1, 2, BUFFER_COLOR )
SetBuffer( TempBuffer )
SetColor( Vec4( 1, 0, 0, 1 ) )
Plot( 0, 0 )
SetColor( Vec4( 0, 1, 0, 1 ) )
Plot( 0, 1 )
SetColor( Vec4( 1, 1, 1, 1 ) )
SetBuffer( BackBuffer() )
'####################################################################################

'####################################################################################
Rem
Local TempBuffer:TBuffer = CreateBuffer( 2, 1, BUFFER_COLOR )
SetBuffer( TempBuffer )
SetColor( Vec4( 1, 0, 0, 1 ) )
Plot( 0, 0 )
SetColor( Vec4( 0, 1, 0, 1 ) )
Plot( 1, 0 )
SetColor( Vec4( 1, 1, 1, 1 ) )
SetBuffer( BackBuffer() )
End Rem
'####################################################################################

While Not KeyHit(KEY_ESCAPE)

TurnEntity cube,Vec3(1,1,2)
SetBuffer buffer
RenderWorld
SetBuffer BackBuffer()
RenderLights buffer
DrawImage( GetColorBuffer( TempBuffer ), 0, 0, 100, 100 )
Flip 1

Wend
End

 

Oh and btw, where'd the Bug Reports section go? :)

Core2Duo, 3.33GHz, Radeon HD 5850 Black Edition, 4GB RAM, 4 TB HDD, Windows 7.

Core2Duo, 2.00GHz, Geforce 9500m, 4GB RAM, 320 GB HDD, Windows 7.

Posted

Oh and btw, where'd the Bug Reports section go? :)

Access it from the the following menu at the top of the forum page: Community / Bug Tracker

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Posted

Oh okey, Thanks! :)

What's the best way to create a texture with the dimensions 2x1 and two different colors on each of the pixels then? :)

Core2Duo, 3.33GHz, Radeon HD 5850 Black Edition, 4GB RAM, 4 TB HDD, Windows 7.

Core2Duo, 2.00GHz, Geforce 9500m, 4GB RAM, 320 GB HDD, Windows 7.

Posted

And why isn't it safe to create buffers smaller than 64x64 pixels?

I simply need a way to do 'Render to Texture' on textures smaller than 64x64 pixels.

Core2Duo, 3.33GHz, Radeon HD 5850 Black Edition, 4GB RAM, 4 TB HDD, Windows 7.

Core2Duo, 2.00GHz, Geforce 9500m, 4GB RAM, 320 GB HDD, Windows 7.

Posted

Anyone? :S

I'm kind of stuck and need a solution to this! >.<

Thanks

Core2Duo, 3.33GHz, Radeon HD 5850 Black Edition, 4GB RAM, 4 TB HDD, Windows 7.

Core2Duo, 2.00GHz, Geforce 9500m, 4GB RAM, 320 GB HDD, Windows 7.

Posted

I don't recommend creating a buffer smaller than 64x64.

 

Doesn't Framewerk use a 4x4 buffer for HDR rendering?

AMD Phenom 9850 (X4 2.5GHz) | 1066MHz CL5 GEIL Black Dragon (800MHz) | Powercolor ATI 4870 1GB | DFI 790FXB-M2RSH | 24" 1920x1200 | Windows Vista 64-bit Ultimate

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...