The Daily Click ::. Forums ::. Non-Klik Coding Help ::. Texture Problem (OpenGL)
 

Post Reply  Post Oekaki 
 

Posted By Message

Golem



Registered
  08/08/2011
Points
  264
11th January, 2012 at 17:13:38 -

Hey! I'm having some problems with an OpenGL texture spazzing out for unknown reasons.
If anyone with some OpenGL experience could help out, it would be greatly appreciated!

Pic:
Image

As far as I know the texture coordinates are correct, yet the texture appears flipped, and top- and leftmost tiles are just plain wrong. The text quads have no texture problems though, for some reason.

The texture coordinates are all multiples of one-third, since the texture is a 3x3 grid of tiles.

I managed to get some of the tiles correct using arcane texture coordinates through trial and error (not shown in picture), but the top- and leftmost tiles are still out of my reach (bottom- and rightmost in picture).

HALP!

 
/**
* A simple signature.
*
* @author Golem
*/

Golem



Registered
  08/08/2011
Points
  264
11th January, 2012 at 17:30:28 -

And minutes later I fix the problem...

I resized the tile image and made a 4x4 grid instead. I guess OpenGL doesn't like one-thirds. Makes sense to me.

 
/**
* A simple signature.
*
* @author Golem
*/

Fordom

Nordanrikets konung

Registered
  12/02/2009
Points
  190

VIP Member
16th January, 2012 at 17:04:00 -

TUT!

 
This forum is full of trolls and disinfo agents.

Chris Burrows



Registered
  14/09/2002
Points
  2396

GOTW WINNER OCT. 2011
22nd January, 2012 at 22:50:49 -

Hlad you got it working! What exactly are you making?

Also, are you using OpenGL in MMF2 or somewhere else?

 
n/a

Golem



Registered
  08/08/2011
Points
  264
25th January, 2012 at 12:00:23 -

I'm making my own game engine in Java, though I put it on hold for now and started using the Slick2D game library. After 4 days of intense programming I got the basis for mutliplayer set up already. So far you can chat, and entity updates are working, i think. With a fake connected user at least. Don't know how effective it is though.. will probably send excessive ammounts of data. Oh the joys of optimization!

I might post in my team project thread soon, when I get the editor working and implement some actors and monsters.
Actually, I might make the editor in MMF2 if possible. Hmm.

 
/**
* A simple signature.
*
* @author Golem
*/
   

Post Reply



 



Advertisement

Worth A Click