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
26
votes
6 answers

Error with GLUT compile in ubuntu

I try to compile some "hello world" glut application: #include #include #include #include GLint Width = 512, Height = 512; const int CubeSize = 200; void Display(void) { int left, right, top,…
G-71
  • 3,626
  • 12
  • 45
  • 69
20
votes
3 answers

Segmentation Fault before main() when using glut, and std::string?

On 64-bit Ubuntu 14.04 LTS, I am trying to compile a simple OpenGL program that uses glut. I am getting a Segmentation Fault (SIGSEV) before any line of code is executed in main; even on a very stripped down test program. What could cause this? My…
MikeMx7f
  • 927
  • 6
  • 13
18
votes
1 answer

Can I use glu with Android NDK

I can't seem to include glu.h in my Android NDK project. I'm trying to port existing C++ code to NDK, and it uses glu in a few places (notably gluErrorString). Does OpenGLES not have glu? Is there a port I can use? If not I can probably remove the…
DaedalusFall
  • 8,335
  • 6
  • 30
  • 43
17
votes
6 answers

Can I run GLU (OpenGL) on a headless server?

we're trying to use GLU's tesselation functions on a headless, GNU/linux server. We'd like to use PyOpenGL for that, but the problem is that it crashes on a call to gluNewTess (Segmentation fault) gdb backtrace says it's in glGetError, that makes me…
skrat
  • 5,518
  • 3
  • 32
  • 48
12
votes
1 answer

What is the algorithm behind the gluTess functions?

I'm asking this question out of curiosity, having first tried to implement such an algorithm before using GLU's for performance reasons. I've looked into common algorithms (Delaunay, Ear Clipping are often mentioned), but I can't seem to understand…
F.X.
  • 6,809
  • 3
  • 49
  • 71
10
votes
1 answer

How to draw connected strip lines in OpenGL like this

I want to draw a series of connected lines (GL_LINE_STRIP) in following way. I had tried to code by my own, but not get desired result, so i come here, help me to find out where i was wrong. here i am giving only my draw()…
user437641
  • 175
  • 2
  • 3
  • 10
8
votes
2 answers

gluProject Converting 3D coordinates to 2D coordinates does not convert the 2D Y Coordinate correctly

After two hours of googling (here, here, here, here, and here, and a ton others which I am not bothered to find), I thought I had finally learnt the theory of turning 3D coordinates to 2D coordinates. But it isn't working. The idea is to translate…
Joehot200
  • 1,070
  • 15
  • 44
7
votes
1 answer

GLU NURBS rendered wrongly

EDIT: This is a library bug. I reported it to the HOpenGL mail list. I use 9-point rectangular method to represent a circle/ellipse as a NURBS. The points are p1, p2, ..., p9, p9 = p1. They lay as shown: y2 | p2 p3 p4 y1 | p1 p5 y0 | p8 p7…
modular
  • 1,099
  • 9
  • 22
5
votes
2 answers

Meaning of knots when drawing a NURBS curve?

I'm using gluNurbsCurve to draw some curves with some control points. I've got the basic setup as described in the red book working correctly and I'm trying to expand on it. This sample looks like this: float knots[8] = {0,0,0,0,1,1,1,1}; float…
shoosh
  • 76,898
  • 55
  • 205
  • 325
5
votes
3 answers

OpenGL / GLU : Is there a built-in function for drawing circles?

I know that there are built-in functions for drawing rectangles (glRecti() for instance), and thought that a circle is also a pretty basic usage. Is there such a built-in function for drawing circles? Or should I always implement it myself?
SomethingSomething
  • 11,491
  • 17
  • 68
  • 126
5
votes
1 answer

Is the documentation for gluProject missing perspective division?

The OpenGL documentation for gluProject writes that the projection of point v is computed using the given projection and model-view matrix via v'' = P * M * v then window coordinates are derived using the current viewport, e.g. winZ = (v''(2) +…
Alec Jacobson
  • 6,032
  • 5
  • 51
  • 88
5
votes
1 answer

My window is sizing up in OpenGL

I want to make the size of my window (800,800), however the GL command glutInitWindowSize(800, 500); Isn't effecting my code in any way. Bellow is the source code in its entirety. #include #include #include #include…
Dr.Knowitall
  • 10,080
  • 23
  • 82
  • 133
5
votes
1 answer

OpenGL Near Clip Plane

I'm working on interactive scenes for a computer graphics course. I've set up a program which will generate color cubes, and let me rotate them with the keyboard. However they're getting cut open by the near clip plane of my camera: I've tried to…
Nick
  • 6,900
  • 5
  • 45
  • 66
5
votes
1 answer

OpenGL - Explain glutInitDisplayMode()

Explain in detail what functionality is provided by the settings in the line: glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH); so far i know that this line will initialize the display mode by requesting a double buffere setting, setting a…
Tacit
  • 890
  • 6
  • 17
  • 42
4
votes
2 answers

gluCylinder() and texture coordinates offset / multiplier?

How can i set the texture coordinate offset and multiplier for the gluCylinder() and gluDisk() etc. functions? So if normally the texture would start at point 0, i would like to set it start at point 0.6 or 3.2 etc. by multiplier i mean the texture…
Rookie
  • 3,753
  • 5
  • 33
  • 33
1
2 3
15 16