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

Undefined reference 'gluOrtho2d' error in opengl using with c

Undefined reference 'gluOrtho2d' error in opengl using with c The above error comes when the following code is executed in C. #include #include #include #include #include void display() { …
0
votes
1 answer

Undefined reference to gluPerspective() when building GLUT project with CMake?

I am currently working on rendering 3D objects using the GLUT utilities in OpenGL. I am doing this on a Linux operating system, and are using CMake to compile the code. Every time I go to compile the code I get an 'undefined reference' error, but…
0
votes
1 answer

Object not being fulfilled with material

I am starting to write code for materials in my class project, this is what i have as a initial test: glEnable(GL_COLOR_MATERIAL); glMaterialfv(GL_FRONT_AND_BACK,GL_AMBIENT,_selected_object->material.ambient); …
martqqqqq
  • 13
  • 3
0
votes
1 answer

gluCylinder() doesn't draw the base and top

With OpenGL, I am trying to draw an arrow with cylinders(one cylinder and one cone). I used the gluCylinder() to draw a cylinder or cone. But the base and top of the cylinder is not visible. Can anyone tell me why? Below is the code I used. const…
jie chen
  • 23
  • 3
0
votes
1 answer

How do I draw unrounded pixels in OpenGL?

I'm trying to draw square pixels using GL_POINTS but the pixels are rounded. I've tried using glDisable(GL_POINT_SMOOTH) but it doesn't seem to change anything. Here's my code: glDisable(GL_POINT_SMOOTH); glPointSize(8); glBegin(GL_POINTS);…
Ziggy
  • 1
  • 2
0
votes
1 answer

Resizing makes the window's content become thinner on each loop

I was trying to fix an issue where the window stretched out the content, and I finished fixing that. But after trying it out, it works halfway through only. Here are some images and below is the explanation of the problem: Image A: (when the app…
davidlao
  • 81
  • 1
  • 5
0
votes
1 answer

OpenGL black screen(GL_PERSPECTIVE, GL_MODELVIEW problem)

I'm trying to move the perspective view, so I can see that the sun, earth, and moon is moving around on a screen. I'm keep searching and trying to fix this but there's nothing on a screen. I really need help to fix this... #include…
olbloe
  • 1
  • 2
0
votes
2 answers

iPhone4 OpenGL ES GLuProject returning wrong y-coordinate

I have a baffling problem with an iPhone 4 OpenGL ES app that I have been trying to tackle on and off for a couple of months now and have hit a dead end despite some really useful and tantalising tips and suggestions on this site. I am writing a 3d…
Braunius
  • 95
  • 1
  • 11
0
votes
1 answer

How do I assign Multiple Display List IDs to GLU Modeling in OpenGL?

I am curious about how OpenGL assigns Multiple Display List IDs. Currently I have: void MyCreateList() { MyListID = glGenLists(1); glNewList(MyListID, GL_COMPILE); //gluSphere(qobj, 1.0, 20, 20); //Sphere …
H.M
  • 3
  • 1
0
votes
0 answers

Clang++ cannot find GL/glu.h, but g++ (mingw-w64) works correctly

I am making a OpenGL wrapper in C++ and modern OpenGL. So in my main header I have the following includes #define GLFW_INCLUDE_GLU #ifdef _WIN32 #define GLFW_DLL #endif #include #include And compile with this command…
0
votes
1 answer

OpenGL glulookat function

I want to be able to view a planet sphere centred 0,0,0 with 10 units radius, 360 degrees and up down by clicking my keyboard buttons. What parameters do I put inside the glulookat() function as? I know the Center XYZ should be 000 but what should…
0
votes
1 answer

How to solve Code: :Blocks OpenGL problem

I'm using Code: :Blocks for running OpenGL projects and codes. To cut to the chase, I tried to move the file glut32.dll to the directory C:\Windows\System32 and it was Successfully copied and pasted, but whenever I try to search for the file it…
user10252822
0
votes
1 answer

glutSolidSphere lighting issue when further away

For some reason I get weird patchy lighting effects/flickering when using glutSolidSphere and the camera is relatively far away from the object. See below: This also happens with glutSolidCube and I assume the others as well. I've tried everything…
kmecpp
  • 2,371
  • 1
  • 23
  • 38
0
votes
0 answers

How to move the "camera" on mouse drag in OpenGL where the "camera" is always aiming at the object?

Im new to OpenGL and GL,GLU,GLUT seems to be deprecated for a long time but there is an homework assignment and im figuring out how to move the camera to different angles but the camera will always be pointing at the object. I've searched through…
AhChing11
  • 125
  • 1
  • 3
  • 15
0
votes
1 answer

How to prevent scaling lower than defined (OpenGL)

I have a simple OpenGL object which has defined certain glScalef size. It needs glutMouseFunc to make it work as I imagined. So, this is what I've imagined: On GLUT_LEFT_BUTTON object needs to go bigger for 0.1,…
Wolfhrat
  • 11
  • 5