Sprites (not 3DSprites)& 3D(GL)at the same time,How?(SOLVE)
-
- Posts: 9
- Joined: Tue Aug 18, 2009 2:29 pm
Sprites (not 3DSprites)& 3D(GL)at the same time,How?(SOLVE)
Hi again, i can not put on screen, Sprites and Graphics3D at the same time... I did not find any examples or thread in this forum that references this ...
However, I can put a BG with a 3D object, but what I'm looking for is not really what I want to put a marker of life ... and do not want to use the other screen
Help Help
However, I can put a BG with a 3D object, but what I'm looking for is not really what I want to put a marker of life ... and do not want to use the other screen
Help Help
Last edited by WhiteSkull on Sun Aug 23, 2009 7:04 pm, edited 1 time in total.
-
- Posts: 9
- Joined: Tue Aug 18, 2009 2:29 pm
Re: Sprites (not 3DSprites) & 3D (GL) at the same time, How?
"Thank you all for your answers" ... is not possible to use Sprites and 3D at once on the same screen... Only thing...I solved using a QUAD with a bitmap, and I was fine, but after fight with all kinds of formulas
Re: Sprites (not 3DSprites)& 3D(GL)at the same time,How?(SOLVE)
Sprites and 3D together? I don't see why not, since it would work in the same way as sprites and BGs. The way 3D is displayed is via BG0 as a layer. While I can't supply an example, you have the option of setting each VRAM bank to what you want, but you can't "mix" things like textures and sprites to the same bank. libnds's texture manager is set so that if you were to set any of the main banks as anything other than textures, it will skip those banks when dealing with texture loading. Also, libnds uses VRAM_E for texture palettes automatically, but you can use VRAM_F or VRAM_G for sprite palettes. I'm not sure if they can both be set for a combined 32KB under the same type like the main banks can.
It should be possible to use the individual 3D and sprite examples to form what you are looking for.
It should be possible to use the individual 3D and sprite examples to form what you are looking for.
-
- Posts: 9
- Joined: Tue Aug 18, 2009 2:29 pm
Re: Sprites (not 3DSprites)& 3D(GL)at the same time,How?(SOLVE)
Yes! The theory is very nice ...Although it may well be, so that comment, i made it, put a "background" with "3D"...using "PAlib" combined with "libnds"... but anyway, thanks ... I got it with a "QUAD" and a texture...
Do not know or have not done it.
If you like, you can try and then tell me, lucky
That means one thing ...Discostew wrote:It should be possible to use the individual 3D and sprite examples to form what you are looking for.
Do not know or have not done it.
If you like, you can try and then tell me, lucky
Re: Sprites (not 3DSprites)& 3D(GL)at the same time,How?(SOLVE)
PAlib? Hmmm. I don't know the situation with that, because I've never used it, nor do I know how it works. libnds is a different circumstance for me because I reference myself with the source, and either work around it, or don't use a section of it so I can have better control.
-
- Posts: 9
- Joined: Tue Aug 18, 2009 2:29 pm
Re: Sprites (not 3DSprites)& 3D(GL)at the same time,How?(SOLVE)
I used "PALib" and "libnds", to use a BG in a 3D scene, because "PAlib simplifies some things made with" libnds. Sure you can do well with "libnds", because this is the engine of "PAlib"...
I also had problems with "Stylus" not working well, and finally i chose to use "touchRead" think i should do everything with "libnds" to avoid problems... I don't know
I also had problems with "Stylus" not working well, and finally i chose to use "touchRead" think i should do everything with "libnds" to avoid problems... I don't know
Re: Sprites (not 3DSprites)& 3D(GL)at the same time,How?(SOLVE)
As is often said on gaming forums: Quoted for truth.WhiteSkull wrote:think i should do everything with "libnds" to avoid problems...
or just more simply QFT.
if your using palib, then your more than likely using an old version of devkitARM / libnds - which means your going to be missing out on a few of the more higher level API's that libnds has now.
Oh and you don't need to put quote marks around libnds, devkitARM, etc. as for PAlib I prefer the term **lib, as I always feel like I'm swearing when saying it for some reason...
-
- Posts: 9
- Joined: Tue Aug 18, 2009 2:29 pm
Re: Sprites (not 3DSprites)& 3D(GL)at the same time,How?(SOLVE)
Although at first i had used mathematical formulas, I could not put what I wanted:
So I looked for a solution to this, and a friend, Ferran, who knows the 3D world, showed me a simple solution:
and is exactly what I wanted, thank Ferran...
Code: Select all
...
...
// get angle in radians
angleH=atan2(camera.lookat.z-camera.z,camera.lookat.x -camera.x);
angleV=atan2(camera.lookat.z-camera.z,camera.lookat.y -camera.y);
quad.x=radio*cos(angleH);
quad.y=radio*cos(angleV);
// I dont know?¿
//quad.z=sin(angleH); // work in horizontal
//quad.z=sin(angleV); // work in vertical
...
...
Code: Select all
...
...
while(1)
{
// render scene
// camera
gluLookAt( pos.x, pos.y, pos.z, vista.x, vista.y, vista.z, 0.0, 1.0, 0.0);
// reset the MODELVIEW matrix
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
// the QUAD in question
glFlush(0);
}
...
Who is online
Users browsing this forum: No registered users and 0 guests