View Full Version : portability of OpenGL
01-20-2004, 11:52 AM
Using Mesa, I have some code that mapped a texture on a sphere.
Using the identical code with NVIDIA's drivers, I had to run using a power of 2 on the bitmap sizes.
I understand that it would be faster to run with a power of 2, but which behavior is "correct" according to the standard?
Also, I have seen comments to the effect that for Windows machines, the glut code does not really set fullscreen mode with control of resolution, and the only way to do so is to write it in windows-specific code. This was on an old thread, so the question is, is this still true, and if so does anyone have a portable library for doing that, as I have no desire to embed Windows-specific code in anything.
01-20-2004, 01:19 PM
Yes, it is the 'standard' to use a power of 2 sized texture, plus at least for me, i cannot even load a texture in opengl without a power of 2 texture, it kind of sucks.
Also, glut has a function called glutGameMode or something along those lines, that will set the screen to actuall fullscreen and let you control screen resolution, bpp, and refresh rate.
Try looking in glut.h, it's at the very bottom of the file, you can see the parameters to pass in.
01-21-2004, 03:47 AM
The OpenGL spec says all textures have to be power of 2 dimensions. If other dimensions work with Mesa this is non-standard behaviour and you can't rely on it to work either on other implementation or on other versions of Mesa.
There is an extension (NV_texture_rectangle) that allows for arbitrary texture size.
01-21-2004, 04:16 AM
The only way MESA could allow arbitrary texture dimensions without violating the spec, is by implementing the ARB_texture_non_power_of_two (http://oss.sgi.com/projects/ogl-sample/registry/ARB/texture_non_power_of_two.txt) extension. Check your extension string. I bet it's in there.
01-21-2004, 04:25 AM
Mesa is NOT OpenGL, so if something works different you can assume that Mesa is the one that is incorrect.
The website is pretty clear about that:
Mesa is a 3-D graphics library with an API which is very similar to that of OpenGL.* To the extent that Mesa utilizes the OpenGL command syntax or state machine, it is being used with authorization from Silicon Graphics, Inc.(SGI). However, the author does not possess an OpenGL license from SGI, and makes no claim that Mesa is in any way a compatible replacement for OpenGL or associated with SGI. Those who want a licensed implementation of OpenGL should contact a licensed vendor.
Please do not refer to the library as MesaGL (for legal reasons). It's just Mesa or The Mesa 3-D graphics library
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.