Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


Tachikoma

Member Since 25 Apr 2004
Offline Last Active Dec 19 2013 12:03 AM

Posts I've Made

In Topic: Singleton pattern abuse

12 June 2012 - 10:45 AM

I would be interested to read comments on how some of you mitigate duplicate resources without a global-like resource pool pattern that uses reference counting, and so on.

I suppose laungages with GC capability helps in that respect, and so does auto_ptr/shared_ptr to some extent...

In Topic: Need to support OGL 1.4 retrospectively... (NPOT Problem)

17 May 2012 - 09:33 AM

Converting the images (and the code that uses them) to be POT compatible is out of the question.


While reading the NPOT textures from file, you could resample them to the nearest POT dimensions in software. If you don't want to lose detail, you might want to resample up only, rather than nearest.

After buffering the resulting POT textures to GL, use a texture matrix to scale the bound textures to the correct aspect ratio on the geometry.

In Topic: How the hell do you answer a phone?

24 February 2012 - 06:13 PM

At home: "Yep...."

At work: "<company_name>; <my_name> speaking..."

In Topic: Aspect Ratio in 3D

10 February 2012 - 11:27 PM

Well, the 3D side of things are completely independent of the display space. The only connection between the two are matrices, more importantly, the projection matrix. So that means the aspect ratio is usually defined by the projection matrix.

Now, to accomodate different aspect ratios, you could choose from several methids. One trick is to keep the vertical FOV (field of view) constant, and only change the horizontal FOV. Other method keeps the horizontal fixed and changes the vertical one. Or you could also use some combination of both.

Your real problem is the display resolution vs. the display aspect ratio. For example, the graphics card may expose a bunch of display resolutions with 4:3 aspect ratios, even though the display itself is 16:9 or 16:10. The reverse may also be true. By looking at the display mode list, there is no reliable way to know what physical aspect ratio the display uses, unless you do some OS specific queries about the display hardware and its native resolution. Even then, such info may not be available.

I guess your "fail safe" option is to allow your users to explicity chage the projection matrix aspect ratio, if needed.

In Topic: Finding a suitable dedicated girlfriend

09 February 2012 - 07:22 PM

This thread is really confusing.

PARTNERS