problem with IMG_Load

Member
Posts: 72
Joined: 2006.10
Post: #16
Obviously, however, I have high doubts that his Texture Matrix is anything else than identity...
Quote this message in a reply
Member
Posts: 185
Joined: 2005.02
Post: #17
Ok Thanks!
I knew openGL coordinates referenced from the bottom left. I didn't know bmp files referenced from the top left.
Quote this message in a reply
Sage
Posts: 1,403
Joined: 2005.07
Post: #18
ferum Wrote:I knew openGL coordinates referenced from the bottom left.
They are not referenced from bottom left.

Sir, e^iπ + 1 = 0, hence God exists; reply!
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #19
The TEXTURE_2D target only accepts textures with a power of two for it's dimensions.

There is also a TEXTURE_RECTANGLE_EXT that will allow you to use any size textures, but requires a GeForce2 or Radeon or better video card. It also doesn't support mip-mapping, and the texture coordinates aren't normalized.

I don't know exactly what they are called, but the new OpenGL 2.0 (or 1.5?) non-power of two textures support mip-mapping, but need a really fancy and expensive video card.

And for those that are arguing, how does OpenGL coordinate system preserve "mathematical coherence"? It certainly confuses new people at first, but it's not like it's mathematically superior. The orientation of the coordinate system is as arbitrary of a decision in math as it is in OpenGL. If anything it's slightly annoying because it's not the same coordinate system used for images and input coordinates.

Scott Lembcke - Howling Moon Software
Author of Chipmunk Physics - A fast and simple rigid body physics library in C.
Quote this message in a reply
Member
Posts: 72
Joined: 2006.10
Post: #20
Skorche Wrote:how does OpenGL coordinate system preserve "mathematical coherence"?

From my point of view, working in the first quadrant has many advantages, especially when doing signal representation. A layman's way of putting it would be: up is positive, down is negative.

Having the untransformed state that way for vertices and the other way around for texture coordinates would be useful for newbies, but it would be incoherent. Hence my comments about it.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #21
Frogblast Wrote:Check again, no iBook supports OpenGL 2.0 today.

Incorrect...

10.4.8 introduces OpenGL 2.0 support. Radeon 9550+ and GeForce 6600+ cards report that they support it (what about 5200s? anyone have one to comment?). The last generation of G4 iBooks have 9550s.

10.4.8 also introduces the extensions that were missing from 10.4.7 but merged into 2.0 -- ARB_draw_buffers and ARB_texture_non_power_of_two. Radeon 9550+ and GeForce 6600+ cards report that they support both.

However, the Radeons are effectively lying. They do *not* support non-power-of-two textures with mipmapping in hardware. If you enable mipmapping for an NPOT texture on a Radeon, you will fall back to software rendering.

On Windows, the Radeon cards report OpenGL 2.0, but *not* ARB_texture_non_power_of_two, meaning that the extension check is a valid check for hardware support. On Mac OS X, Apple has decided to make our lives difficult by forcing us to check whether doing this causes a software fallback.

Code:
#if defined(__APPLE__)
    long hardwareAccelerated;

    CGLGetParameter(
        CGLGetCurrentContext(),
        kCGLCPGPUVertexProcessing,
        &hardwareAccelerated);
    if (!hardwareAccelerated)
    {
        fprintf(stderr,
            "Warning: Vertex processing is NOT being hardware-accelerated\n");
    }
    CGLGetParameter(
        CGLGetCurrentContext(),
        kCGLCPGPUFragmentProcessing,
        &hardwareAccelerated);
    if (!hardwareAccelerated)
    {
        fprintf(stderr,
            "Warning: Fragment processing is NOT being hardware-accelerated\n");
    }
#endif

Please file a bug report to have the Radeons stop reporting support for the ARB_texture_non_power_of_two extension, to make our lives easier, and make OpenGL on the Mac consistent with Windows. The more people file, the more likely it is to change.
Quote this message in a reply
Post Reply