Questions tagged [glu]

The OpenGL Utility Library

The OpenGL Utility Library (GLU) provides a number of higher level drawing routines and utility functions on top of OpenGL. As such it provides functionality for:

  • Mipmapping,
  • Matrix manipulation
  • Polygon tessellation
  • Quadrics
  • NURBS
  • Error handling

Version 1.3 of the GLU specification can be found on the OpenGL website (PDF).

Resources:

229 questions
3
votes
1 answer

Using GLU ES in Android

so I want to draw simple shapes (cylinders, spheres, and cones) in my Android app. Based on this question and answer, it seems like it is possible to port GLU into Android, which has exactly those functions I need. However, I am having trouble…
Tony Wickham
  • 4,706
  • 3
  • 29
  • 35
3
votes
1 answer

glTexImage2D vs. gluBuild2DMipmaps

Very basic OpenGL texture creation code: int width, height; BYTE * data; FILE * file; // open texture data file = fopen( filename, "rb" ); if ( file == NULL ) return 0; // allocate buffer width = 256; height = 256; data =(BYTE*) malloc( width *…
jalal sadeghi
  • 362
  • 4
  • 19
3
votes
1 answer

Moving a drawing around in openGL with mouse

I am trying to move an image around in openGL while holding left mouse button. i am NOT trying to drag an object around, just move the whole picture. Its a 2d drawing of a fractal and i was told that i can use gluortho2d but i can't find any info or…
Deadalus
  • 33
  • 1
  • 4
3
votes
2 answers

gluProject and 2D display

I would like to display a 2D image at a 2D point calculated from a 3D point using gluProject(). So I have my 3D point, I use gluProject to get its 2D coordinates, then I display my image at this point. It works well but I have a problem with Z…
SteveTJS
  • 635
  • 17
  • 32
3
votes
1 answer

gluDisk() function opengl

I am trying to create a function in my program that draws disk. I have a .h file called drawShape where I have all my drawing functions there. I am trying to add drawDisk to it, as seen below;howerver I keep getting an error saying that I have an…
TRod
  • 293
  • 2
  • 9
  • 19
3
votes
1 answer

Is it OK to use GLUTesselator in DirectX?

Related questions: 1, 2 In my OpenGL project I use GLUTesselator to split concave polygons (which comes from external source) to triangles, which are fed to OpenGL through VBO after that. Now I'm estimating adding DirectX back-end. I can use 3-rd…
Yury
  • 3,000
  • 2
  • 24
  • 24
3
votes
1 answer

Why glOrtho() works under Mac but gluOrtho2D() doesn't?

Several days ago I posted this question(I don't know if it's proper to open a new thread... however when I get the answer from this post I will close that one): QGLWidget not working correctly under Mac OS X Lion . I grabbed some example code…
wecing
  • 534
  • 1
  • 3
  • 19
3
votes
2 answers

OpenGL: GL_QUADS does not draw square

I'm trying to draw a square on the screen but it clearly draws a rectangle. This is my render code: glClear(GL_COLOR_BUFFER_BIT); glTranslatef(0,0,-0.1); glBegin(GL_QUADS); glVertex3f(0,0,0); glVertex3f(1,0,0); glVertex3f(1,1,0); …
Mertcan Ekiz
  • 691
  • 1
  • 9
  • 22
3
votes
1 answer

My gluSphere is Missing Patches

I'm trying to draw a sphere using gluSphere. The sphere appears but certain patches are missing whether I draw it as a filled polygons or a wire frame. int width=800, height=600; void myinit(void) { // set up overall light data, including…
Gabriel Ortega
  • 481
  • 5
  • 18
2
votes
2 answers

How to draw cubes instead quads?

The following code draws a labyrinth or maze in OpenGL, the result is a 2D labyrinth, what I need to do now is to draw cubes instead these quads, how can I do it? function drawmaze() { int x,y,dl; glNewList(dl=glGenLists(1),GL_COMPILE); …
CRISHK Corporation
  • 2,948
  • 6
  • 37
  • 52
2
votes
2 answers

What are the differences between gluProject and glhProject?

I don't know why the wiki of opengl.org says "gluProject" in title but in the code is "glhProject". Any differences?
jondinham
  • 8,271
  • 17
  • 80
  • 137
2
votes
4 answers

cmake doesn't link libGLU using QtOpenGL

I'm trying to compile a software that uses QtOpenGL, but I got a link error because -lGLU is not present. cmake is used. The only relevant line in CMakeLists.txt files seems to me find_package(Qt4 REQUIRED) The system is Linux 64bit, Debian…
rebli
  • 91
  • 2
  • 4
2
votes
1 answer

Calibrate coordinates on OpenGL?

I have a problem regarding the gluOrtho2D function. I want to resize the window size and calibrate its coordinates, but i have problems with the function. I think that the coordinates calculated The problem is that if i click somewhere on the…
Andrei Manolache
  • 766
  • 1
  • 8
  • 17
2
votes
1 answer

Rotate a gluCylinder() around specific axis?

I'm writing a function to draw a Cylinder that has the center of each base on a specific point, using the OpenGL pipeline commands and the gluCylinder() function. As a first attempt, I just tried to draw the cylinder, and the result was a cylinder…
F. Malato
  • 192
  • 2
  • 15
2
votes
1 answer

Calling gluPerspective and gluLookAt gives me an undefined reference?

I'm trying the following source, from Instant Glew: #include #include #include #include void initGraphics() { glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); const float lightPos[4] = {1, .5,…
Victoralm
  • 203
  • 3
  • 12
1 2
3
15 16