Posts: 319
Threads: 68
Joined: Mar 2005
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
Posts: 843
Threads: 60
Joined: Mar 2003
Posts: 319
Threads: 68
Joined: Mar 2005
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
Posts: 979
Threads: 27
Joined: Aug 2001
You use DeviL, or any other library as you would in C. However, DeviL was designed to be used with OpenGL.
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