LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 10-11-2007, 01:06 PM   #1
simasimon
Member
 
Registered: Mar 2006
Posts: 60

Rep: Reputation: 15
GLubyte definition


hi
i need yo use a data structure defined as GLubyte. apparently GLubyte is defined in <GL/glu.h> or <GL/glut.h> in windows. someone knows which would be the equivalent to this library in linux? thanx
on C
 
Old 10-11-2007, 01:33 PM   #2
dmail
Member
 
Registered: Oct 2005
Posts: 970

Rep: Reputation: Disabled
GLubyte is not a data structure it is a (integral)type which is an unsigned 8 bit integer, which on most modern platforms is unsigned char. This type is not defined by glut but by GL itself.

quote taken from the red book chapter 1
http://www.glprogramming.com/red/chapter01.html
Quote:
Include Files

For all OpenGL applications, you want to include the gl.h header file in every file. Almost all OpenGL applications use GLU, the aforementioned OpenGL Utility Library, which requires inclusion of the glu.h header file. So almost every OpenGL source file begins with

#include <GL/gl.h>
#include <GL/glu.h>

If you are directly accessing a window interface library to support OpenGL, such as GLX, AGL, PGL, or WGL, you must include additional header files. For example, if you are calling GLX, you may need to add these lines to your code

#include <X11/Xlib.h>
#include <GL/glx.h>
 
Old 10-11-2007, 01:33 PM   #3
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 70
Quote:
Originally Posted by simasimon View Post
hi
i need yo use a data structure defined as GLubyte. apparently GLubyte is defined in <GL/glu.h> or <GL/glut.h> in windows. someone knows which would be the equivalent to this library in linux? thanx
on C
On my system, it is typedefed in /usr/include/GL/gl.h. This file is #included by /usr/include/GL/glu.h and by /usr/include/GL/glut.h. So basically, you use the same headers.

If you #include <GL/glu.h> or #include <GL/glut.h> you should link to libglut (which may be provided by freeglut or glut). If you #include <GL/gl.h> directly (and donít #include the others), you should link to libGL (provided by various packages, including mesa and probably your graphics card driver).
 
Old 10-11-2007, 01:48 PM   #4
simasimon
Member
 
Registered: Mar 2006
Posts: 60

Original Poster
Rep: Reputation: 15
thanx for your answers
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is the definition of Jiffy? Reekkor Linux - General 2 04-26-2007 08:14 AM
Need a Definition dudeman41465 Linux - Software 2 11-07-2005 06:07 AM
DISK_ERR1 - definition? Risc91 AIX 2 10-28-2004 04:48 PM
multiple definition ? lackluster Linux - Software 1 11-27-2003 06:29 PM
New terminal definition gdeckler Linux - Newbie 1 10-07-2003 12:38 AM


All times are GMT -5. The time now is 11:34 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration