Author Topic: Rendering Textures over 256x256?  (Read 2693 times)

Offline 9kaywun

  • byte
  • *
  • Posts: 20
  • Java Programmer
    • View Profile
Rendering Textures over 256x256?
« on: June 16, 2012, 10:30:51 am »
When I render a sprite such as this one: http://troll.ws/i/hOjXrL.png it comes out deformed on the game screen.. How can I render it to be the same size as the actual image?

Code used to render the sprite.. (works fine with sprites under 256x256)
getBuffer().blit(TextureManager.getInstance().getTexture("chatbox"), 0, 0, (int) x, (int) y, X, Y, FrameBuffer.OPAQUE_BLITTING);
Developing a 3D multiplayer engine using jPCT:
Deleted, will return soon..

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Rendering Textures over 256x256?
« Reply #1 on: June 16, 2012, 10:36:01 am »
Depends on what you use for X and Y...

Offline 9kaywun

  • byte
  • *
  • Posts: 20
  • Java Programmer
    • View Profile
Re: Rendering Textures over 256x256?
« Reply #2 on: June 16, 2012, 10:53:36 am »
Depends on what you use for X and Y...

Disregard the naming, X and Y are size variables and are equal to the dimensions of the chatbox sprite.
Developing a 3D multiplayer engine using jPCT:
Deleted, will return soon..

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: Rendering Textures over 256x256?
« Reply #3 on: June 16, 2012, 12:10:23 pm »
Should actually work then...if you scale the sprite to a width and height that are powers of 2. Everything else will be scaled to 256*256...maybe that's your problem!?