Jump to content

Thareh

Members
  • Posts

    70
  • Joined

  • Last visited

Everything posted by Thareh

  1. Go to gmail on his workstation and see if the browser autofills, or list his gmail username ^^
  2. Thanks for the update! Something seems to be wrong though, nothing is drawn on my programs. Even this simple program doesn't work. 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) While Not KeyHit(KEY_ESCAPE) TurnEntity cube,Vec3(1,1,2) SetBuffer buffer RenderWorld SetBuffer BackBuffer() RenderLights buffer DrawText "Hello World!",0,0 Flip 1 Wend End I'm using the latest nVidia drivers if that's any help Also, The editor seems to lag horribly when editing terrain
  3. I think I've got the buffers to free correctly now! But still the performance on using CreateBuffer and GetColorBuffer to do a 'Render to Texture' routine is very poor :/ There must be a better way of doing this! >.<
  4. Even if I can get it freed correctly I'd still prefer a way without having to copy the buffer. Creating a buffer or doing GetColorBuffer is pretty slow, my program freezes like 250ms on my Laptop when I call them. (Which is not good since I use A LOT of both of these commands for my Render to Texture interface)
  5. There's no FreeBuffer command in BlitzMax, I'm just using Buffer = Null.
  6. Thank you, I'm aware of that but I don't want any linking with any buffers. I'm not sure they're freed correctly when linked to a texture, my program crashes after x amount of GetColorBuffers.
  7. Hi! What's the best way to convert a buffer to a texture? The only way I know of is using GetColorBuffer, but that also links the buffer to the texture and therefore doesn't fit my purpose. Thanks Oh and I'm posting here because I didn't get much response on my other thread.
  8. But still, I want to be able to get a TTexture from a buffer, and then re-use the buffer without the TTexture changing.
  9. The problem might be that I can't free a buffer since I'm using BlitzMax. There's no FreeBuffer command, so I just nullify it and hope for the best.
  10. I've tried all logical ways of doing this, such as: LoadTexture( GetColorBuffer( Buffer ) ) LoadTexture( Buffer ) LoadTexture( SaveBuffer( Buffer ) ) etc. Still can't get the TTexture to "unlink" from the buffer.
  11. Hi! Seems like 'GetColorBuffer' isn't very good to use when rendering to a texture since it changes with the buffer even after you've used 'GetColorBuffer'. (Which also means that all the buffers I've used to render to texture probably doesn't get freed aswell) I want a static function that saves the current state of the buffer, and doesn't change even if the buffer changes after the command. Is there anything like this in LE?
  12. The problem is that the windows are of different sizes etc, if there's a way to resize a buffer it'd be possible! ^^
  13. I free the buffer as soon as I've used GetColorBuffer to get the texture, well atleast I nullify it. I'm just using the buffer for the render to texture, and then I draw the Texture so I'm not using alot of buffers
  14. There must be some way of speeding this up! >.<
  15. Local Buffer:TBuffer = CreateBuffer( W, H, BUFFER_COLOR ) SetBuffer( Buffer ) SetColor( Vec4( 1, 1, 1, 0 ) ) ClearBuffer() SetColor( Vec4( 1 ) ) 'DRAW STUFF HERE! Texture = GetColorBuffer( Buffer ) SetBuffer( BackBuffer() ) Buffer = Null Here's the 'Render to Texture' routine I'm using.
  16. Well, I can't create the buffers before since I don't know how many windows etc there's gonna be Does GetBufferColor save the buffers current state as a texture or does the texture change if I change the buffer afterward? If it saves the current state then perhaps I can just use 1 buffer and resize it, if that's possible.
  17. Here's an example: CLICK ME!. When you create a new window 5 'render to texture' routines happens (Window, Window Panel, Min/max and close button, the label) and this causes a delay. On my laptop the delay is about 400 ms which isn't good enough for me >.< The 'render to texture' routine is just this: Create & Set a new buffer. Draw some stuff using 2d commands. Use GetColorBuffer to get the TTexture. Free the buffer. Is there any faster way of doing 'render to texture' than this?
  18. Hi! I'm creating a user interface and I'm using a render to texture routine on all "gadgets" so it'll be faster to draw. When I'm creating a new window there's a 200-300 ms delay, and I've traced this down to the buffer creation or buffer => texture conversion. (I'm using GetColorBuffer to convert) So I'm asking: Are buffers slow or am I doing something wrong? Thanks!
  19. Gah, Found the problem. Was on my end all along Thanks for the quick response now! I got it all solved!
  20. I've tried that already, Doesn't seem to do the trick! :S Local Buffer:TBuffer = CreateBuffer( W, H, BUFFER_COLOR ) SetBuffer( Buffer ) SetColor( Vec4( 1, 1, 1, 0 ) ) ClearBuffer() SetColor( Vec4( 1 ) ) SetColor( Vec4( 1, 1, 1, 0 ) ) Local Buffer:TBuffer = CreateBuffer( W, H, BUFFER_COLOR ) SetBuffer( Buffer ) ClearBuffer() SetColor( Vec4( 1 ) ) Tried both of these without any change
  21. Since I'm using buffers to do a Render to Texture routine it would be like masked, if you create an image in Photoshop with a transparent background and then you can paint whatever you want on it, and the areas you haven't touched will be transparent
  22. Okiedokie, Thanks Josh. What about the transparency issue then? I just can't get a buffer to be cleared into "nothing"/transparency.
  23. Okey, Thanks Lumooja. But the problem with using buffer smaller than 64x64 is this: LINK. Any way to solve this? I've tried clearing the buffer with the alpha set to 0, but it still won't be transparent.
  24. Hi! Since I didn't get any answers on my previous topic (LINK) and I've been stuck on this for several days, I'm posting under the General Discussion instead. And the questions are probably more aimed to Josh since no one have been able to answer. 1. Since it's not recommended to use buffers smaller than 64x64, how would I go ahead and create a texture smaller than 64x64 and render to it? (I used buffers before) 2. Is it possible to clear a buffer so that it's transparent instead of white? And if so: how? Thanks.
  25. I've been stuck on this for several days now, surely Josh must know the answer?
×
×
  • Create New...