You are not logged in.

#1 2008-11-17 19:41:40

spiffen
Member

DrawTiles graphic problem

Hi.

I'm using the draw tiles function to draw a map over the entire screen. Doing this I noticed some graphic glitches on the screen. Vertically the glitch starts at the center of the TV and continues approx 60 pixels to the right. Horizontal it starts from center and goes down approx 40 pixels. I've taken a screen shot from the memory and uploaded the picture here:

http://i35.tinypic.com/j5fgop.jpg

.. any clues why this happens? Have I done something wrong when generationg the tile.png file? I used the GRRLIB.exe tool found on wiibrew.org.

Offline

 

#2 2008-11-17 23:32:29

NoNameNo
Administrator

Re: DrawTiles graphic problem

Try to recheck your code, this kind of stuff should not be...

btw : do you use the cvs version of libogc ?? old version have "voodo bugs" when using GX functions...

Offline

 

#3 2008-11-18 10:03:16

spiffen
Member

Re: DrawTiles graphic problem

It's hard to believe that is my code, since it is just two for loops that draws the tiles. If something was wrong with the code, I guess I would see the glitch on all tiles, but I'll take an extra look at it again just to be on the safe side.

I have no idea which version I use, think it was installed when I installed devkitPro. I'll try to update libogc and see what happens..

-Update:
I have the lastest version of devkitPro (1.4.7) so I guess I also have the lastest version of libogc.

Last edited by spiffen (2008-11-18 10:12:50)

Offline

 

#4 2008-11-18 16:48:02

Crayon
Bad Mother Fucker

Re: DrawTiles graphic problem

To use the latest version you need to take it from devkitPro CVS or hackmii GIT.

Just used those two commands in your CVS app:

cvs -d:pserver:anonymous@devkitpro.cvs.sourceforge.net:/cvsroot/devkitpro login

cvs -z3 -d:pserver:anonymous@devkitpro.cvs.sourceforge.net:/cvsroot/devkitpro co -P libogc

When prompted for a password for anonymous, simply press the Enter key.


libogc with GIT could be downloaded at git://hackmii.com/home/ogcgit/libogc with a tool like msysgit under Windows.

Good luck!

Offline

 

#5 2008-11-18 20:29:32

spiffen
Member

Re: DrawTiles graphic problem

Hi.

I've managed to get the source now, but I have no idea how to build it. Anyone know how? Or where I might find a "guide" for this? big_smile

/E

Offline

 

#6 2008-11-18 21:15:45

Crayon
Bad Mother Fucker

Re: DrawTiles graphic problem

If you are under Windows, just type make in a command prompt in the libogc folder, the Makefile will do the rest smile

Last edited by Crayon (2008-11-18 21:18:58)

Offline

 

#7 2008-11-19 01:51:42

spiffen
Member

Re: DrawTiles graphic problem

Ahh it was that easy. Compiled it successfully and replace lib and include files in devkitPro, but the problem still remains.

If I minimize the code I'm using for drawing the tiles to a bare minimum, are you intrested in trying to find out why this happens? Could it have to do with my console settings? PAL and 480p on component out?

Offline

 

#8 2008-12-08 16:33:10

spiffen
Member

Re: DrawTiles graphic problem

I found the problem. The problem was not in GRRLIB but in libogc. Had to use a "correction" value when calculating the s1, s2, t1, t2 parameters in function GRRLIB_DrawTile(). It's not the best solution, but it works well.

I replaced

Code:

f32 s1= frame/maxframe;
f32 s2= (frame+1)/maxframe;
f32 t1=0;
f32 t2=1;

with

Code:

f32 FRAME_CORR = 0.001f;

f32 s1= (frame/maxframe)+(FRAME_CORR/(width*maxframe));
f32 s2= ((frame+1)/maxframe)-(FRAME_CORR/(width*maxframe));
f32 t1= 0+(FRAME_CORR/height);
f32 t2= 1-(FRAME_CORR/height);

Offline

 

#9 2008-12-09 01:29:35

NoNameNo
Administrator

Re: DrawTiles graphic problem

post shagkur your fix, he will find a way to correct libogc soon wink

Offline

 

Board footer

Powered by FluxBB