And you probably want to rotate your matrix incrementally instead of storing rotation values and applying them as a whole. This is because it is not the same to rotate a matrix 10 degrees around Y, 10 around X and then again 10 about Y that rotating it 20 deg around Y and then 10 around X. The first aproach makes more sense "physically"by technik - Coding
Basically, you have to create a display list that contains the indices instead of the data itself. Somewhere else, you create the array of data. And when you want to draw, you set the correct array and call the display list. This allows you to use the same display list for many objects in your game that use the same model but are in a different frame of their animations, for example.by technik - Coding
By the way, as I see you're trying to get the maximum performance for your application, yoou should definitely start using Indexed data. It will reduce the size of your display lists and improve general system performanceby technik - Coding
As tueidj said, trying to avoid clearing all vertex descriptors and setting them again is a good idea. It's good for two reasons: -Before every draw, the GP must collapse all state-changing commands and execute them, so avoiding these commands will save you GPU time -Sending less commands also saves you space in the command FIFO.by technik - Coding
Sometimes all you have to do is make clean, then make againby technik - Coding
Quotehtaedtake a look at , Its a 3d game engine for wii homebrew. Enjoy. No ofense, but I think that project died long time ago. It didn't ever get released, not even an alpha version I think. You'd better try with Revolution engine (Models can be converted into the format of the engine from Obj models). It works, it's published and it's in constant development (right nowby technik - Coding
What's the solution you found? Sharing it may help the comunity. I found this problem also, all I did to fix it was reload another specific IOS, can't remember wich one right now.by technik - Coding
jpeg, gd, tiff, I think I'll start there, thank you bothby technik - Coding
I've seen many homebrews load the tga or jpeg file formats for images and I wonder how to do this. I've searched through the wiki because I heard there was a lijpeg but couldn't find it. No idea about tga. What libraries are used to load those formats? And how can I use them? Thanks in advanceby technik - Coding
Just a few hours ago, Revolution engine 0.5 has been released. I've been working for so long in this engine and I hope you all enjoy creating games with it. For those who don't know, I'll explain: Revolution engine is a native 3d game engine designed for wii. It is not a port of a PC game engine. it is an engine designed specifically for wii, to get the best of this hardware. Iby technik - Homebrew Applications
Why don't you just create 14 simple makefiles like this? include ../common and ../common is the makefile with all the rules you want. This way, when you modify common makefile, every project will notice those changes.by technik - Coding
#ifdef XYZ #undef XYZ #define XYZ whatever #endifby technik - Coding
Actually, every library uses GX, because that's how we can deal with the hardware, so except you write lots of machine code, you're using GX. Using double-buffer comes even in the simplest examples, it's part of initialization (you can choose triple buffer, but most times it's double that you want to use). What do you want to do? maybe if you tell us something more, we canby technik - Coding
One idea, keep the last position you created a wall in, stored in a vector. Then, every frame, check the distance between the current position and the stored one. If it's larger than the distance you want, then create your wall between those positions.by technik - Coding
hmmm...let me think...Ok, I know what happens (I think) The effect of gravity on a rigid body can be represented as an acceleration applied to the center of mass of the body. So we should store in a vector the position of the sphere and in another vector it's current speed. Every frame we should add the acceleration components (obtained from the wiimote) to the speed of the ball, then use tby technik - Coding
Ok, you have to use Radians, not degrees, since we're computing angles from displacement. I had forgotten that rotation speed is also dependent on radius, wich explains why you have to multiply by 20. What is the radius of you sphere? As you can see, when using += sqrt(...) instead of = sqrt(...) there are some weird rotations, so obviously the first option is the correct.by technik - Coding
Ok, this is what you have to do: You must have a matrix that is specific to your ball. You don't use it for other objects, for example Mtx ballMtx; You have to do guMtxIdentity(ballMtx) just once, when you create the ball, for example. Don't do it every frame cause it wouldn't work. then, every frame, BEFORE updating x, y and z variables, you do this guMtxRotAxisRad(Mt_1, &roby technik - Coding
No, it's not correct, I need a little bit more of information to help you. Which matrix do you use to render your ball, how do you calculate it? and how do you handle position? is it stored as a separated vector or in the same matrix?, do you apply it after rotating? those questions are important because this method is somehow recurrent, it produces correct results when aplied ona alredyby technik - Coding
Ok, just remember that vector will work fine as long as your floor doesn't get completely vertical.by technik - Coding
oh, right, I think I know how to fix that rotation. Intead of applying the guMtxRotAxisRad to your matrix, you have to apply it to a different matrix and then concat those two matrices. Applying directly to your matrix will set your model's rotation to the rotation angle. Instead, applying to another matrix and concatenating them will ADD the rotation to the old position. There's somby technik - Coding
Ok, my fault because I didn't look the function names in libogc. I'll try to explain: first: Create a vector containing moving direction of your ball. guVector moveDir = {ball.accelx, 0, ball.accely}; second: calculate the vector that is normal to the surface tha ball is moving along. I assume the sphere is moving through X and Z axes in a plane surface. guVector planeNormal = {by technik - Coding
Actually there's a simple way to do it physically correct. You just have to calculate a vector that is parallel (is that the correct spelling?) to the displacement plane and perpendicular to the rotation direction. Then rotate around it an angle alpha equal to displacement over radius. for example if the sphere is on a horizontal floor and moving in the direction (1, 0, 0), the vector (theby technik - Coding
Quotecalvinss4Wouldn't it be nice if we could apply a similar technique when the EFB is copied to the XFB? For example, only copy pixels from the EFB to the XFB if the z value is less than the clear value z value means depth, and depth is limited by far plane and near plane. So you just have to adjust those planes to the depth you want. Then only the pixels you want to copy will be rendereby technik - Coding
Wii can display textures up to 1024x1024by technik - Coding
Those are libogc versions, not devkitppc versions. And I have to test both of them. In fact, taking a look at libogc changelogs, no change has been made to GX that can affect lighting (as far as I know) so the problem may be caused by an update on devkitppc.by technik - Coding
Actually, disabling depth testing is a widely used technique, but it's also physically wrong. when multiple translucent surfaces overlap, the order matters. Looking at a blue glass through a green one is different that the opposite. C1*a1 + (1-a1)*(C2*a2+(1-a2)C3) is not the same as C2*a2 + (1-a2)*(C1*a1+(1-a1)C3). So the first method will give a more realistic result. Difference, howeby technik - Coding
This is an example of how GX Lighting currently work. This is a video of NeheGX lesson 8 example compiled and running on my Wii. In the video you can clearly see the bug that I've been talking about in some posts. There is a concrete angle for vertex to change from shaded to lighten and viceversa instead of progresive shading. And obviously, this bug makes hardware-ligting imposible to uby technik - Coding
An object only gets drawn into a pixel if the previous drawn pixel is further from camera than he is. For example if you drawn the floor after the transparent object, you would see two holes in the floor where the objects are. To face that problem, what I do in revolution engine is: -First draw alwais solid, non translucent objects. -Second, create an ordered list with containing all transluceby technik - Coding
Yes, you have to draw the objects in a different order: Transparent or translucent objects near the camera must be drawn the last.by technik - Coding
I've been unable to find the problem, please let me know if you find any older version of libogc that eliminates the problem so we can work out a patchby technik - Coding