Welcome, Guest. Please login or register.
July 31, 2010, 08:03:00 PM
Home Help Search Login Register
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base

Qbasicnews.com  |  General  |  General/Misc  |  Topic: OpenGL Headers Work Started « previous next »
Pages: [1] Print
Author Topic: OpenGL Headers Work Started  (Read 1875 times)
Hordeking
Member
*
Posts: 73



OpenGL Headers Work Started
« on: January 16, 2005, 08:30:04 PM »

I've begun working on adding function prototypes to the headers of the GLUT and GLU libraries. If anyone wishes to help me with this, I'd appreciate this.

Also, how do I submit my additions for the future releases?
Logged
v3cz0r
I hold this place together
*****
Posts: 924



WWW
OpenGL Headers Work Started
« Reply #1 on: January 17, 2005, 01:39:03 AM »

Forget about GLU, Rel sent me the full header, it will be on the next release.

Glut prototypes are really complex 'cause the callbacks passed as argument, if you don't know FB/C pointers very well, bad prototypes will cause loads of headaches..

Thanks anyway, any help is welcome.
Logged

Hordeking
Member
*
Posts: 73



OpenGL Headers Work Started
« Reply #2 on: January 17, 2005, 01:42:50 AM »

I've been sticking with the simple stuff for the time being.
Mostly bringing the flags over and dealing with the simpler functions.
Logged
relsoft
*/-\*
*****
Posts: 3924



WWW
OpenGL Headers Work Started
« Reply #3 on: January 17, 2005, 04:41:56 AM »

Don;t forget the teapot. :*)
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
chotoboto
New Member

Posts: 12



an glui?
« Reply #4 on: January 17, 2005, 11:39:05 AM »

and waht about glui, is a simply gui build over glut. It is easier than windows gui.
Logged
Hordeking
Member
*
Posts: 73



OpenGL Headers Work Started
« Reply #5 on: January 17, 2005, 07:18:48 PM »

I've never even heard of GLUi

But from what I've seen, it's not a standard library.

Also, this is for Relsoft:

Since #defines are in the language, shouldn't we be defining the standard OpenGL types? (e.g. #define GLBYTE byte, #define GLINT integer) It's good for conformance to set standards.

Also, I've successfully done it with my own copies of the libraries, and it wasn't hard: encaspsulate the header files with:

Code:
#if not defined(HEADER__H__)
    #define HEADER__H__
.
.
.
#endif


This will allow for the includes to be done in a proper fashion,
such as GLU including gl.bi and GLUT including both glu.bi and gl.bi.
It also takes some of the stress off the end user (who has to make sure to #include the files in his own source in the proper order.

A side note: which is better for constants? Have them declared as CONST x or simply #define then as in the C headers?

As for glut*Teapot(), too complicated Wink
Logged
chotoboto
New Member

Posts: 12



re
« Reply #6 on: January 17, 2005, 07:53:33 PM »

Here is the glui library. It is very easy to learn.

http://www.cs.unc.edu/~rademach/glui/


I have no idea if it will be posible to port it to freebasic. I use it a little in c++ and you can learn it easily
Logged
adosorken
*/-\*
*****
Posts: 3654



WWW
OpenGL Headers Work Started
« Reply #7 on: January 17, 2005, 08:01:59 PM »

It would be far better if it didn't have such a huge dependency.
Logged

'd knock on wood, but my desk is particle board.
Hordeking
Member
*
Posts: 73



OpenGL Headers Work Started
« Reply #8 on: January 17, 2005, 08:18:57 PM »

If what didn't have a huge dependency? Are you responding to me or to choto?
Logged
adosorken
*/-\*
*****
Posts: 3654



WWW
OpenGL Headers Work Started
« Reply #9 on: January 18, 2005, 12:01:26 AM »

To choto. GLUI is dependant on opengl and requires glut. Also, it would have to be compiled to a dll or static library first, and even then, it's object-oriented, which usually spells trouble for us FB coders. Sad
Logged

'd knock on wood, but my desk is particle board.
relsoft
*/-\*
*****
Posts: 3924



WWW
OpenGL Headers Work Started
« Reply #10 on: January 18, 2005, 04:48:27 AM »

Quote from: "Hordeking"
I've never even heard of GLUi

But from what I've seen, it's not a standard library.

Also, this is for Relsoft:

Since #defines are in the language, shouldn't we be defining the standard OpenGL types? (e.g. #define GLBYTE byte, #define GLINT integer) It's good for conformance to set standards.

Also, I've successfully done it with my own copies of the libraries, and it wasn't hard: encaspsulate the header files with:

Code:
#if not defined(HEADER__H__)
    #define HEADER__H__
.
.
.
#endif


This will allow for the includes to be done in a proper fashion,
such as GLU including gl.bi and GLUT including both glu.bi and gl.bi.
It also takes some of the stress off the end user (who has to make sure to #include the files in his own source in the proper order.

A side note: which is better for constants? Have them declared as CONST x or simply #define then as in the C headers?

As for glut*Teapot(), too complicated Wink


I used #Define  instead of const so all GL datatypes are supported.

So you could do a:

Code:
Dim Light(3) as GlFloat


BTW, #Defines are faster parsed than Const.;*)
Logged

y smiley is 24 bit.


Genso's Junkyard:
http://rel.betterwebber.com/
Pages: [1] Print 
Qbasicnews.com  |  General  |  General/Misc  |  Topic: OpenGL Headers Work Started « previous next »
Jump to:  


Login with username, password and session length

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
SMF Theme © Gaia, Hosting by Employers Job Post
Valid XHTML 1.0! Valid CSS!