Results 1 to 4 of 4

Thread: Size of data in glCompressedTexImage2D

  1. #1
    Junior Member
    Join Date
    Nov 2009
    Posts
    21

    Size of data in glCompressedTexImage2D

    Is the imageSize parameter the size of the image data with or without the palette?

    I.E. I have a 512KB palette and 128*128 bytes of pixels for a total of 16896 bytes. Should I be passing that or just 128*128?

    I'm pretty sure it's with palette, but better to be safe than sorry.

    Thanks,
    Jeremiah

  2. #2
    Junior Member
    Join Date
    Nov 2009
    Posts
    21

    Re: Size of data in glCompressedTexImage2D

    Sorry to double post... couldn't edit my post.

    Noticed another odd behavior... when switching to a compressed image, the entire texture seems to be rotated 180 degrees. At first I thought it was just flipped (as I'm already aware of) but instead it took my flipped data, and rotated over 180 degrees... can't say I know why...

  3. #3
    Senior Member
    Join Date
    May 2006
    Posts
    353

    Re: Size of data in glCompressedTexImage2D

    Yes, you need to pass the total size, including palette data.

    On which platform are you seeing the rotation behaviour?
    Georg Kolling, Imagination Technologies
    Please ask questions specific to PowerVR hardware or SDKs on the PowerVR Insider Forum
    DevTech@imgtec.com | http://www.powervrinsider.com

  4. #4
    Junior Member
    Join Date
    Nov 2009
    Posts
    21

    Re: Size of data in glCompressedTexImage2D

    Thanks for the data size answer.

    I absolutely should have included that, sorry about that. I'm working with Android, currently only on the SDK Emulator. All OpenGL ES commands are being launched natively through JNI.

    I'm getting the graphics data by running both a 24 bit and 8 bit bmp through a quick command line program to just get the raw pixel colors (while converting to RGB565) or palette and pixel indexes. In both cases, I was keeping the pixels in order they're read which should mean they're flipped horizontally already which is what I want for the textures. This was fine with 24 bit down to direct 16 bit, but for the 8 bit I had to flip the pixels both horizontally and vertically... (I suppose just read in reverse). If I've missed something in my knowledge of bitmap files, please let me know...

    I really should have a phone already to test on, but I keep seeing some really nice phones with 1Ghz processors on the horizon, so I'm holding out to do more comparisons...

Similar Threads

  1. About data size filled in the buffer
    By BohanLu in forum OpenSL ES - General
    Replies: 1
    Last Post: 03-27-2012, 02:32 PM
  2. how to use glCompressedTexImage2D()
    By ralphend in forum OpenGL ES general technical discussions
    Replies: 1
    Last Post: 12-09-2004, 02:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •