Jump to content

I have problems with the texture buffers.


norbert
 Share

Recommended Posts

here an example code. the text is displayed on the head. one has an idea what I'm doing wrong?

 

Framework leadwerks.engine
Import "C:\Leadwerks Engine SDK\BMX\Framework\Framework.bmx"

RegisterAbstractPath("C:\Leadwerks Engine SDK\")
Graphics 1024, 768


Global fw:TFramework = CreateFramework()
If Not fw RuntimeError "Failed to initialize engine."

fw_buffer = CurrentBuffer() 

cam = fw.Main.camera
CameraRange( cam , 0.1, 100000.0 ) 


leer1_buffer = CreateBuffer(512,512,BUFFER_COLOR )
leer1 = GetColorBuffer:TTexture( leer1_buffer ) 


While Not KeyHit(KEY_ESCAPE) 


fw.Update() 
     fw.Render()


SetBuffer(leer1_buffer)
SetColor( vec4(2,255,255,1) ) 
DrawText( "test123", 10, 10 ) 

SetBuffer(fw_buffer)


DrawImage( leer1,1, 1, -1,-1) 

Flip()


Wend

 

thanks norbert

Link to comment
Share on other sites

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.

 Share

×
×
  • Create New...