Moguri / BlenderPanda

Blender addon for integrating Panda3D
MIT License
76 stars 11 forks source link

Various fixes to make it work for me #1

Closed rdb closed 9 years ago

rdb commented 9 years ago

These are the fixes I suggested in IRC. With these fixes I get results that look (more or less) the same in Blender and Panda3D. I also removed the get_data() call in favour of using the buffer interface since that should prevent a redundant copy operation.

If you want to avoid Panda doing the component swap, then I suggest you change it back to BGR and change glTexImage2D call to use GL_BGR as well.

Note that this relies on Panda3D 1.9 features so won't work in Panda3D 1.8.1.

Moguri commented 9 years ago

Nice! When I get around to a Readme/proper instructions, I'll make sure to mention that Panda3D 1.9 is required.

As for the component swap, changing the BRTE addon to use GL_BGR would require all engines to return BGR data, or provide an interface that allows the engine to further describe the data (besides just width and height). So for now, we'll just have Panda do the component swap and worry about it if/when we get around to some performance tuning.