Pergunta

I have a Procedural Texture generation algorithm which generates a texture.The texture is simply a BufferedImage.

This texture is basically mapped to an object in Java3D. Now since the texture is not going to change during the execution of the program, I want to precompute the texture during compilation itself so that during execution it uses the precomputed texture.

If the texture instead was generated during runtime it lead to delay in startup of the program.

My Question is,

Is it possible to precompute the texture during the compilation phase itself ?

Foi útil?

Solução

I don't think so, but you could write a separate Java program to compute the textures and save the BufferedImages to files, to be read by the game Java program.

It's up to you to determine whether the time saved is worth the storage space.

Edited to add: Most games either have you sit through a video during texture calculation, or they tell you that they're calculating textures. Anyone else remember "Reticulating Splines"?

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top