chunqian / go-raylib

go-raylib is a simple and easy-to-use library to enjoy videogames programming
zlib License
44 stars 3 forks source link

Custom raylib build #12

Closed hismailbulut closed 3 years ago

hismailbulut commented 3 years ago

Is there a way to use custom build of raylib. Or much better surround definitions in config.h file with ifndef flags and we can define custom options from CGO_CFLAGS

chunqian commented 3 years ago

Ok Let me see.

chunqian commented 3 years ago

@hismailbulut

CGO_CFLAGS='-DSUPPORT_VR_SIMULATOR=0 -DSUPPORT_EVENTS_WAITING=1' go build

This turn off vr support and turn on event polling I have add ifndef flags in config.h file

hismailbulut commented 3 years ago

Thank you for your effort.

hismailbulut commented 3 years ago

Actually this still doesn't work. I am using this makefile:

SOURCEFOLDER=./cmd/neoray
EXECUTABLE=bin/neoray.exe
export CGO_CFLAGS=-g -O2 -DSUPPORT_DEFAULT_FONT=0 -DSUPPORT_SCREEN_CAPTURE=0
build:
    go build -o ${EXECUTABLE} -race ${SOURCEFOLDER}
run: build
    ./${EXECUTABLE}

I can see the CGO_CFLAGS is has these flags when I type 'go env'. It compiles without warnings but both of them not working. Default font loading and screen capture is still works. This is an example all flags isn't working. Library is up to date. I confirm there is ifndef flags in config.h file. I am using Windows 10.

chunqian commented 3 years ago

Let's see I only tested macos before

chunqian commented 3 years ago

@hismailbulut Now fixed.

hismailbulut commented 3 years ago

Yes it's working. Thank you.