View Full Version : port your games to mac os X
patrox
08-15-2003, 10:17 AM
Hello
I'm currently working on documenting our library.
http://ptk.phelios.com
( it's currently not available for download.. so much to do in too little time as always :) )
I would appreciate any feedback/questions so i can expand the faq a little bit.
My next step is to work on some mini examples that shows the basic of the library, and then i'll be able to upload it so you can start developping!
thank you
patrice.
Jack_Norton
08-15-2003, 10:51 AM
Some examples would be really appreciated :)
Can't wait for your library to get out... so I can start cross-development and cross-selling ;) hehe
ggambett
08-15-2003, 01:27 PM
An obvious area of improvement would be the texture management. The space wasted by rounding to the next power of 2 is huge! A texture/image manager wolud be a great addition and a competitive advantage if you want to license the engine.
patrox
08-15-2003, 01:45 PM
Yes but that's the only way to have accelerated openGL on rage128/tnt ( that's why mac os X is so slow on rage128 , apple didn't want to deal with that problem ).
I guess i could always set up an option to add rectangular textures, but it will mean no game for macs with rage128... . ( but that's a lot of macs...)
It's worth preparing the graphics correctly imho. ( note that cutter helps taking care of that boring work : http://www.phelios.com/dev/ )
pat.
ggambett
08-15-2003, 02:00 PM
What I meant was that you should allow the user to load rectangular "textures", figure out where in the real (2^n x 2^n) textures put them physically, and adjust texture coordinates every time the user wants to use them.
patrox
08-15-2003, 02:14 PM
I don't understand what you are trying to explain ( my english is messed up passed a certain time of the morning :) )
thank you
patrice.
ggambett
08-15-2003, 02:29 PM
Maybe you already implement this, but for what I read in the page about video memory usage, I guess you don't...
OpenGL requires that texture dimensions are powers of 2. OK. The user asks you to allocate a 80x80 texture. You allocate a 128x128 texture instead (OGL texture id 1), and pass the handle "1" back.
Then, the user requests a 40x40 texture. Instead of allocating a new 64x64 texture, you reuse the wasted space in texture 1, placing the image in (80, 0) - (120,40), and pass the user the handle "2".
When the user "binds" his texture "2", you bind OpenGL texture 1. When the user uses the equivalent of glTexCoord2f(0.0, 0.0), you calculate the corresponding UV coordinates inside the real texture and pass that to OpenGL, in this case (0.625, 0).
This way you give the illusion of rectangular textures without wasting that much VRAM. It's not trivial, even less in realtime, but that's why I'm saying it would be a great feature :)
patrox
08-15-2003, 11:03 PM
Ok I get it.
I'll implement that in version 1.2 or something ( it had to start somewhere ;) )
Thank you for the suggestion.
pat.