keepPixelData ?

Started by aeroxr1, September 04, 2014, 08:00:32 PM

Previous topic - Next topic

aeroxr1

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().

QuotekeepPixelData

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 :(

EgonOlsen

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. 

aeroxr1

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 :)



EgonOlsen

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.