Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


About PR_SetTextureFormat function.

This topic is 6902 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hopefully I have the following correct, just going from memory.
The Cube.pro is loaded using TEXTURE_P8 (Which just means use a palettized 256 color texture, which uses less space, but if all textures where like this, it would slow it down on some cards, as the loading of the palette to the card can slow it down. This was used for the Sky Cube, as the textures for each face of the cube are generally quite large, hence the tradeoff between texture memory & a minor speed impact) & the TEXTURE_NORMAL(which converts the texture to a standard RGB 555 texture format)is there to set following textures to load with this standard format.


[This message has been edited by darrin (edited November 29, 1999).]

Share this post

Link to post
Share on other sites
Hello.. I've got a question about PR_SetTextureFormat.

From PR 2.6 TERRAIN example,
in Setup.c, two PR_SetTextureFormat call exists.

void LoadGameData (void)

->PR_SetTextureFormat (TEXTURE_P_8);
sky_shape = PR_LoadPRO ("cube.pro", LOAD_NORMAL);
->PR_SetTextureFormat (TEXTURE_NORMAL);
sky_entity = PR_CreateEntity (sky_shape, "Sky");
PR_PositionEntity (sky_entity, 0, 0, 0);
PR_ScaleEntityAbs (sky_entity, 160, 160, 160);

I just can't catch the exact meaning of that two call.

In PR 2.6 reference, PR_SetTextureFormat function reads
"Sets the format for textures used by 3D hardware"

Then "TEXTURE_NORMAL" mode is used?
(because it'll be called later)

Or "cube.pro" is loaded in TEXTURE_P_8 mode
but sky_entity is rendered in TEXTURE_NORMAL mode?

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!