Samsung / GearVRf

The GearVR framework(GearVRf) is an Open Source VR rendering library for application development on VR-supported Android devices.
http://www.gearvrf.org
Apache License 2.0
407 stars 217 forks source link

Extensible texture formats #349

Open danke-sra opened 8 years ago

danke-sra commented 8 years ago

It may be desirable for framework to support new texture formats. This may be done in different ways: 1) framework provide extension hooks, 2) framework delegates texture loading/decoding to application, 3 application can fix textures post-mortem.

I think 1) and 2) may be highly desirable for a powerful system. 1) means framework developers/contributors can extend the framework for new texture formats 2) means without 1) app developers are not stuck.

The most wanted formats from my side is .TGA which is widely used by .OBJ models. Embedded FBX textures are also desirable but requires more infrastructure support (something like an IOSystem delegate for assimp).

danke-sra commented 8 years ago

I've worked out a solution for loading custom textures for anyone who's interested (TGA format is supported).

The working demo app can be found here: https://github.com/danke-sra/GearVRf/commit/a794a607b0daa82d583f2bdfb9ab51945a4bbc00

Some changes are made to the jassimp loader and won't affect textures not loaded by jassimp. If needed, they can be pulled up.