Author Topic: keepPixelData ?  (Read 565 times)

Offline aeroxr1

  • int
  • **
  • Posts: 82
    • View Profile
keepPixelData ?
« on: September 04, 2014, 08:00:32 pm »
Hi :)
I'm newbie in 3d programmation and I never used opengl.
I started from the simple helloworld example and after I have downloaded Ninja Bones .
(because I would animate a rigged model)
There are some functions that I don't know what they do, one of them is keepPixelData().

Quote
keepPixelData

public void keepPixelData(boolean keepData)
Should a texture's pixels be kept even when the texture has been uploaded to the GPU? Default is false.
Parameters:
keepData - should they?

But what it's meaning ? I don't understand :(

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11744
    • View Profile
    • http://www.jpct.net
Re: keepPixelData ?
« Reply #1 on: September 04, 2014, 08:20:31 pm »
When loading the texture, the pixel data is in main memory only. When using the texture in the actual rendering, this data has to be uploaded into graphics memory. This setting lets you decide if the copy in the main memory should stay there or if it should go away after uploading to the GPU. However, that part of the Javadocs is wrong for jPCT-AE (it's already fixed in the next version). The default for jPCT-AE is true, not false. And for normal usage, you want to leave it at that. If you set it to false, you have to deal with OpenGL context changes yourself and you don't want that in most cases. 

Offline aeroxr1

  • int
  • **
  • Posts: 82
    • View Profile
Re: keepPixelData ?
« Reply #2 on: September 05, 2014, 10:12:25 am »
ah now I understand :)
And now a bit off topic :
have you some link of guide/turorial or book to suggest me where it explain the basics of graphic 3d programmation ?
And another that explain how can I applicate the quaternions,rotation matrix ecc ecc for 3d graphics :)

thanks for everything :)


 

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11744
    • View Profile
    • http://www.jpct.net
Re: keepPixelData ?
« Reply #3 on: September 05, 2014, 09:32:50 pm »
Just look out for some basic 3d math tutorial. If you can read german, i should have a pretty easy to understand paper lying around somewhere.