Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3d Bindings not working on osx? #9

Open
Zed-Bailey opened this issue Jun 16, 2020 · 13 comments
Open

3d Bindings not working on osx? #9

Zed-Bailey opened this issue Jun 16, 2020 · 13 comments

Comments

@Zed-Bailey
Copy link

The bindings for any 3d objects do not display on osx, from my testing everything 2d works(shapes, text, images, etc..), I thought it may've been my code so i tested some of the 3d examples and even then nothing 3d is displaying(2D boxes and text are working)
Im not sure if this is osx itself or if i'm not linking something properly

cheers, Zed

@Guevara-chan
Copy link
Owner

Hm. Does non-wrapped Raylib work for you on OSX ?

@Zed-Bailey
Copy link
Author

Yeah i just tested running the core 3d camera first person example and that works properly, I think it may be how i'm compiling the files.
How are you compiling a file with the bindings?

@Guevara-chan
Copy link
Owner

Guevara-chan commented Jun 19, 2020

Hm. Actually, I use gcc to compile & test all samples and my own raylib-powered project.
Experienced almost to none problems on Win x86/x64.

@Zed-Bailey
Copy link
Author

How are you compiling the nim files?

@Guevara-chan
Copy link
Owner

Guevara-chan commented Jun 23, 2020

nim c -r --verbosity:0 --hints:off file$
¯\(ツ)

@Tim-Hartmann
Copy link

I seem to have the same problem on Linux. 2d and shaders work, everything else is not drawn.

@Guevara-chan
Copy link
Owner

Can you, like, provide some minimal example of code that does not work ?

@Tim-Hartmann
Copy link

I have not actually gotten to write any code, I just tried the examples.

Both examples in shaders work perfectly.

core/camera_3d_first_person displays the blue controls UI element in the top left corner but a white screen otherwise. Same for core/picking_3d.

The examples in models just show a white screen with the fps counter.

The examples in text work (I think, but there is no text in the rectangle in text/rectangle_bound). Input box works great.

Examples in textures work perfectly (Except for raw_data which i can't compile because of undeclared identifier: 'LoadImageEx')

Examples in shapes work (except draw_ring because i haven't built raygui yet).

So it seems that BeginMode3D is somehow broken, but I don't see any obvious reason why it should be, as vanilla raylib works and all other functionality of raylib seems to work with your wrapper.

@Guevara-chan
Copy link
Owner

Wow, nice catch about raw_data - just fixed it.
Now, as for 3D stuff... I can't reproduce it at all on my Win10, per se:
image
image

@Wazubaba
Copy link

Wazubaba commented Aug 7, 2020

I can also confirm that 3d support is not working on linux. I tested using the provided 3d fps example, and can report the same issue - gui renders, nothing else in the 3d scene does. Just to be certain I tested whether raylib itself's 3d renderer works properly on linux using their C version of the 3d fps example and it worked fine on the same build of the library I'm using to test raylib-forever.

I dug through the raylib.nim module but I can't really see anything that looks off (other than an unrelated issue which I submitted), though the rlgl module is broken and reports that VertexBuffer is an undeclared identifier when I tried importing that just to see if maybe somehow that was why 3d support was broken on my build of latest raylib from git.

@Wazubaba
Copy link

Wazubaba commented Aug 12, 2020

Update: I am very, very confused. So I fixed my local copy of rlgl.nim with the two missing types VertexBuffer and DrawCall. That didn't help. I've even set up a module that builds all of raylib and raygui with compile directives to directly wire raylib into things and then edited the various raylib-forever modules to not use dynlib and it still seems to be having the same issue - everything but 3d works. So far I've tested:

  • camera_2d.nim
  • module_playing.nim
  • following_eyes.nim
  • input_box.nim (needed to replace include raylib.nim with import but it worked fine after that)
  • a custom simple test of raygui using a GuiLabel

and they've all worked just fine.

I'm wondering if you might not want to consider raising this to the nim repo's issue tracker because I don't think this is a raylib-forever issue, but something strange going on with nim itself, since you've demonstrated it works on windows yet it doesn't work elsewhere with the same code despite raylib itself working fine outside of nim. I tested this with latest nim stable 1.2.6.

@Zed-Bailey
Copy link
Author

Hmm...I haven't used raylib in a while now, but i saw somewhere that this problem may lie in not having the dll linked with the executable using --passL:raylib.dll( i may be wrong on the flag syntax) but it seems like something worth testing

@Wazubaba
Copy link

Wazubaba commented Aug 14, 2020

That's taken care of in raylib.nim via the dynlib pragmas, and anything built calling functions from it that cannot find the lib in question will exit with an error message complaining about not being able to find raylib.
I had a similar idea which is why I tried the approach I mentioned in my post prior to yours. Still same issue though - seemingly everything but 3d rendering works, with all 3d draws not drawing anything at all to the screen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants