Code Monkey home page Code Monkey logo

bindbc-raylib's People

Contributors

o3o avatar trikko avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

andrejp88

bindbc-raylib's Issues

v0.8.0 attempts to bind some functions not present in raylib 3.0.0-70

According to bindbc-loader's errors() function:

Missing Symbol: rlEnableShader
Missing Symbol: rlDisableShader
Missing Symbol: rlEnableFramebuffer
Missing Symbol: rlDisableFramebuffer
Missing Symbol: rlCheckErrors
Missing Symbol: rlSetBlendMode
Missing Symbol: rlLoadFramebuffer
Missing Symbol: rlFramebufferAttach
Missing Symbol: rlFramebufferComplete
Missing Symbol: rlUnloadFramebuffer
Missing Symbol: rlDrawMeshInstanced

I'm guessing these were added sometime after raylib's 72443f8f commit. When I check out the latest commit and build, I get these errors instead:

Missing Symbol: GetExtension
Missing Symbol: LoadImageEx
Missing Symbol: ImageExtractPalette
Missing Symbol: SetMusicLoopCount

So I'm guessing all that's needed is to move those rlgl functions into static if blocks depending on the raylib version specified.

Linking error with DrawTexturePro

Ciao Orfeo!

It says:
undefined reference to `_D3app4mainFZ14DrawTextureProMFS6bindbc6raylib5types9Texture2DSQBfQBbQx9RectangleQtSQCaQBwQBs7Vector2fSQCtQCpQCl5ColorZv'

Version:
Raylib 3.0.0-70-g72443f8f

Example doesn't work

Compiled both raygui and raylib from master (there's no 2.6.1 release tagged) using README instructions.

$ cd examples/gui
$ dub
Performing "debug" build using /usr/bin/dmd for x86_64.
bindbc-loader 0.2.1: target for configuration "noBC" is up to date.
bindbc-raylib 0.1.0: target for configuration "dynamic" is up to date.
core ~master: target for configuration "cts" is up to date.
To force a rebuild of up-to-date targets, run again with --force.
Running ./cts 
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
e: 7FFE52D70640, m:7FFE52D70660
ERRORbadLibrary
Program exited with code -11

badLibrary error

hello,

I followed your very detailed (thanks!) instructions in the README to build and install raylib from the 3.0.0 tag with RAYGUI support.

however, when i try to run the examples (any example), i get an output that looks like this:

Performing "debug" build using /usr/bin/dmd for x86_64.
bindbc-loader 0.3.1: target for configuration "noBC" is up to date.
bindbc-raylib 0.5.0: target for configuration "dynamic" is up to date.
core ~master: building configuration "basic"...
raylib version 300
Linking...
To force a rebuild of up-to-date targets, run again with --force.
Running ./basic_window 
e: 7FFD84267EF0, m:7FFD84267F10
e: 7FFD84267EF0, m:7FFD84267F10
ERROR: badLibrary

im not sure what is wrong; i have these files properly installed (looks like a proper shared library):

lrwxrwxrwx   16 root 20 Jul 13:03 /usr/local/lib/libraylib.so -> libraylib.so.300
.rwxr-xr-x 1.4M root 20 Jul 13:03 /usr/local/lib/libraylib.so.3.0.0
lrwxrwxrwx   18 root 20 Jul 13:03 /usr/local/lib/libraylib.so.300 -> libraylib.so.3.0.0

and it seems like it is finding the library, just something about it is bad? i think i have the right version, because i built the clean 3.0.0 tag.

Examples use faulty error handling

Hi! I notice in your examples that you're only checking for RaylibSupport.badLibrary. Because of this, the else branch will run even when the load function returns noLibrary. I see that your loader is properly returning that when no library is found, so it's a possibility when your users misconfigure the library (like compiling for 64-bit but attempting to load a 32-bit dll).

The proper way to check for errors BindBC style is:

// Option 1
// I've configured my minimum required version at compile time,
// so any failure here means bailing out
if(retVal != raylibSupport) 
    errorOut();

// Option 2
// I've configured my preferred version at compile time,
// but I can run with a specific lower version
if(retVal == RaylibSupport.noLibrary || loadedRaylibVersion () < myMinimumRequiredVersion)
    errorOut();

// Option 3
// I've configured my preferred version at compile time, 
// but I can run with any version of the library. Only bail out 
// when no library was loaded at all
if(retVal == RaylibSupport.noLibrary || loadedRaylibVersion == RaylibSupport.noLibrary) 
    errorOut();

The purpose of badLibrary is to indicate that some version of the library may have loaded successfully, but it wasn't the one configured at compile time. Sometimes users may want to configure support for a higher version of a library and use a newer feature if it's available, but will still be happy to run if a lower version of the library loads.

Unfortunately, in your loader I see you're setting loadedVersion to badLibrary when a specific version fails to load, so it's currently not possible with this binding to use a lower library version. And the return value of your loadedRaylibVersion is meaningless in that case, as it will always match the compile-time configured version. For it to be in line with the intent of the BindBC error handling API, lines like this:

if (errorCount() != errCount) {
    loadedVersion = RaylibSupport.badLibrary;
 } else {
    loadedVersion = RaylibSupport.raylib250;
}

Should be changed to:

if (errorCount() != errCount) {
    return RaylibSupport.badLibrary;
 } else {
    loadedVersion = RaylibSupport.raylib250;
}

Then if 3.0.0 fails to load because the user has a 2.5.0 dll, the show can still go on if the 2.5.0 features are acceptable.

Anyway, your examples should probably just use the first option I listed above and bail out on any failure, as I assume they'll be configured to the specific version that has the features you want to demo.

v0.9.1 Error "noLibrary" on Windows when loading DLL

Hi, great work you have here!
I tried to load the dll, both named as "libraylib.dll" (mingw version, as supplied by raylib's repo) and "raylib.dll" (as defined in your code, using just loadRaylib()). Tried 64bit and 32bit also, .dll in the same folder of the .exe binary. but sadly no success... It keeps returning "noLibrary".

I took a look on this package's code and compared it to bindbc-sdl (which is working fine on Windows) to see if I'd spot some error, but I'm new to Dlang and spotted none.

Am I missing something? Is there some other configuration or maybe some arg/flag to pass to the compiler?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.