Texture Issue Again :(

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: Texture Issue Again :(

Michael Bien
  can you please post the stack trace of this one?
you are using the latest build right? (i wan't to be sure that i look at
the same stuff you are using)

-michael

On 03/07/2011 02:27 PM, Haroogan [via jogamp] wrote:
> ByteBuffer.allocateDirect(2049 * 2049 * 3).order(ByteOrder.nativeOrder());
>
>
> Later, I fill it with texture information and call  and here's what I get as
> a response:
>
>
> Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException:
> Required 12597251 remaining bytes in buffer, only had 12595203

Reply | Threaded
Open this post in threaded view
|

Re: Texture Issue Again :(

Michael Bien
In reply to this post by Haroogan
  does 2x 4096x4096 work? (power of two?)

i am also not sure if you can use your complete graphics memory for
textures, e.g. if you use OpenCL the max allocatable mem is smaller as
the physical amount of mem - but in your case there should be still
enough room. hmm

so we have currently two issues:
1. index out of bounds exception if you use a certain buffer size
what sizes? can you provide a testcase with a smaller texture?

2. native GL OOME if you use a different size
not sure if this is a jogl issue. the generated code looks good so far
but a testcase would be here cool too :P I could test on NV hardware if
you like.


-michael

On 03/13/2011 07:52 PM, Haroogan [via jogamp] wrote:

> I can tell you more, I've just tried to load 2 2049x2049 textures to GPU -
> and it's ok. But you see 2 4097x4097 textures already throw out of memory
> exception. Also please have a look at my very first post about NPOT textures
> and nio buffer sizes.
>
> _______________________________________________
> If you reply to this email, your message will be added to the discussion below:
> http://forum.jogamp.org/Texture-Issue-Again-tp2646111p2673598.html
> To start a new topic under jogamp, email [hidden email]
> To unsubscribe from jogamp, visit
http://michael-bien.com/

Reply | Threaded
Open this post in threaded view
|

Re: Texture Issue Again :(

Michael Bien
In reply to this post by Haroogan

On 03/07/2011 05:59 PM, Haroogan [via jogamp] wrote:
> First of all to learn how many compression formats are supported by my card
> I do the following:
>
>
> glGetIntegerv with GL2.GL_NUM_COMPRESSED_TEXTURE_FORMATS
>
>
> Guess how much did I get:)  Well I will tell you - 0.
this may be a driver bug. i get 3 as result on NV HW.

at least you are not the first one facing this issue:
http://svn.opentk.net/node/752?page=1

so, lets assume this is not a jogl bug for now :)

-michael
Reply | Threaded
Open this post in threaded view
|

Re: Texture Issue Again :(

Haroogan
Hold on Mike, I'm currently making some changes to my project, so I can't compile it right now. I'll provide structured issue, with detailed descriptions of each bug-case, version of JOGL and etc, as soon as I finish, hopefully today. Tell me please, what kind of log information do you need understand it better? I mean, stack-traces and etc.

P. S. We have to make "red" graphics work properly with JOGL :)
Reply | Threaded
Open this post in threaded view
|

Re: Texture Issue Again :(

Aron
What about    
glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
?
with RGBA textures, you always hit the default 4 alignment. But with RGB or BGR, you will violate the alignment for each row, and that might explain the larger memory requirement message you posted earlier. Just a thought.
Aron
Reply | Threaded
Open this post in threaded view
|

Re: Texture Issue Again :(

Haroogan
Aron I will try that. Thx. But in any case - this is strange, do others also always use this function to allow BGR, RGB?
12