Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Using libs that come with fb
#1
I noticed there was that install.bat that installs all the libs but i never figured out how to use em
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply
#2
http://www.freebasic.net/wiki/wikka.php?...tUsingLibs
Reply
#3
well how bout other libs. The one im tryin to use is DevIL for loading JPG files
his world has been connected...
Tied to the darkness.
Soon to be completely eclipsed.
There is so very much to learn...
You understand so little.
A meaningless effort.
One who knows nothing can understand nothing.
-Ansem Bringer of darkness and creator of the heartless
Reply
#4
You use DeviL, or any other library as you would in C. However, DeviL was designed to be used with OpenGL.

Code:
#include "il/il.bi"

Edit I would recommend FreeImage, as it uses an image format you can convert to GfxLib's pretty easily:

Code:
#include "FreeImage.bi"
#include "crt.bi"

Dim dib As FIBITMAP Ptr
Dim dib32 As FIBITMAP Ptr
Dim sprite As Any Ptr
Dim bits As Any Ptr

ScreenRes 640, 480, 32
dib = FreeImage_Load(FIF_JPEG, "../myimage.jpg", JPEG_DEFAULT)
If dib = 0 Then
    Print "Couldn't Load Image"
    Sleep
    End
End If

FreeImage_FlipVertical dib
dib32 = FreeImage_ConvertTo32Bits(dib)
sprite = ImageCreate( FreeImage_GetWidth(dib32), FreeImage_GetHeight(dib32))
bits = FreeImage_GetBits(dib32)

memcpy sprite + 4, bits, FreeImage_GetWidth(dib32) * FreeImage_GetHeight(dib32) * 4

Put (0, 0), sprite


Sleep
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)