foreignsasquatch / raylib-hx

Haxe bindings for raylib, a simple and easy-to-use library to learn videogame programming
https://raylib.com
zlib License
56 stars 12 forks source link

How to properly use Image filter effects? #51

Closed ACrazyTown closed 2 months ago

ACrazyTown commented 3 months ago

I'm trying to use an Image filter function, specifically Raylib.imageColorGrayscale(). It wants a cpp.Star<Image> but Image is a cpp.Struct which leads to an issue where hxcpp tries to pass cpp::Struct<Image> instead of just Image* to the function in the compiled C++ code.

This is what I'm doing right now:

var test = Raylib.loadImage("assets/img/test.png");
Raylib.imageColorGrayscale(testImage);

I'm not really experienced with Haxe and native C++ so it's possible that this might be my fault. Is this a bug or am I doing something wrong?

ACrazyTown commented 3 months ago

Whoops, I just realized there's a Discussions tab. Probably should've posted this there