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
1
vote
1 answer

C++ OpenGL: Calling gluPerspective throws an undefined reference error?

I am using FreeGLUT to try and create my first cube in C++ with OpenGL. I have an issue that whenever I call "gluPerspective", the compiler throws this error: build/Debug/MinGW-Windows/main.o: In function `main': C:\Users\User\Dropbox\NetBeans…
CoderTheTyler
  • 839
  • 2
  • 11
  • 30
1
vote
2 answers

opengl function which displays in a key callback function

I'm using openGL using GLUT. I'm making my own header file with some functions. One of them is a rectangle where you can enter digits and save them. the problem here is that the if I want to know wich key is pressed, I need to put the function in de…
abcdef
  • 236
  • 1
  • 5
  • 17
1
vote
1 answer

gluUnProject returns an inaccurate z coordinate under some conditions

I am getting some troubles with gluUnProject because I am retrieving an inaccurate Z coordinate. The program involved is essentially a 3d viewer. I implemented a little function the allows the user to click on the loaded model and retrieve the…
elect
  • 6,765
  • 10
  • 53
  • 119
1
vote
1 answer

unresolved external symbol _gluLookAt@72 referenced in function

I'm making a program using the glu library but when i compile i got this error: 1>opengl_3.obj : error LNK2019: unresolved external symbol _gluLookAt@72 referenced in function "public: void __thiscall OpenGLContext::setupScene(void)"…
user1854186
  • 19
  • 1
  • 5
1
vote
1 answer

gluUnProject not working

I am trying to use gluUnProject to get my mouse coordinates into world coordinates, however it seems to not be working, or I am just misunderstanding the functionality of the glUnProject function, here is the code I am working with, my matrices all…
user1294021
  • 322
  • 3
  • 11
1
vote
3 answers

Cylinder is not being displayed on screen

Well, what i'm trying to do is to draw a Cylinder using GLUquadricObj and gluCylinder, the code compiles fine whatever the Cylinder is not being displayed on the OpenGL widget. void GLWindow::paintGL() { glClear(GL_COLOR_BUFFER_BIT); …
Blastcore
  • 360
  • 7
  • 19
1
vote
2 answers

gluLookAt eyeZ not working as excpected

I'm having some trouble with the eyeZ value of gluLookAt. The way I'd imagine it to work is like moving a camera further away, thus shrinking the object in your field of view. I have a simple setup with a simple shape in 3d space draw via…
SpaceFace
  • 1,492
  • 3
  • 15
  • 29
0
votes
1 answer

android OpenGL-Es gluProject results not accurate?

I want to overlay an icon on top of 3D models in my game. I'm using gluProject to get the screen coordinates of the centre point of the models, and then using that data to draw icons on a custom view: In my renderer class: private void…
James Coote
  • 1,975
  • 19
  • 29
0
votes
1 answer

using glulookat to rotate the camera

I need to find a way to rotate the camera in its own axis using glulookat. I need to calculate the up vector for this. Assuming the up = {0,1,0} intially. I need to rotate this vector by angle ax,ay,az and find the resulting vector to use in…
suresh
  • 4,084
  • 10
  • 44
  • 59
0
votes
1 answer

OpenGL using gluLookat()

I need help with gluLookAt(). I'm trying to use it after my call to glOrtho() (which I believe is correct) in an attempt to make a view down the z axis from a slightly elevated view on the y axis. From what I understand of gluLookAt() the first…
user969416
0
votes
1 answer

OpentTK + Glu.UnProject() on various z values doesn't give overlapping points

I am using OpenTK in C# and I have been hitting a wall for the last few hours. I'm trying to use Glu.UnProject() to create a ray through the universe where the user clicked. The ray it traces should be invisible to the user since it a line…
Kevin Coulombe
  • 1,517
  • 1
  • 17
  • 35
0
votes
1 answer

I have written a CAD program in JOGL that works great until I put in a glu quadric, then the lighting is off

I wrote CAD software (Protocase Designer) and it was working great. Except on ATI cards where it crashes all the time. On the theory that display lists are deprecated and maybe ATI cards don't fully support them I decided to replace the display…
vextorspace
  • 934
  • 2
  • 10
  • 25
0
votes
1 answer

texture does not map the whole nurbs surface

glGenTextures(1, &texName[0]); glBindTexture(GL_TEXTURE_2D, texName[0]); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,…
Sean
  • 4,267
  • 10
  • 36
  • 50
0
votes
1 answer

the nurbs surface does not show up in openGL

GLUnurbsObj *theNurb; theNurb = gluNewNurbsRenderer(); gluNurbsProperty(theNurb, GLU_SAMPLING_TOLERANCE, 5.0); gluNurbsProperty(theNurb, GLU_DISPLAY_MODE, GLU_FILL); //ctrPoint[] is an array containing the coordinate x,y,z of a grid size of 15*15.…
Sean
  • 4,267
  • 10
  • 36
  • 50
0
votes
1 answer

Rotating (moving) a fixed "crank handle" in OpenGL

Okay, Ive got a cog (toothed gear) that I have drawn in opengl. I have a cylinder attached to one side of it thats supposed to model a handle (Basically, im making a simulation of a hand-cranked drill). Now when i rotate the cog (working), I want…
James Bennet
  • 603
  • 2
  • 10
  • 22