Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

How to know the version of the OpenGL library in Delphi 5.0?

Hi! I want to know if my OpenGL is later than version 1.1 or not. What command shall I use to obtain it?

The reason I raise this question is:
when I study using OpenGL library under Delphi 5.0 following the instruction of a reference book base on OperGL later than version 1.1, I found that OpenGL in Delphi doesn't include some routines and state variables introduced by book. For example: glEnableClientState(routine) and GL_COLOR_ARRAY(state variable).
By the way, my reference book is base on C language. However, because OpenGL is independent of operationing system, I think its identifiers should be the same no matter what language we use.

In case my version of OpenGL is too old, is it possible to update it? Because OpenGL follows the GPL license and it may be provided on Internet.

Thank you much!



«1

Comments

  • earth_walkerearth_walker Posts: 184Member
    Hi! I just checked the OpenGL website and found that the OpenGL library on my computer should be at least 1.1. Because it tells:
    *******************************************************************
    OpenGL v1.1 software runtime is included as part of operating system for WinXP, Windows 2000, Windows 98, Windows 95 (OSR2) and Windows NT. So you only need to download this if you think your copy is somehow missing .
    http://www.opengl.org/users/downloads/index.html
    *******************************************************************

    However, I still don't understand why I could find those routines and state variables.

    Thank you!
  • earth_walkerearth_walker Posts: 184Member
    Hi!

    I found another thing, in Delphi 5.0 OpenGL library should be implemented in a different way.

    The SDK help file of Delphi 5.0 doesn't include part of the identifiers in OpenGL, but has alternative ones. For example, I don't find glVertexPointer, but find glVertexPointerExt.

    However, when I tried to use glVertexPointerExt. The compiler gave a message that 'glVertexPointerExt' is undefined identifier. Then I think maybe I didn't USES the right library, then I add 'glut' in USES list, but Delphi 5.0 don't have glut.dcu. I search winxp and found that there is a file glut.dll at C:windowssystem32, but don't know how to use it.

    Can you give me some idea that how to import the full OpenGL library to Delphi program?

    Thank you!
  • earth_walkerearth_walker Posts: 184Member
    Hi! I checked the SDK help files of Delphi 5.0. And found there is alternative routines related to vertex array such as '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
    [code]
    EXTstr := glGetString(GL_EXTENSIONS);
    Memo1.lines.Add(EXTstr);
    [/code]

    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.

  • earth_walkerearth_walker Posts: 184Member
    I checked more veriables of the OpenGL library:
    GL_VENDOR='Microsoft Corporation'
    GL_RENDERstr='GDI Generic'
    GL_VERSION='1.1.0'

    Unfortunately, this problem lies every where and may not be able to solve. For now I may want to implement the function of vertex array in a different to avoid this problem.

    Also I may try to update the OpenGL to 1.4 in future, but for now I would better go to read the OpenGL book.

    Any ideas are appreciate. Thank you!
  • earth_walkerearth_walker Posts: 184Member
    Also I will try to find the newest video card driver tonight.

  • zibadianzibadian Posts: 6,349Member
    : Hi!
    :
    : I found another thing, in Delphi 5.0 OpenGL library should be implemented in a different way.
    :
    : The SDK help file of Delphi 5.0 doesn't include part of the identifiers in OpenGL, but has alternative ones. For example, I don't find glVertexPointer, but find glVertexPointerExt.
    :
    : However, when I tried to use glVertexPointerExt. The compiler gave a message that 'glVertexPointerExt' is undefined identifier. Then I think maybe I didn't USES the right library, then I add 'glut' in USES list, but Delphi 5.0 don't have glut.dcu. I search winxp and found that there is a file glut.dll at C:windowssystem32, but don't know how to use it.
    :
    : Can you give me some idea that how to import the full OpenGL library to Delphi program?
    :
    : Thank you!
    :
    You can call procedures in a DLL in several ways, but the easiest is static linking throught the external keyword:
    [code]
    procedure glVertexPointerExt(...); {StdCall;} external 'glut.dll';
    [/code]
    The code above still needs some work, becase I don't know the parameters of the procedure or its calling convention. You need to work that out using the SDK or help files.
    This way you can create your own glut unit, which interfaces with the glut library.
  • zibadianzibadian Posts: 6,349Member
    : Also I will try to find the newest video card driver tonight.
    :
    :
    What has this to do with Delphi programming???
  • earth_walkerearth_walker Posts: 184Member
    You are right. Sorry, I just sliped off the topic. Is there way to delete this message?
  • earth_walkerearth_walker Posts: 184Member
    Thank you! This is one of the ways to solve the problem. I may try it later.
  • zibadianzibadian Posts: 6,349Member
    : You are right. Sorry, I just sliped off the topic. Is there way to delete this message?
    :
    As far as I know only d fader can delete a message, but its no problem. Just remember next time you want to write such a message, its not really the topic of this board.
«1
Sign In or Register to comment.