Hi,
I'm sorry if you read those questions for like the 1000st time but I'm trying to get into PSP dev and couldn't find anything new concerning these:
I've got a compiler toolchain, the PSPSDK and the VS.Net integration running but after looking through some of the examples in the SDK I saw, that there (still) seems to be no way to actually load vertex and texture data from a file or archive and after that swizzle and upload them into VRAM.
So can I forget about loading for example vertex data from a .3DS file or a texture from a .PNG file?
I understand that this is due to the native 16-byte aligned format that is required by the (pspgl in particular) calls to work on full speed. Isn't there a way to load the data from a file and then dynamically align them during runtime. Of course you'd have a slight performance drop but you can do the alignment during load-time (when loading a level or menu), can't you?
Thanks in advance,
ZMaster
Vertex and Texture data through I/O?
Thank you. I have loaders for those filetypes written for the PC development and would just need to port them over to the PSP.
But what about 16-byte alignment?
Could I just do something like this:
- Allocate an array of vertices: Vector3 *vData = new Vector3[nVertexCnt];
- Fill the array with the items from the file.
- glVertexPointer(3, GL_FLOAT, 0, &(vData.x));
- glDrawArrays(...);
If I had to reformat/realign the data, how'd you do that?
But what about 16-byte alignment?
Could I just do something like this:
- Allocate an array of vertices: Vector3 *vData = new Vector3[nVertexCnt];
- Fill the array with the items from the file.
- glVertexPointer(3, GL_FLOAT, 0, &(vData.x));
- glDrawArrays(...);
If I had to reformat/realign the data, how'd you do that?
A quick search of the forum brings up this:
http://forums.ps2dev.org/viewtopic.php? ... t=memalign
http://forums.ps2dev.org/viewtopic.php? ... t=memalign
This may also be of use (saving and loading PNGs):
http://svn.ps2dev.org/filedetails.php?r ... rev=0&sc=0
http://forums.ps2dev.org/viewtopic.php? ... t=memalign
http://forums.ps2dev.org/viewtopic.php? ... t=memalign
This may also be of use (saving and loading PNGs):
http://svn.ps2dev.org/filedetails.php?r ... rev=0&sc=0