Build on Linux fails

#1

Hi all,

I’m currently trying to build the libktx on linux which is failing for pure OpenGL. First of all GL/glcorearb.h is not (yet?) available. I’m using mesa 9.2.x which should be OpenGL 3.1 compatible, but the glcorearb.h came by OpenGL 4.3 I think… If I’m trying to use glext.h instead, then glGenerateMipmaps can’t be found. I don’t want to modify KTX code too much, I wanted to ask you guys first. I see, that the KTX code is written on MS Windows (CRLF), but I mean somebody of you would work on Linux too and did find a way…

After all, I have to write a texture converter to convert my old format to KTX. The (3rd party) requirement of the converter is to bind it inside a Java library (JAR) more or less independent of the platform. What do you think, is it possible to cross compile the libktx for Windows/Linux 32/64 to deploy it in binary form?

Thank you for your help!

#2

I have tried several times to get Git to remove the blasted CRLF. It seems I failed. I will try again.

I have built libktx on Ubuntu 12.10. I am travelling so I can’t access the machine to check but I’m pretty sure I used glew. If you use the CMake GUI & CMake build it is easy to set up the configuration and build the library.

You can certainly compile the library on both Windows and Linux. It does not use any Windows-specific functions. However the result will be 2 different .a files. If you are writing a Java app you will have to write a Java class that wraps the library and uses its functions as native methods. Presumably the class loader can be made to load the class implementation appropriate to the host machine.