Thareh Posted March 24, 2010 Share Posted March 24, 2010 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? Quote 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. Link to comment Share on other sites More sharing options...
Josh Posted March 24, 2010 Share Posted March 24, 2010 I don't recommend creating a buffer smaller than 64x64. Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Pixel Perfect Posted March 24, 2010 Share Posted March 24, 2010 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 Quote 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++ Link to comment Share on other sites More sharing options...
Thareh Posted March 24, 2010 Author Share Posted March 24, 2010 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? Quote 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. Link to comment Share on other sites More sharing options...
Thareh Posted March 25, 2010 Author Share Posted March 25, 2010 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. Quote 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. Link to comment Share on other sites More sharing options...
Thareh Posted March 26, 2010 Author Share Posted March 26, 2010 Anyone? :S I'm kind of stuck and need a solution to this! >.< Thanks Quote 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. Link to comment Share on other sites More sharing options...
Ending Credits Posted March 26, 2010 Share Posted March 26, 2010 I don't recommend creating a buffer smaller than 64x64. Doesn't Framewerk use a 4x4 buffer for HDR rendering? Quote 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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.