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

gluProject() setup in OpenGL VC++ beginner

I'm trying to convert 3D to 2D coordinates. and I understand I need to use gluProject(). But I'm facing troubles setting it up. I need to use Pixel coordinates I need help in InitGL() how can I properly initialize it. also in DrawGLScene() how can…
Peace Walker
  • 1
  • 1
  • 1
0
votes
1 answer

No OpenGL context current on this thread at javax.media.opengl.glu.GLU.getCurrentGL

I encountered a similar problem when I started learning Opengl (JOGL) for the "GL2 gl" months ago.... and then I discovered how to solve (everything having something to do with "gl" should be called from within the display/init method). After some…
elect
  • 6,765
  • 10
  • 53
  • 119
0
votes
1 answer

3d ray picking accuracy

I've implemented 3d ray picking and have some problems with accuracy. When picking at the bottom or center of the screen - everything works perfect, but at the top of the screen coordinates seem to move a bit away. So when i pick object near the top…
0
votes
2 answers

View the inside of a cylinder

If I draw a gluCylinder with a gluDisk on top. Without culling enabled, I get the desired cylinder with lid effect. However, if I enable culling, the disk (aka lid) disappears. Why is that? This is the main question. In addition, with culling…
Sardathrion - against SE abuse
  • 17,269
  • 27
  • 101
  • 156
0
votes
2 answers

OpenGL matrix not rotating properly

Alright, so I got this code for gluLookAt: lookAt = new Vector3f(-player.pos.x, -player.pos.y, -player.pos.z); lookAt.x += (float)Math.cos(Math.toRadians(player.yaw)) * Math.cos(Math.toRadians(player.pitch)); lookAt.y +=…
CyanPrime
  • 5,096
  • 12
  • 58
  • 79
0
votes
1 answer

No-top and fill gluCylinder()

Well, i have my issues with gluCylinder(), it's not letting me do the things. What i'm trying to do is to give no-top to the cylinder and fill it inside. void GLWindow::paintGL() { glClear(GL_COLOR_BUFFER_BIT); glColor3f(1,0,0); …
Blastcore
  • 360
  • 7
  • 19
0
votes
2 answers

How to get a Ray from 'gluUnProject'

my basic question is - what is the proper way to use 'gluUnProject' to get a Ray or normal vector from my mouse/cursor position. I have converted the 'gluUnProject' code to C# from the mesa glu C code. public Vector3 UnProject(Matrix4…
zezba9000
  • 3,247
  • 1
  • 29
  • 51
-1
votes
1 answer

OpenGL object distortion in perspective view

Do you guys have any idea what is the cause of this problem? It looks fine in orthographic view. Orthographic View: Perspective View: Code that might be related: //Global variable float tx = 0, tz = 0, tSpeed = 1.0; bool isOrtho = true; …
Chin
  • 97
  • 2
  • 9
-1
votes
2 answers

glColor3f not working on gluSphere

I am currently rendering a solar system of planets in my 3d space but every single planet is black even when light hits the sphere. The spheres are rendered last in my render function. Had the colors working when the spheres were being rendered on…
Kingpin
  • 85
  • 8
-1
votes
1 answer

How do I make my object transparent but still show the texture?

I'm trying to render a model in OpenGL. I'm on Day 4 of C++ and OpenGL (Yes, I have learned this quickly) and I'm at a bit of a stop with textures. I'm having a bit of trouble making my texture alpha work. In this image, I have this character from…
-1
votes
1 answer

glutesselator always crashes at gluTessEndPolygon()

I use glu tessellation to tessellate complex polygons. The code simplified is listed bellow. It always crashes at gluTessEndPolygon(GLUtessobj) with error: Error: 0xC0000005: Access violation reading location 0x57783b39; The code works when the…
Shaobo Zi
  • 709
  • 1
  • 10
  • 25
-1
votes
1 answer

OpenGL + GLU + C++ not drawing anything

I'm really pulling my hair out with this problem. I'm trying to create a simple game where the player rolls a ball around a playing area. I'm using WinAPI for window management and input handling. I tried to render some simple quads too, instead of…
mkkekkonen
  • 1,704
  • 2
  • 18
  • 35
-1
votes
1 answer

OpenGL gluUnProject find wrong coordinate

gluUnProject find wrong coordinates. I have greed drawing on black background with cell dimension 1x1. I try to detect click in cells and I getting wrong coordinates (not 1 - 1). I know that is OpenGL 1.1 old, bud I must use it. I don't good with…
nekicneko99
  • 3
  • 1
  • 6
-1
votes
2 answers

Terrain flickers through water | Depth buffer precision issue?

I have an issue with the water in my terrain, which is currently just a quad with a transparent blue colour. When close up to it, it looks like this: As you can see, it's simple enough - A flat transparent quad representing water. However, when I…
Joehot200
  • 1,070
  • 15
  • 44
-1
votes
1 answer

Linking openGL,GLU and GLUT libraries to VisualC++

Following exactly the steps mentioned here I get 243 errors?! what's happening? Error 1 error C2144: syntax error : 'void' should be preceded by ';' c:\program files (x86)\microsoft sdks\windows\v7.0a\include\gl\gl.h 1152 Win32OpenGL…
Sepideh Abadpour
  • 2,550
  • 10
  • 52
  • 88
1 2 3
15
16