raylib-go icon indicating copy to clipboard operation
raylib-go copied to clipboard

Support for PushMatrix and PopMatrix

Open nvlled opened this issue 2 years ago • 3 comments

It doesn't look like rlPushMatrix(), rlPopMatrix(), and rlLoadIdentity() are supported yet. Let me see if I can add it myself.

nvlled avatar Mar 17 '22 05:03 nvlled

Only functions from the public raylib.h API are implemented and nothing from low-level APIs. That is something that is changing a lot, it is not only a matter of implementing but also later maintaining them.

gen2brain avatar Mar 17 '22 07:03 gen2brain

rlPushMatrix and others are defined in rlgl.h, and rlgl.go already uses rlgl.h, so it's only a matter of adding wrapper functions for them. The functions might be low-level, but they are fundamental part of the API. I can't even do something basic like drawing a rotated cube without them. Lots of raylib examples also uses these functions, so it's not like they are internal API that shouldn't be exported. Omitting them makes the binding rather incomplete IMO.

nvlled avatar Mar 18 '22 04:03 nvlled

@nvlled, @Technerder added some support here https://github.com/gen2brain/raylib-go/issues/186. If one of you can actually make it work, and you add all rl* functions, together with some useful 3rd party examples I may reconsider and add such functions to the repo.

gen2brain avatar Aug 27 '22 15:08 gen2brain

Implementation and example are added to the repo.

gen2brain avatar Nov 26 '22 18:11 gen2brain