Login
Username:

Password:

Remember me



Lost Password?

Register now!
Main Menu
Who is Online
3 user(s) are online (2 user(s) are browsing Forum)

Members: 0
Guests: 3

more...


Browsing this Thread:   1 Anonymous Users






Re: What could i be doing wrong?
#10
Home away from home
Home away from home


See User information
Yep! That was exactly the problem - Hurray!

http://aros-exec.org/modules/xcgal/displayimage.php?pid=127&pos=-127

Posted on: 2006/4/18 23:20
Resized Image
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: What could i be doing wrong?
#9
Home away from home
Home away from home


See User information
Quote:

Do you have any idea what might be giving the displayed image a blue tinge? (try demos-old/morph3d)


As it is at the moment the cgfx pixfmts and rectfmt ids in AROS have their names based on component access, not pixel access. So to say. This means that RECTFMT_ARGB in memory is always 0xAA 0xRR 0xGG 0xBB. No matter if you are running on big endian or little endian machine. If on a little machine you write a ULONG which is 0xAARRGGBB to memory it will end up as 0xBB 0xGG 0xRR 0xAA in memory.

So for pixel accesses you would have to change code to use RECTFMT_ARGB only on big endian machines while on little endian machine you would use RECTFMT_BGRA32.

As an alternative I have been thinking since a while to modify cybergraphics header to optionally switch meaning of pixfmt/rectfmt ids to be pixel based. Then for code using pixel accesses you could always use RECTFMT_ARGB: ~

#define CGX_PIXELBASED_FORMAT_IDS
#include <libraries/cybergraphics.h>

Posted on: 2006/4/18 21:46
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: What could i be doing wrong?
#8
Home away from home
Home away from home


See User information
Thanks again Georg,

I'll update the code soon and commit the newer version to SVN for your perusal =D

Mesa 3.4.2 contains functions to set mesa's internal rendering area within the buffers - i dont make use of them atm though i plan to at some time.

Do you have any idea what might be giving the displayed image a blue tinge? (try demos-old/morph3d)

Posted on: 2006/4/18 17:38

Edited by Kalamatee on 2006/4/18 18:00:48
Edited by Kalamatee on 2006/4/18 18:06:20
Resized Image
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: What could i be doing wrong?
#7
Home away from home
Home away from home


See User information
overpainting window border:

don't use window->RPort, but make a clone of it with CloneRastPort() (free with FreeRastPort()) and tell
it to clip to the inside of the borders (AROS only feature):

struct Rectangle rect;

struct TagItem rptags[] =
{
    {
RPTAG_ClipRectangle        , (IPTR)&rect                       },
    {
RPTAG_ClipRectangleFlags    , (RPCRF_RELRIGHT | RPCRF_RELBOTTOM)},
    {
TAG_DONE                                                        }
};

rect.MinX = win->BorderLeft;
rect.MinY = win->BorderTop;
rect.MaxX = -win->BorderRight;
rect.MaxY = -win->BorderBottom;

SetRPAttrsA(rp, rptags);

Posted on: 2006/4/18 11:24
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: What could i be doing wrong?
#6
Home away from home
Home away from home


See User information
aros8bit_Standard_resize() has same error.

Posted on: 2006/4/18 11:17
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: What could i be doing wrong?
#5
Home away from home
Home away from home


See User information
window resizing (arosTC_Standard_resize()):

if (amesa->visual->db_flag)
{
    if (
amesa->back_rp) destroy_rastport(amesa->back_rp); /* Free double buffer */
-   if((amesa->back_rp = make_rastport(amesa->RealWidth,amesa->RealHeight,amesa->depth,amesa->rp->BitMap))==NULL) {
+   if((
amesa->back_rp = make_rastport(amesa->RealWidth,amesa->RealHeight,amesa->depth,amesa->front_rp->BitMap))==NULL) {
        
amesa->rp = amesa->front_rp;
        
printf("AROSMesa Error : To little mem free. Couldn't allocate Dubblebuffer in this size.n");
    }
    else 
amesa->rp=amesa->back_rp;
}


amesa->back_rp and amesa->rp can point to same rastport, so after destroying amesa->back_rp, amesa->rp->BitMap is not valid anymore.

Posted on: 2006/4/18 11:15
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: What could i be doing wrong?
#4
Home away from home
Home away from home


See User information
Well, ive managed to fix the initial crashing however theres still issues causing it to crash (and some visual errors).

http://aros-exec.org/modules/xcgal/displayimage.php?pid=125&pos=-125

Mazze: ive aaltered the rastport allocation already when i started reworking the aros rasterizer.

Georg: thanx for the info - atm im mostly working on the true color functionality.

Posted on: 2006/4/17 21:26
Resized Image
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: What could i be doing wrong?
#3
Home away from home
Home away from home


See User information
AROSMesa_8bit.c:

void AllocOneLine( struct arosmesa_context *c) {
    if(
c->imageline) FreeVec(c->imageline);
    if (
c->depth<=8)
    {
        
c->imageline = AllocVec((c->width+15) & 0xfffffff0,MEMF_ANY);   /* One Line */
    
} else {
-       
c->imageline = AllocVec(((c->width+3) & 0xfffffff0)*4,MEMF_ANY);   /* One Line */
+       c->imageline = AllocVec(((c->width+3) & 0xfffffffc)*4,MEMF_ANY);   /* One Line */
    
}
}


And some demos need more than default stack.

Posted on: 2006/4/17 21:20
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


Re: What could i be doing wrong?
#2
Home away from home
Home away from home


See User information
Just an idea (I haven't looked in the mesa source): Under AROS you need special functions/macros to clone a rastport.
Click: Rastport cloning

Posted on: 2006/4/17 19:29
AROS - Make code, not war :knuddel:
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 


What could i be doing wrong?
#1
Home away from home
Home away from home


See User information
Hi!

Ive spent the last week merging the svn mesa port with Mesa 3.4.2, but im having some sticky problems and was wondering if anyone might have a clue what im doing wrong...

Basically the problem is this -

I have 2 functions which reside in seperate files,

AROSMesaCreateContext(), and arosTC_Standard_Init()

AROSMesaCreateContext creates an internal context structure, and stores the used rastports pointer in it.

It then calls arosTC_Standard_Init, and my debug output shows the correct address for the context - however data in it has now become corrupt/dissappeared ...

In particular the rastport pointer is now NULL which I cant understand.

I can tell from the debug output the values are correctly stored in the context prior to calling arosTC's func, however its all corrupt after calling it.

HELP!?!?!?!

Posted on: 2006/4/17 18:24
 Top  Twitter  Facebook  Google Plus  Linkedin  Del.icio.us  Digg  Reddit  Mr. Wong 







You can view topic.
You cannot start a new topic.
You cannot reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You cannot post without approval.
You cannot use topic type.
You cannot use HTML syntax.
You cannot use signature.
You cannot create PDF files.
You cannot get print page.

[Advanced Search]


Search
Top Posters
1 paolone
paolone
4462
2 nikolaos
nikolaos
4206
3 magorium
magorium
4095
4 phoenixkonsole
phoenixkonsole
3942
5 deadwood
deadwood
2917
6 ncafferkey
ncafferkey
2810
7 mazze
mazze
2222
8 Kalamatee
Kalamatee
2212
9 clusteruk
clusteruk
2114
Powered by XOOPS © 2001-2025 The XOOPS Project