GLBasic forum

Other languages => GLBasic - es => Topic started by: msx on 2016-May-13

Title: Problemas con 3D en GLB 14
Post by: msx 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í ;)
Title: Re: Problemas con 3D en GLB 14
Post by: erico on 2016-May-14
I think nothing should have changed, can you show the problem a little better?
Maybe a small test code?
Title: Re: Problemas con 3D en GLB 14
Post by: msx on 2016-May-14
Perdona erico se me olvidó añadir que el problema lo tengo solo en Android, en Windows funciona bien.
Title: Re: Problemas con 3D en GLB 14
Post by: erico on 2016-May-14
I see.
What happens with the 3d? Nothing shows?
Title: Re: Problemas con 3D en GLB 14
Post by: r0ber7 on 2016-May-14
Did you forget to register?  :P
Title: Re: Problemas con 3D en GLB 14
Post by: msx 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.
Title: Re: Problemas con 3D en GLB 14
Post by: erico 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
Title: Re: Problemas con 3D en GLB 14
Post by: msx 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.
Title: Re: Problemas con 3D en GLB 14
Post by: erico 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.
Title: Re: Problemas con 3D en GLB 14
Post by: erico 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


Title: Re: Problemas con 3D en GLB 14
Post by: msx 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.

Title: Re: Problemas con 3D en GLB 14
Post by: erico 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.
Title: Re: Problemas con 3D en GLB 14
Post by: msx on 2016-May-16
Try changing setOrientation values from 0 to 3, you'll see that does strange things.
Title: Re: Problemas con 3D en GLB 14
Post by: erico 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.
Title: Re: Problemas con 3D en GLB 14
Post by: msx 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?
Title: Re: Problemas con 3D en GLB 14
Post by: msx on 2016-May-17
Bueno en principio lo he solucionado modificando el AndroidManifest.xml

Gracias por vuestra ayuda
Title: Re: Problemas con 3D en GLB 14
Post by: erico on 2016-May-17
Good to hear, I haven´t tried myself a portrait app dev yet, but when I first switched to GLB14 it happened naturally so I changed it to be landscape.
Let me try to explain:
V12 was kind of always portrait by core, I recall the drop down menu always came from the left side and it sucked (when holding it landscape to play).
V14 got that orientation correct, but the system I was using made my app portrait instead of the original intend (landscape), so I corrected it.
I don´t remember the exact settings be it a setscreen or project options (9998x9999) or just stating a lower resolution first,  but it is nice that it worked out for you.
Title: Re: Problemas con 3D en GLB 14
Post by: mentalthink on 2016-May-19
MSX llevate cuidao con las texturas, mira a ver si las tienes en potencia de 2... o sea que sean cuadradas, si mide 512px de ancho que lo sena de alto también... a ver si se arregla... yo  recuerdo que si me pasaba de 1024px me hacía cosas raras la texturas.

Aunque yo recuerdo que en la update 12, a mi el 3D me salían los objetos fuera de lugar en el eje Z, quizás ha pasado alguna cosa en el código.
Title: Re: Problemas con 3D en GLB 14
Post by: msx on 2016-May-19
Qué tal? Tú por aquí? :P

El problema es que la 14 no se lleva bien con el comando SETORIENTATION no me preguntes por qué pero hace cosas raras.