Author Topic: skybox  (Read 1627 times)

Offline kristy

  • byte
  • *
  • Posts: 1
    • View Profile
skybox
« on: May 12, 2011, 06:50:55 pm »
Hi, I am trying to build a skybox, but it won't work. I assume that it is because of usualy in openGl I use glFrontFace(GL_CW);, but it seems that it won't work here, or I am doing smth wrong. Can anyone help me? maybe an example on how I can build a skybox by using jpct-AE?

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: skybox
« Reply #1 on: May 12, 2011, 08:19:14 pm »
The util-package of the latest "unofficial" version contains a skybox class. There's no javadoc generated for it yet, but it should be more or less self-explanatory.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: skybox
« Reply #2 on: June 09, 2011, 08:38:31 pm »
I replaced my skydome for skybox from jPCT... 5 textures are 1024*1024 and one has 16*16 (down), all has 800kb... I do not know what exactly does engine with textures but without skybox app takes 24mb in RAM and with 44Mb, is it too much??

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11745
    • View Profile
    • http://www.jpct.net
Re: skybox
« Reply #3 on: June 09, 2011, 08:45:04 pm »
No, not 800k. That might be the compressed file size for a jpg, but in memory, they have 1024*1024*4 bytes each, i.e. around 4mb per texture. So 5 textures of that size means 20mb of data on the gpu plus the (maybe compressed) size that they need in main memory to backup the data in case of a context switch. 1024*1024 is a bit too much for a mobile device IMHO.

Offline Thomas.

  • double
  • *****
  • Posts: 833
    • View Profile
Re: skybox
« Reply #4 on: June 09, 2011, 08:47:09 pm »
Thanks for the explanation :)