PDA

View Full Version : Is 'glArrayElement' defined in OpenGL library or in GUL or in GULT?



earth_walker
06-18-2003, 05:49 PM
The reason I ask this question is I import 'OpenGL' unit and try to use 'glArrayElement' routine in Delphi 5.0, but the compiler told me that it is undefined identifier. I want to solve this problem and use 'glArrayElement' or the routine with same function.

Can you tell me what unit to include? Any related ideas are apperiated.

Thank you!

earth_walker
06-18-2003, 06:17 PM
Hi! I checked the SDK help files of Delphi 5.0. And found there is alternative routine 'glArrayElementEXT'. However, the version of my Delphi doesn't support it. How can I update it?

Thank you!

By the way, the way I check if it support 'glArrayElementEXT':
I use the code



EXTstr := glGetString(GL_EXTENSIONS);
Memo1.lines.Add(EXTstr);


the out put is "GL_WIN_swap_hint GL_EXT_bgra GL_EXT_paletted_texture", but it needs "GL_EXT_vertex_array" to support this function.

What can I do to update the Delphi?

Thank you!

M/\dm/\n
06-19-2003, 04:46 AM
This routine is core GL spec from 1.3, maybe even earlier, make sure you have recent drivers & unit files, & take a look at GL1.4 spec's there should be more info. If that doesnt help, you'll have to manualy get function adresses & assign them to f/n pointers. I can't tell you how this can be done in F**N Delphi (SORRY)!

zeckensack
06-19-2003, 04:58 AM
Originally posted by earth_walker:
<...>
By the way, the way I check if it support 'glArrayElementEXT':
I use the code



EXTstr := glGetString(GL_EXTENSIONS);
Memo1.lines.Add(EXTstr);


the out put is "GL_WIN_swap_hint GL_EXT_bgra GL_EXT_paletted_texture" <...>

Is that the complete list? Then you're in trouble. Could you please check the GL_VENDOR, GL_RENDERER and GL_VERSION strings (in the same way)? If you get "MS GDI Generic" or similar you won't have much luck, then your problem lies elsewhere.

rosentzp
06-19-2003, 05:18 AM
glArrayElement() is from "gl", not from glu or glut.

the first version of OpenGL to support vertex arrays, including this function is 1.1, which version is very old and very common...

M/\dm/\n
06-19-2003, 05:20 AM
Your vcard =>.........

earth_walker
06-19-2003, 06:03 AM
Hi! zeckensack:

Yes, that is the complete list.
I checked the veriable names you provided:
VENDOR='Microsoft Corporation'
RENDERstr='GDI Generic'
VERSION='1.1.0'

Seems I'm in trouble. If cannot update it, I think I'm going to use the simpler commands such as "glVertex".

Thank you for your help.

By the way: Is this the problem of Microsoft Windows or the problem of Delphi? I guess it is the problem of Delphi because it provides the .dcu files to import. Just want to confirm.

Deiussum
06-19-2003, 06:27 AM
The Microsoft drivers do include the vertex array stuff, so your problem is likely something with how Delphi imports the functions. I can't help you much with that as I know next to nothing about Delphi.

You might want to look into finding updated drivers for your video card, though. Most recent cards have OpenGL drivers that are vastly superior to the default Microsoft ones, even for the simple stuff.

earth_walker
06-19-2003, 06:28 AM
M/\dm/\n:
Hi! The video card is Savage4 from S3 Graphics Inc. 8MB ram.
The Driver Date is 6/6/2001. Is that old?
It seems pretty hard to update it, because that computer is a stand alone one and don't have internet, and I'm not sure if I should download the driver from S3Graphic homepage because S3 is only a chip manufacturer, but I will try to check somewhere else.

Deiussum
06-19-2003, 07:07 AM
I haven't had an S3 card since before the first Voodoo came out, but so far as I know, S3 cards don't have very good OpenGL support.

Maybe they've improved somewhat since then, but they don't get nearly the attention that nVidia and ATI cards get, so I'm not sure...

M/\dm/\n
06-19-2003, 07:20 AM
Somtimes drivers can give you the hw support, though partially emulated.

earth_walker
06-20-2003, 04:37 AM
Deiussum:
That's true, they don't support OpenGL very well.
I update my driver to the date of 2003 and recompiled the test program, but it showed that the OpenGL is still version 1.10...
Maybe it doesn't matter even if it is 1.10. I will try to contact Borland to see if there is any chance.
Thank you!