Page 1 of 2 12 LastLast
Results 1 to 10 of 19

Thread: OpenGL.pas?

  1. #1

    OpenGL.pas?

    Hello everybody!

    I was trying to run one of Nehe's tutorials, and the compiler came accross
    Code:
    uses GLaux;
    and in Glaux.pas, it has
    Code:
    uses OpenGL;
    Which Lazarus says it cannot find.

    I searched my hard drives and could not find anything with the name OpenGL.pas. Where could I get it from?
    (I have Lazarus and all the JEDI-SDL stuff as well)

    Thanks for ur time!

  2. #2
    Co-Founder / PGD Elder WILL's Avatar
    Join Date
    Apr 2003
    Location
    Canada
    Posts
    6,107
    Blog Entries
    25

    OpenGL.pas?

    If you have JEDI-SDL then the OpenGL headers should be in one of the folders.

    Look in 'JEDI-SDLv1.0\OpenGL\Pas' and the file you probably want is gl.pas.
    Jason McMillen
    Pascal Game Development
    Co-Founder





  3. #3

    OpenGL.pas?

    Alternatively, you could also try this version.

  4. #4

    OpenGL.pas?

    Quote Originally Posted by WILL
    If you have JEDI-SDL then the OpenGL headers should be in one of the folders.

    Look in 'JEDI-SDLv1.0\OpenGL\Pas' and the file you probably want is gl.pas.
    Haha, I didnt'know it waas that simple! haha.

    Then why does it say 'uses OpenGL' in the program (that's the translated version to Pascal from Nehe's C++ tuts btw) if what it means is 'uses gl' ?

    Anyways thanks, ill go try it out.

    And Traveller: the ] I'm sorry, but the page you requested was not found.
    Click here to start your journey... [/code] page.
    I had a look around the (your?) site and I really like it!
    I'll have a look through the tutorials and maybe ask for some help to get something similar to those cool textures and fonts in my game, if you don't mind!
    Is it your site anyways? well, if it is, jst a tiny little comment: [size=7px]in ur 'tutorial overview', you have 'where' instead of 'were' ! [/size]

    Cheers

  5. #5

    OpenGL.pas?

    Quote Originally Posted by IlovePascal
    Quote Originally Posted by WILL
    If you have JEDI-SDL then the OpenGL headers should be in one of the folders.

    Look in 'JEDI-SDLv1.0\OpenGL\Pas' and the file you probably want is gl.pas.
    Haha, I didnt'know it waas that simple! haha.

    Then why does it say 'uses OpenGL' in the program (that's the translated version to Pascal from Nehe's C++ tuts btw) if what it means is 'uses gl' ?
    Delphi ships with OpenGL.pas, while Tom Nuydens did the initial transalation that kept the files the way the C/C++ files are ie gl.pas, glu.pas etc.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  6. #6

    OpenGL.pas?

    Quote Originally Posted by IlovePascal
    I had a look around the (your?) site and I really like it!
    I'll have a look through the tutorials and maybe ask for some help to get something similar to those cool textures and fonts in my game, if you don't mind!
    Is it your site anyways? well, if it is, jst a tiny little comment: [size=7px]in ur 'tutorial overview', you have 'where' instead of 'were' ! [/size]

    Cheers
    Thanks! I have not made any updates recently, although I might be soon as I have some cool things to show regarding my competition entry.

    Most of the graphics you see on my site were made with Lightwave and Photoshop. The letters for example are 3d objects with a wood texture on them.

    Thanks for the typo error, I'll fix that with the next update as well.

    The link is also fixed, although I take it from your message that it isn't really needed anymore.

  7. #7

    OpenGL.pas?

    Hey Im back!

    I tried changing 'OpenGL' with 'gl' and now that doesn't seem to be a problem anymore! Good!

    However, now the compiler complains about the unit Glaux. It doesn't seem to accept the 'export' procedures/functions. I have no idea how 'export' works, or even what 'stdcall' means, so I dont know how to solve this.
    Here is some of the Glaux unit, so that u have an idea of what's going on:
    Code:
    unit Glaux;
    
    interface
    
    uses Windows, gl;
    
    type
    	TAUX_RGBImageRec= record
    		sizeX, sizeY&#58; integer;
    		data&#58; pointer;
    	end;
    	PTAUX_RGBImageRec= ^TAUX_RGBImageRec;
    
    function auxDIBImageLoadA&#40;const dibfile&#58; PChar&#41;&#58; PTAUX_RGBImageRec; stdcall;
    procedure auxWireSphere&#40;value&#58; double&#41;;stdcall;
    procedure auxSolidSphere&#40;value&#58; double&#41;;stdcall;
    procedure auxWireCube&#40;value&#58; double&#41;;stdcall;
    
    &#40;...&#41;
    
    const
    	glaux1 = 'glaux.dll';
    
    implementation
    
    function auxDIBImageLoadA; external glaux1;
    procedure auxWireSphere;external glaux1;
    procedure auxSolidSphere;external glaux1;
    procedure auxWireCube;external glaux1;
    
    &#40;...&#41;
    
    end.
    And the compiler(Lazarus) says:
    ':' expected but ';' found (at the line 'function auxDIBImageLoadA; external glaux1;')

    That is really annoying! What am I supposed to do?


    Another problem that I get with one of the tutorials is about some 'dereferencing', which I don't know anything about. I guess it's the opposite of making a refrence by pointer, but how do I 'dereference'?

    And to Traveler: I don't think ill need it (I might, if it solves either of the problems above!), bt thanks anyways!

    Thanks all for your help

  8. #8

    OpenGL.pas?

    Actually if I remember correctly I did send Nehe quite a few JEDI-SDL compatible ports. Have you tried those instead?
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  9. #9

    OpenGL.pas?

    Quote Originally Posted by savage
    Actually if I remember correctly I did send Nehe quite a few JEDI-SDL compatible ports. Have you tried those instead?
    Oh yep, I hadn't seen that one in the list!

    Well, I jst downloaded it and tried to compile it, and here's what Lazarus says about the unit OpenGL12 that it requires:
    Code:
    OpenGL12.pas&#40;2506,5&#41; Error&#58; Incompatible types&#58; got "Pointer" expected " &#91; procedure variable type of procedure&#40;LongWord, Single&#41;;StdCall &#93; "
    at the line
    Code:
    glAccum &#58;= GetProcAddress&#40;GLHandle, 'glAccum'&#41;;
    and every line after that in that same procedure has the same error message! lol

    So what should I do? haha

    And since i always have problems with those 'stdcall' and 'export', could you explain what they do?

    Cheers all!

  10. #10

    OpenGL.pas?

    Ok it looks like Nehe does not have the latest version of those demos that work with gl.pas, glu.pas etc.

    Could you please have a look here -
    http://jedi-sdl.cvs.sourceforge.net/...Demos/3D/NeHe/

    You will also need to ensure that you have the latest version of gl.pas ( OpenGL12.pas is no longer supported in v1.0 of JEDI-SDL ) etc which can be downloaded from...
    http://jedi-sdl.cvs.sourceforge.net/....0/OpenGL/Pas/

    stdcall is a Windows function calling convention while cdecl tends to be used on other platforms/operating systems. You can use cdecl on Windows, but most Dlls export their functions using stdcall. If you need further clarification let me know.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •