Question

I need an opengl loader, extension or core. I know I am suppose to use gl code inside after gl context has been called. My problem is actually setting up this opengl development environment.

I tried glew, and failed horribly.

Next one on my list is gl load generator. It generates specific opengl core, so all i have to do is include them to use those core functions.

However, I can not get this to install and feel like giving up and moving onto gl3w soon...

This is the error I am recieving when I try to make a simple file:

C:\MinGW64\glLoadGen_2_0_2>lua LoadGen.lua -style=pointer_c -spec=gl -version=3.
3 -profile=core core_3_3
lua: ./modules/Styles.lua:37: attempt to index local 'lfs' (a boolean value)
stack traceback:
        ./modules/Styles.lua:37: in main chunk
        [C]: in function 'require'
        ./modules/GetOptions.lua:28: in main chunk
        [C]: in function 'require'
        LoadGen.lua:17: in main chunk
        [C]: ?

C:\MinGW64\glLoadGen_2_0_2>cd C:\MinGW64\glLoadGen_2_0_2

Environment: Windows 7 64 bit, running cmd as adminstrator, luafilesystem 1.5.0-1

Was it helpful?

Solution 2

I get the exact same error message on Ubuntu 14.04 with default lua with glLoadGen_2_0_2. The only way I have been able to use glLoadGen is to download the glLoadGen_1_9 distribution and run the exact same lua command. It generates the gl .h and .c files fine. I'm assuming something is badly broken in the glLoadGen_2_0_2 distribution to get identical errors in such very different environments.

OTHER TIPS

There's a little syntax mistake. However, if you did some researches on this you would have found this Ticket

You have to replace

    local lfs = pcall(require, "lfs")
    if(lfs and lfs.attributes("modules/UserStyles.lua", "mode") == "file") then

with

    local status, lfs = pcall(require, "lfs")
    if(status and lfs.attributes("modules/UserStyles.lua", "mode") == "file") then

This fixes the errors.

Cheers

Seems it is trying to use mingw compiler suite to do the build. You either need to install mingw, or you need to tell luarocks (or whatever command you're using for the installation) how to find it, or you need to tell that command to use MSVC (or whatever build tool chain you want to use).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top