PDA

View Full Version : Problem running Nehe



IlovePascal
14-02-2007, 12:59 AM
Hello,

(1)I tried to run Nehe's tutorials, but most of them require GLaux. Where do I get that? (I found glaux.aw and .ppw, but not .pas in JEDI-SDL).

And (2), many times I got the error "illegal type conversion: Shortstring to ^Char", how do i solve that?
Something to do with pChar...how do i convert that?
(the problem was in this line
glCallLists(length(text),GL_UNSIGNED_BYTE,pchar(te xt)); with Text:string)

Cheers :wink:

cragwolf
14-02-2007, 05:21 AM
You using Free Pascal? Add the command-line switch -Mdelphi when you compile your program. i.e. fpc -Mdelphi blah.pp

Traveler
14-02-2007, 08:43 AM
I believe glaux is old and should not be used anymore.
In any case, I still had the zip on my drive somewhere. You can download it from here (http://www.gameprogrammer.net/zip/glaux.zip)

IlovePascal
15-02-2007, 05:37 AM
@Cragwolf: sorry, it's true I didn't specify; I use Dev-Pascal and/or Lazarus, whichever works best for each of my projects lol!
I know many of you will say Dev-Pascal is outdated, bt I replaced most of it's 'contents' with those that came with Lazarus, so now it's updated :D

@Traveler: Cool thanks, that should solve it!
However, you say it's old and I shouldn't use it, so what's the best way around it?
Do you know Nehe's tutorials? They're great for explanation, but many of them use that unit...

Traveler
15-02-2007, 09:12 AM
Well, the dll alone is over 1mb in size, while the actual functions used is minimal. For instance, many of the lessons use it to load textures, while that can also be done by using the units found on www.sulaco.co.za/ (http://www.sulaco.co.za/opengl_project_BMP_JPG_TGA_texture_loader.htm).