PDA

View Full Version : Extensions in OpenGL



M109uk
01-09-2003, 04:10 PM
hi all,

I have a Geforce 4 MX 440 SE and im trying to use the GL_ARB_multitexture extension, but for some reason i can not use it :cry: i know it is supported because i downloaded a program to check what is and isnt supported and it is in the supported list, i also downloaded a simple multitexture program from nVidia which uses the GL_ARB_multitexture and it works great.. i have no idea what is wrong here, i have tried 4 different OpenGL units and 2 different GLExtension units and still the same problem :x !

Does any one have a working program that they can send me with full source, inc OpenGL headers?

Thanx for any help!

Alimonster
01-09-2003, 09:33 PM
Have you tried the DOT (http://www.delphi3d.net/dot) framework from Delphi3d yet? The glExt.pas file there has a function called "glext_ExtensionSupported" which you can use in your own app. Try the following:

[background=#FFFFFF][comment=#0000FF][normal=#000000][number=#C00000][reserved=#000000][string=#00C000]if glext_ExtensionSupported('GL_ARB_multitexture', '') then
BeHappy
else
TrySomethingElse;

M109uk
02-09-2003, 11:50 AM
yes i have tried it, and it always results in false :( and even if i initialize the functions myself it causes an abstract error..

Alimonster
02-09-2003, 12:12 PM
That's pretty goddarned weird. Take a look at this page (http://www.delphi3d.net/hardware/extsupport.php?extension=GL_ARB_multitexture) and see if your card is there (it should be). Try going to the nVidia page (http://www.nvidia.com/content/drivers/drivers.asp) and update your drivers. Something is going wonky here...

Also, check the output from PChar(glGetString(GL_EXTENSIONS)) in your debugger after initialising mucho GL things.

Maybe you've not set up some OpenGL stuff before the extensions? Move your extension set-up to as late as you can get away with, just to see if it makes a difference. I seem to recall that I had this problem (setting up exts prematurely) at some time.

M109uk
02-09-2003, 12:49 PM
Yeah i tried the page and my card is there lol, i'v upgraded and downgraded my drivers and no joy :(
Yeah, i just dont understand why i can run programs that use the extension, yet i cant :?

Ok cool, i'l give them a try soon.. thanx :)

Alimonster
02-09-2003, 12:56 PM
Yeah i tried the page and my card is there lol, i'v upgraded and downgraded my drivers and no joy :(
Yeah, i just dont understand why i can run programs that use the extension, yet i cant :?

Ok cool, i'l give them a try soon.. thanx :)
Mail me (akeys at icscotland dot net) the smallest example code (with a compiled exe just in case) you can make that has this problem and I'll try it at home. I still think that it's most likely that you haven't initialised some OpenGL function that's required (render context or whatever) before trying to set up the extensions, since it does sound similar to what happened to me.

M109uk
02-09-2003, 04:53 PM
ok, i have emailed you a sample app, i kinda forgot to attach it the first time :roll:, i hope it goes through cause my computer crashed while i was sending n recieving.

Alimonster
02-09-2003, 10:09 PM
Your thingy didn't work on my kit either, so something's up with the code...

I've emailed you a minimal test cradle. It should create a gl window and then immediately exit (since the message loop isn't actually a loop ;)). The idea is that it inits OpenGL and then tries the extensions. If you don't see a message then the extension is there fine.

Note that if you move the call to SetupExtensions in the TGLApplication constructor *any* further up then the exts should *fail*. This is what I think is going on in your code, somehow -- you may not have init'd all the GL stuff required. At least, I hope it's that since that's the most obvious thing ;). Let's see whether the test works on your PC though...

M109uk
03-09-2003, 02:40 PM
hi, thanx..
i found what was causing the problem, really stupid but i was initialising the GLExtensions in the intialization part of my textures, so it was being intialized before my OpenGL context :oops:

Thanks for your help