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
0 answers

Texture a Sphere in OpenGL

I'm not sure how to texture a sphere in OpenGL without using external image loading libraries. Is this possible? My sphere is as follows: glPushMatrix(); GLUquadricObj *qObj = gluNewQuadric(); gluQuadricNormals(qObj, GLU_SMOOTH); …
DCo
  • 69
  • 2
  • 10
0
votes
0 answers

OpenGL codeblocks compilation issue win7

I am trying to configure OpenGL im my code::blocks. 64-bit Windows 7, Code::Blocks v. 13.12 Tried to compile simple code: #include void Draw() { glClear(GL_COLOR_BUFFER_BIT); glColor3f(1.0, 1.0, 1.0); glBegin(GL_LINES); …
Karmel
  • 115
  • 3
  • 10
0
votes
1 answer

Sphere is not visible with glutSolidSphere()

Below is my code to display solid sphere. I've used ModelMatrix to display. But I'm unable to see the solid. Should anything like projection to be added. But I've no need for projections currently. #include #include
Sam
  • 335
  • 1
  • 6
  • 13
0
votes
2 answers

How do I create different projections in OpenGL without using gluPerspective and glOrtho?

I need to draw a scene in OpenGL that can be viewed in different projections. So far I've been using gluPerspective and glOrtho to create different projections, but now I need to do it without using these functions. Is there even a way to do this?
Ahmis
  • 43
  • 6
0
votes
1 answer

How to convert glRotatef() to multiplication matrice for glMultMatrixd()

I need to perform some operations with different openGL functions. There for I have a cube initialized as glList. What I'm doing is some transformation with glu standard functions and I like to do exactly the same operations with matrix…
Karl Adler
  • 15,780
  • 10
  • 70
  • 88
0
votes
1 answer

gluCylinder with rotated texture

I want to draw a cylinder using gluQuadric and gluCylinder. This cylinder shall be textured. My draw code is the following: pTexture->Enable(); pTexture->Bind(); glPushMatrix(); glRotatef(-90.0f, 1.0f, 0.0f, 0.0f); gluQuadricOrientation(quadric,…
Dragonseel
  • 137
  • 1
  • 11
0
votes
1 answer

Half cylinder/Closed cylinder in opengl

I currently have a cylinder glPushMatrix(); glTranslatef(cylinder->pos[0], cylinder->pos[1], cylinder->pos[2]); glRotatef(cylinder->angle, -1.0, 0, 0); gluDisk(quad, 0.0, cylinder->radius, 300, 90); gluCylinder(quad, cylinder->radius,…
user1390754
  • 171
  • 1
  • 1
  • 10
0
votes
0 answers

sphere drawing algorithm python

The below given code is an algorithm to draw sphere in opengl without using glutsphere.The arguments are same as glutsphere(). But I am unable to understand this code. can anyone please explain me this code. How is it working and drawing…
0
votes
0 answers

GLU.gluUnProject returns all NaNs in Java LWJGL

public Vector3f getClickPos(int x, int y) { IntBuffer viewport = BufferUtils.createIntBuffer(16); FloatBuffer modelview = BufferUtils.createFloatBuffer(16); FloatBuffer projection = BufferUtils.createFloatBuffer(16); float winX,…
Inqy
  • 125
  • 1
  • 8
0
votes
2 answers

unable to render sphere without using gluSphere()

I am trying to render a sphere without using the gluSphere() function. But this code is not rendering any sphere. I am unable to find out exactly where the error lies. import sys import math from OpenGL.GL import * from OpenGL.GLU import * from…
0
votes
1 answer

Cannot find any GLU documentation

I cannot find in Internet any links to "official" GLU downloads or documentation. The links about GLU on opengl.org are defunct. The only GLU API documentation that I found is on MSDN about windows version of GLU. Is there such page as "official"…
Al Berger
  • 1,048
  • 14
  • 35
0
votes
2 answers

Loading GLUquadric objects as a text file into opengl windows form

I have Created an OpenGL view on a Windows Form as on this and successfully embedded opengl into visual c++ windows form.Accordingly I have 2 files - rendering.h and opengl.h Here's my original code.... Well then I extended my "OpenGL View on…
Venkat
  • 1
  • 2
0
votes
1 answer

Make a camera point at a target

I'm trying to point a camera to a plane I have with a texture. I'm using gluPerspective and glLookAt and this only happens when a variable is set to 1. When the variable is set to 1 I change my view: glMatrixMode(GL_PROJECTION); …
user2466704
  • 23
  • 2
  • 8
0
votes
1 answer

OpenGL calculating Normal of a custom shape

i have a shape with the following vertexes and faces: static Vec3f cubeVerts[24] = { { -0.5, 0.5, -0.5 }, /* backside */ { -0.5, -0.5, -0.5 }, { -0.3, 4.0, -0.5 }, { -0.3, 3.0, -0.5 }, { -0.1, 5.5, -0.5 }, { -0.1, 4.5, -0.5 }, { 0.1, …
Mindless
  • 2,352
  • 3
  • 27
  • 51
0
votes
1 answer

Glusphere giving strange lighting

When working with glut, i used glutsolidsphere to draw my spheres, but having moved to glfw, i had to use glusphere. I basically copied the entire function "glutsolidsphere" to my own code, but am getting a strange lighting problem where before i…
DuskFall
  • 422
  • 2
  • 14