|
From: iluvlinux <ilu...@gm...> - 2008-06-16 06:24:17
|
i forgot to mention that if i pass an image that contains only one color (r or g or b ), it is displayed properly the problem is when i pass an image that contains different color values at different pixels. thanks varun iluvlinux wrote: > > hi Brian > > I found that clutter library calls glTexImage2D only once, the very first > time when application asks clutter to create a gl texture. And then it > calls glTexSubImage2D. > The difference is clutter calls glTexImage2D with last parameter as NULL > (always). > and glTexSubImage2D with actual pixel pointer. > > I kept a breakpoint at glTexSubImage2D, and inspected pixel values. The > pixel values were same. > > FYI:: Hexdump in clutter code (row 1) (Image contains vertical strips of > black, white, red, green and blue) > output in format >> r_g_b_a | > 0_0_0_ff|0_0_0_ff|0_0_0_ff|0_0_0_ff|0_0_0_ff|0_0_0_ff|0_0_0_ff|0_0_0_ff|0_0_0_ff|0_0_0_ff|0_0_0_ff| > 0_0_0_ff|0_0_0_ff|60_60_60_ff|f2_f2_f2_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff| > ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff| > ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_ff_ff_ff|ff_46_46_ff|ff_0_0_ff|ff_0_0_ff|ff_0_0_ff|ff_0_0_ff|ff_0_0_ff| > ff_0_0_ff|ff_0_0_ff|ff_0_0_ff|ff_0_0_ff|ff_0_0_ff|ff_0_0_ff|ff_0_0_ff|ff_0_0_ff|ff_0_0_ff|ff_0_0_ff| > ff_0_0_ff|ff_0_0_ff|ff_0_0_98|0_ff_0_6e|0_ff_0_f1|0_ff_0_ff|0_ff_0_ff|0_ff_0_ff|0_ff_0_ff|0_ff_0_ff| > 0_ff_0_ff|0_ff_0_ff|0_ff_0_ff|0_ff_0_ff|0_ff_0_ff|0_ff_0_ff|0_ff_0_ff|0_ff_0_ff|0_ff_0_ff|0_ff_0_ff| > 0_80_7f_ff|0_1_fe_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff| > 0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff| > 0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff|0_0_ff_ff > > gdb output > > Breakpoint 2 at 0x40731f98: file ../../src/mesa/glapi/glapitemp.h, line > 1828. > Pending breakpoint "glTexSubImage2D" resolved > [New Thread 673] > [Switching to Thread 673] > > Breakpoint 2, glTexSubImage2D (target=34037, level=0, xoffset=0, > yoffset=0, width=100, height=100, format=6408, type=5121, pixels=0x30bc60) > at ../../src/mesa/glapi/glapitemp.h:1828 > 1828 DISPATCH(TexSubImage2D, (target, level, xoffset, yoffset, > width, height, format, type, pixels), (F, "glTexSubImage2D(0x%x, %d, %d, > %d, %d, %d, 0x%x, 0x%x, %p);\n", target, level, xoffset, yoffset, width, > height, format, type, (const void *) pixels)); > (gdb) p *(char *)(pixel + 24) > No symbol "pixel" in current context. > (gdb) p *(char *)(pixels + 24) > $1 = 0 '\0' > (gdb) p *(char *)(pixels + 25) > $2 = 0 '\0' > (gdb) p *(char *)(pixels + 26) > $3 = 0 '\0' > (gdb) p *(char *)(pixels + 27) > $4 = 255 '�' > (gdb) p *(char *)(pixels + 52) > $5 = 96 '`' > (gdb) p /x *(char *)(pixels + 52) > $6 = 0x60 > (gdb) p /x *(char *)(pixels + 53) > $7 = 0x60 > (gdb) p /x *(char *)(pixels + 54) > $8 = 0x60 > (gdb) p /x *(char *)(pixels + 55) > $9 = 0xff > (gdb) p /x *(char *)(pixels + 56) > $10 = 0xf2 > (gdb) p /x *(char *)(pixels + 57) > $11 = 0xf2 > (gdb) p /x *(char *)(pixels + 58) > $12 = 0xf2 > (gdb) p /x *(char *)(pixels + 59) > $13 = 0xff > (gdb) p /x *(char *)(pixels + 60) > $14 = 0xff > (gdb) p /x *(char *)(pixels + 61) > $15 = 0xff > (gdb) p /x *(char *)(pixels + 62) > $16 = 0xff > (gdb) p /x *(char *)(pixels + 63) > $17 = 0xff > > As you can see in clutter hexdump row2 column 3 contains 60_60_60_ff which > is same as (pixels +52) > pixels +53, pixels +54, pixels +55 > > Cna you provide some comments over this? > Also i am not able to find the definition of glTexSubImage2D function, > all i can find some .h and .xml file for the same. Can you please tell me > where i can find its definition, if any? > > > thanks > varun > > > Brian Paul wrote: >> >> iluvlinux wrote: >>> EABI toolchain is new toolchain provided by ARM >>> http://wiki.debian.org/ArmEabiPort http://wiki.debian.org/ArmEabiPort >>> >>> and clutter is a library that provides simple apis to users who don't >>> know >>> about opengl and related stuff >>> http://clutter-project.org/ http://clutter-project.org/ >>> >>> >>> I did a hexdump of some test images in totally red, or green or blue >>> color, >>> and i found that the pixel values were accurate according to the images. >>> I >>> have no idea were to look into mesa code. i did hexdump in clutter code >>> just >>> before it calls glTexImage2D. >>> >>> >>> Here are some information related to EABI todo list >>> http://wiki.debian.org/ArmEabiTodo http://wiki.debian.org/ArmEabiTodo >>> >>> >>> i have no idea about how to compile mesa with some different options >>> ,all i >>> did to compile mesa is to type "make linux" and it builds cleanly. >>> >>> if you could just help me out by providing some compile options if >>> needed >>> with the new tool chain, i would be highly thankful to you. I know i am >>> asking something that is very difficult. >> >> I kind of doubt the bug is in Mesa at this point. Mesa's glTexImage >> functions are used a _lot_ so they should be pretty solid. >> >> If you suspect that image data is corrupt, you could set a breakpoint at >> glTexImage2D() and examine the image buffer at that point. For simple >> formats like GL_RGBA/GL_UNSIGNED_BYTE, it's pretty easy to inspect the >> hexadecimal image values. >> >> -Brian >> >> >>> kindly help >>> >>> >>> thanks for your reply >>> varun >>> >>> >>> >>> >>> >>> Brian Paul wrote: >>>> iluvlinux wrote: >>>>> hi >>>>> >>>>> i compiled mesa with new Linux EABI toolchain >>>>> i am using mesa as a libclutter backend >>>> I've never heard of those things. >>>> >>>> >>>>> But when I try to run a application which contains some images (.jpg >>>>> and >>>>> .pngs) >>>>> i can only view some colored rectangles instead of images >>>>> >>>>> earlier with gnuhash toolchain, the application runs fine, i just >>>>> switched >>>>> to new EABI toolchain and every thing messed up. >>>>> >>>>> Also i want to know how mesa loads image file, it has its own >>>>> architecture >>>>> or it uses some other library as libjpeg etc. >>>> Mesa is an implementation of OpenGL and has no functions for >>>> reading/writing image files whatsoever. >>>> >>>> Typically, a utility library is used to read/decompress an image file >>>> into a malloc'd block of memory. That memory/image can then be handed >>>> to OpenGL via glTexImage, or glDrawPixels, etc. for rendering/drawing. >>>> >>>> If you're working with jpegs, I suspect libjpeg is being used. >>>> >>>> -Brian >>>> >>>> ------------------------------------------------------------------------- >>>> Check out the new SourceForge.net Marketplace. >>>> It's the best place to buy or sell services for >>>> just about anything Open Source. >>>> http://sourceforge.net/services/buy/index.php >>>> _______________________________________________ >>>> Mesa3d-users mailing list >>>> Mes...@li... >>>> https://lists.sourceforge.net/lists/listinfo/mesa3d-users >>>> >>>> >>> >> >> >> ------------------------------------------------------------------------- >> Check out the new SourceForge.net Marketplace. >> It's the best place to buy or sell services for >> just about anything Open Source. >> http://sourceforge.net/services/buy/index.php >> _______________________________________________ >> Mesa3d-users mailing list >> Mes...@li... >> https://lists.sourceforge.net/lists/listinfo/mesa3d-users >> >> > > -- View this message in context: http://www.nabble.com/Mesa-compilation-using-EABI-toolchain-tp17799971p17858561.html Sent from the mesa3d-users mailing list archive at Nabble.com. |