LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 12: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, 12: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, 12:33 PM   #3
osor
HCL Maintainer
 
Registered: Jan 2006
Distribution: (H)LFS, Gentoo
Posts: 2,450

Rep: Reputation: 78
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, 12:48 PM   #4
simasimon
Member
 
Registered: Mar 2006
Posts: 60

Original Poster
Rep: Reputation: 15
thanx for your answers
 
  


Reply



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 07:14 AM
Need a Definition dudeman41465 Linux - Software 2 11-07-2005 05:07 AM
DISK_ERR1 - definition? Risc91 AIX 2 10-28-2004 03:48 PM
multiple definition ? lackluster Linux - Software 1 11-27-2003 05:29 PM
New terminal definition gdeckler Linux - Newbie 1 10-06-2003 11:38 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:28 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration