| View previous topic :: View next topic |
| Author |
Message |
ZMaster
Joined: 02 Sep 2005 Posts: 29
|
Posted: Tue Oct 04, 2005 5:20 am Post subject: Vertex and Texture data through I/O? |
|
|
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 |
|
| Back to top |
|
 |
ashleydb
Joined: 03 Oct 2005 Posts: 26 Location: USA
|
Posted: Tue Oct 04, 2005 5:23 am Post subject: |
|
|
There is nothing to stop you doing that except writing the loaders for those file types. You wouldn't use 3DS... you'd export something from Max, but images could be anything if you write to correct loader. _________________ www.PSP-Files.com - PSP News, Hacks etc.
www.HiAsh.com - My work and stuff |
|
| Back to top |
|
 |
ZMaster
Joined: 02 Sep 2005 Posts: 29
|
Posted: Tue Oct 04, 2005 5:36 am Post subject: |
|
|
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? |
|
| Back to top |
|
 |
ashleydb
Joined: 03 Oct 2005 Posts: 26 Location: USA
|
|
| Back to top |
|
 |
ZMaster
Joined: 02 Sep 2005 Posts: 29
|
Posted: Tue Oct 04, 2005 5:57 am Post subject: |
|
|
| Thanks, you are my God :-) |
|
| Back to top |
|
 |
ashleydb
Joined: 03 Oct 2005 Posts: 26 Location: USA
|
Posted: Tue Oct 04, 2005 6:20 am Post subject: |
|
|
Hey, no problem. I'm just starting off coding for PSP myself. I made a Maya -> OpenGL model exporter and loader, so I want to port that to PSP. I'm having texture problems right now, but good luck with yours. _________________ www.PSP-Files.com - PSP News, Hacks etc.
www.HiAsh.com - My work and stuff |
|
| Back to top |
|
 |
|