Page 1 of 1

Posted: Sat Aug 24, 2002 3:41 pm
by BackupUser
Restored from previous forum. Originally posted by halo.

Whenever I run glut commands, I get an error saying glu32.dll isn't found. Does this just need to be in the same directory as my program, or somewhere else? Where can I find this file?

A search at opengl.org yielded this result:
Sorry, I didn't find any documents that matched your search for "glut32.dll"!

Thanks.

Posted: Sat Aug 24, 2002 3:52 pm
by BackupUser
Restored from previous forum. Originally posted by traumatic.

you can put glut32.dll in either you system-directory or the application directory just as you do with every dll.

you can't find it on opengl.org because glut has nothing to do with opengl. it's a utility library written by mark kilgard.

get it at http://www.xmission.com/~nate/glut.html (nate did the win32 conversion)




good programmers don't comment their code. it was hard to write - should be hard to read!

Posted: Sat Aug 24, 2002 4:50 pm
by BackupUser
Restored from previous forum. Originally posted by halo.

Holy crap! Has anyone ued the glut libs? PB says the command has two variable, but this says four. This is the documentation on the glutinit() command:

void glutInit(int *argcp, char **argv);


argcp
A pointer to the program's unmodified argc variable from main. Upon return, the value pointed to by argcp will be updated, because glutInit extracts any command line options intended for the GLUT library.

argv
The program's unmodified argv variable from main. Like argcp, the data for argv will be updated because glutInit extracts any command line options understood by the GLUT library.


Any bright ideas?

Posted: Sat Aug 24, 2002 4:57 pm
by BackupUser
Restored from previous forum. Originally posted by halo.

OH, it is two variables. But what the hell are they?

Posted: Sat Aug 24, 2002 6:29 pm
by BackupUser
Restored from previous forum. Originally posted by Danilo.

This args are used in C/C++ libraries.

cya,
...Danilo

(registered PureBasic user)

Posted: Sat Aug 24, 2002 6:55 pm
by BackupUser
Restored from previous forum. Originally posted by halo.

What do I actually type in PureBasic to make it work?

InitGlut(?,?)

Posted: Sun Aug 25, 2002 2:28 am
by BackupUser
Restored from previous forum. Originally posted by VPureBasic.
void glutInit(int *argcp, char **argv);
Hi Halo...

Here's your answer of how to set glutInit()

Global Argc.l : Argc = 1 ;- Number of argument sentence Atleast 1
Global Argv.s : Argv = "" ;- Sentence arguments as "-Display", "-Geometry" ( Windows need 0 )

glutInit_( @Argc,Argv ) ;- Addr of #arguments, Arguments

etc... :)

Roger Beausoleil

Posted: Sun Aug 25, 2002 3:07 am
by BackupUser
Restored from previous forum. Originally posted by VPureBasic.
What do I actually type in PureBasic to make it work?
InitGlut(?,?)
Here my friend a little example of how to open a window with all initialisation...

IncludeFile "OpenGl.pbi"

Global Argc.l : Argc = 1
Global Argv.s : Argv = ""

Procedure Init()
glClearColor_( 1.0,1.0,1.0,0.0 )
glShadeModel_( #GL_FLAT )
EndProcedure

Procedure Display()
glClear_( #GL_COLOR_BUFFER_BIT )
glutSwapBuffers_()
EndProcedure


glutInit_( @Argc,Argv )
glutInitWindowSize_( 400,100 )
glutInitWindowPosition_( 100,100 )
glutCreateWindow_( "Opening An OpenGL Window" )


Init()
glutDisplayFunc_( @Display() )

glutMainLoop_()

End

I hope this will help... PureBasic is very powerfull!

Roger Beausoleil
Quebec - Canada

Posted: Sun Sep 01, 2002 12:05 am
by BackupUser
Restored from previous forum. Originally posted by halo.

I don't understand. Your GL drawing must go in the display function, but nothing I try renders anything.

What is the Glu main loop? Doesn't that take away all control of your program?

I have some perspective rendering sort of working, but the Z buffer is all screwy and the screen is really wierd.