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
0
votes
1 answer

gluUnproject model-view matrix

I am porting GLU gluUnproject method to the modern OpenGL.I generally understand the algorithm behind it, but my question is why do we need model-view matrix?Can it be just view matrix?We unproject screen coordinates into the world space, so why do…
Michael IV
  • 11,016
  • 12
  • 92
  • 223
0
votes
3 answers

(each call to glTranslate is cumulative on the modelview matrix) what does it mean and how to disable this feature?

Studying the book OpenGL SuperBible fram Addison-Wesley, I read: each call to glTranslate is cumulative on the modelview matrix what does it mean? Does it mean that for example this code: glTranslatef(2.0,3.0,0); glTranslatef(4.0,5.0,0); first…
Sepideh Abadpour
  • 2,550
  • 10
  • 52
  • 88
0
votes
1 answer

3D to 2D Objects in Android's Open GL not rendering because of culling

In an attempt to use the same object in both the 3D world and 2D world of Android's OpenGL, I am unable to render the same object in both GLU perspectives. For example, when I perform the following command: GLU.gluPerspective(gl,…
Matthew
  • 3,886
  • 7
  • 47
  • 84
0
votes
1 answer

My GLKMathUnproject always returns the geometry that's center-screen

I'm trying to use GLKMathUnproject() to translate screen coordinates to geometry, but my routine always returns whatever geometry is in the center of the screen. My unproject code looks like this: + (GLKVector3) gluUnproject: (GLKVector3)…
Olie
  • 24,597
  • 18
  • 99
  • 131
0
votes
1 answer

Rendering smooth spheres and cylinder with gluSphere() and gluCylinder()

I am using OpenGL with C++ (but without shaders and GLSL) and drawing spheres (the pool ball) and cylinders (the cue stick) using the glu library functions to draw them. I am using glBindTexture() to bind the texture and loading the texture using…
viraj
  • 1,784
  • 4
  • 35
  • 52
0
votes
1 answer

Need help on how to make a sphere gradient on a gluSphere

Hello I've been trying to find out information on how i can add a gradient from the top of the sphere to the bottom. Is it possible or do i have to texture the sphere? Sphere sphere = new Sphere(); sphere.setOrientation(GLU.GLU_OUTSIDE); …
0
votes
1 answer

glPushMatrix Deprecated, GL30-GL43 Solution? Basic Box example

I'm working on a Program to Render a basic box, but through googling, I have not found a solution for Drawing a face(or group of faces) on screen. Currently every tutorial I've found uses glPushMatrix/glBegin/glEnd/glPopMatrix like…
Snowdrama
  • 405
  • 1
  • 6
  • 17
0
votes
1 answer

is GLUquadricObj reusable within a single call of gluNewQuadric and gluDeleteQuadric?

I just read from question #6663300 that glut functions are not proper and I should use glu drawing primitives instead of glut ones. so I have some qustions about how GLUquadricObj should be used. Everywhere I go, GLUquadricObj is usually used as a…
TopTierTracker
  • 487
  • 1
  • 6
  • 10
0
votes
1 answer

Glu.unproject always return me zero

I am using Jogl2 (more precisely 2.0-b58-20120620) and Java7 (9th revision). I want to do some picking : I have a frame with 3 colored cubes (perspective projection). So I am trying to build a ray from the mouse click location : but when I call…
loloof64
  • 5,252
  • 12
  • 41
  • 78
0
votes
1 answer

Finding Points on a NURB using OpenGL and GLU

I am attempting to draw a shape by revolving a NURB around an axis to generate the points using OpenGL. I am able to render a NURB using gluNurbsCurve, but I would like to find the interpolated points along the NURB to use in the rotation. I have…
Adam
  • 982
  • 7
  • 16
0
votes
1 answer

Where can I find source code of gluCylinder() and the functions it calls?

I need the source code of gluCylinder() and the function it calls so I can alter them. Can anyone point me to the right direction?
John Demetriou
  • 4,093
  • 6
  • 52
  • 88
0
votes
1 answer

simplifying texture and corner coordinates 'openGL

this is the coordinates part of my dice (a cube covered by a dice texture). I've seen in some codes it is possible to omit the common coordinates which are pointing to same position ? any way I do it my shape gets disordered! how can I simplify it…
Amir-Mousavi
  • 4,273
  • 12
  • 70
  • 123
0
votes
1 answer

How to substract a polygon with GLUtesselator?

I'm trying to make union from the polygons in this way: You can see the direction from arrows: clockwise for holes and counterclockwise for solids. But as the result shows, it doesn't work. I tried with all GLU_TESS_WINDING_RULE combinations but…
Rookie
  • 4,064
  • 6
  • 54
  • 86
0
votes
1 answer

NURBS surfaces in OpenGL 3.2 core profile

Is it possible to draw NURBS (Non-uniform rational B-spline) surfaces in OpenGL 3.2 core profile? I assume that the NURBS rendering using GLU library does not support the core profile. Is there any open source libraries that implement the same…
Mortennobel
  • 3,383
  • 4
  • 29
  • 46
0
votes
1 answer

Random GLU error 100155: tesselation coordinate too large

I have an OpenGL program (C#, using PInvokes to opengl32.dll and glu32.dll) that draws a rectangle using tessellation (I know I don't have too, this is for testing purposes) at 60 FPS. Every now and then the drawing "flickers" and an error appears…
Itai Bar-Haim
  • 1,686
  • 16
  • 40