![]() ![]() So something like this should do the trick: const void* buffer = image.get_pixbuf().get_row(0).get_data() Īssuming your image data is 8-bit RGBA, with no row padding. (This is the first byte of the first row, thus pointing to the start of the contiguous buffer.) ![]() This gives you access to the first row of the buffer, at which point you can finally request the raw buffer pointer with the get_data() method. Since you have a png::image instance, get_pixbuf() will return you a png::pixbuf instance, from which you can get a reference to the first row with get_row(0), which returns a png::row_traits specialisation for your pixel type. In the case of the png++ library, you need to dig a few layers down in the abstraction, as it wraps images, rows and pixels for you. Google didn't gave much help so I'm going here. OpenGL can't know ahead of time what types anyone might want to pass in (since it can work with virtually any library), so it takes a generic const void* pointer to your raw buffer, and relies on you to describe it accurately with the supplied metadata. I tried changing the textures in 3dsimed3 of the new parts to the og S2000 one and change the AO in CM but nothing worked. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |