BASIC

Author Topic: Problemas con 3D en GLB 14  (Read 4905 times)

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Problemas con 3D en GLB 14
« on: 2016-May-13 »
Recientemente he retomado un proyecto que comencé hace un tiempo con GLB 12 y hay una parte hecha en 3D que funcionaba perfectamente. Ahora he actualizado la versión de GLB y la parte de 3D no funciona. ¿Hay que hacer algo especial en esta nueva versión? 

Gracias y me alegra saber que seguís por aquí ;)

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4135
    • View Profile
    • Portfolio
Re: Problemas con 3D en GLB 14
« Reply #1 on: 2016-May-14 »
I think nothing should have changed, can you show the problem a little better?
Maybe a small test code?

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Problemas con 3D en GLB 14
« Reply #2 on: 2016-May-14 »
Perdona erico se me olvidó añadir que el problema lo tengo solo en Android, en Windows funciona bien.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4135
    • View Profile
    • Portfolio
Re: Problemas con 3D en GLB 14
« Reply #3 on: 2016-May-14 »
I see.
What happens with the 3d? Nothing shows?

Offline r0ber7

  • Prof. Inline
  • *****
  • Posts: 505
    • View Profile
Re: Problemas con 3D en GLB 14
« Reply #4 on: 2016-May-14 »
Did you forget to register?  :P

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Problemas con 3D en GLB 14
« Reply #5 on: 2016-May-15 »
Version 14 has been registered successfully but still does not work. The problem with 3D on Android is not showing the textures, I tested with samples of GLBasic and is the same.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4135
    • View Profile
    • Portfolio
Re: Problemas con 3D en GLB 14
« Reply #6 on: 2016-May-15 »
I compiled this one test project to android and it ran fine but for:

1-no shadows
2-everything 3d was kind of low bright, the text is normal intensity. (maybe a shadow bug?)

Here is a picture and the APK.
I think on this thread you have the code and project to check it out.
http://www.glbasic.com/forum/index.php?topic=10525.30

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Problemas con 3D en GLB 14
« Reply #7 on: 2016-May-15 »
Your sample works properly on Android, but I invite you to try the sample attached and check whether it works on Android. In windows it works correctly.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4135
    • View Profile
    • Portfolio
Re: Problemas con 3D en GLB 14
« Reply #8 on: 2016-May-16 »
I just tried and it didn´t show, will look into the code...

edit:most likely it is the files path, needs to be full.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4135
    • View Profile
    • Portfolio
Re: Problemas con 3D en GLB 14
« Reply #9 on: 2016-May-16 »
Yep, that was it, use full path when loading assets (bmp, obj, music, etc).
Code: GLBasic [Select]
        LOADSPRITE "Media/Water.bmp", 0
        LOADSPRITE "Media/Land.bmp",  1


Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Problemas con 3D en GLB 14
« Reply #10 on: 2016-May-16 »
You're right, but that's not my problem. Maybe I chose a bad example. That was not my code. It was just an example I found, but neither worked and I thought it was the same problem and it is not, the path was wrong.

The failure occurs when the SETORIENTATION command is used and I think it could be a BUG. I attached the example with this command.


Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4135
    • View Profile
    • Portfolio
Re: Problemas con 3D en GLB 14
« Reply #11 on: 2016-May-16 »
Is the code broke? it doesn´t work on PC, just shows a black screen with some numbers and occasionally a piece of polygon shines up somewhere.

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Problemas con 3D en GLB 14
« Reply #12 on: 2016-May-16 »
Try changing setOrientation values from 0 to 3, you'll see that does strange things.

Offline erico

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 4135
    • View Profile
    • Portfolio
Re: Problemas con 3D en GLB 14
« Reply #13 on: 2016-May-16 »
I don´t think you need it for android as the latest GLB will do the orientation for you?
I think this command has been broken for a while.

Offline msx

  • Prof. Inline
  • *****
  • Posts: 773
    • View Profile
Re: Problemas con 3D en GLB 14
« Reply #14 on: 2016-May-16 »
I need to draw in portrait mode and I can not rotate the screen without using the setOrientation command. Is it a bug then?