I'm trying to "put" a GfxLib buffer to the screen using GL2D, but its only the top part of the buffer that shows up..
Code: Select all
#Include once "FBGL2D7.bi"
#Include once "FBGL2D7.bas"
Dim As GL2D.IMAGE Ptr GfxBuffer
GL2D.ScreenInit(320, 240)
GL2D.VsyncON
GfxBuffer = ImageCreate(320, 240, 0, 32)
Do
For i As Integer = 0 To 100
PSet GfxBuffer, (Rnd * 320, Rnd * 240), RGB(Rnd * 255, Rnd * 255, Rnd * 255)
Next
GL2D.LoadImageToHW(GfxBuffer)
GL2D.Begin2D
GL2D.SetBlendMode(GL2D.BLEND_SOLID)
GL2D.Sprite( 0, 0, GL2D.FLIP_NONE, GfxBuffer)
GL2D.SetBlendMode(GL2D.BLEND_TRANS)
GL2D.PrintScale(10, 10, 1, "Test")
GL2D.End2D
Sleep 1,1
Flip
Loop Until InKey <> ""
ImageDestroy GfxBuffer
GL2D.ShutDown