Questions tagged [opengl-compat]

This tag is for questions about the Compatibility profile of desktop OpenGL. Questions using fixed-function, immediate-mode rendering, texture environment fragment processing, and other features removed from core OpenGL in 3.2.

Related to drawing by glBegin/glEnd sequences, the fixed function matrix stack and Blinn-Phong per vertex (Gouraud) light model.

338 questions
0
votes
1 answer

Rotate a square in OpenGl

I am trying to draw a square with a line in between. So essentially it is two triangles with different colors combined to form a square. How would I go about rotating this square by 90 degrees? void Square(float xPos, float yPos, float length){ …
Rumi
  • 196
  • 7
0
votes
1 answer

How to rotate the camera view around a point in OpenGL with gluLookAt

I’m trying to use the gluLookAt function to set up the correct view transformation for the camera’s position and orientation. In my program there is a sphere centered in the origin and when the arrows key are pressed the camera moves according…
user11387363
0
votes
1 answer

OpenGL gluLookAt

I tried to draw a teapot and view it in 3D but when I ran the program, nothing showed up. There is nothing in the window. I know it has something to do with my gluLookAt() function but I am not sure how to fix it. // helloteapot.cc //#include…
0
votes
0 answers

How do I translate this polygon in opengl using fps animator?

I'm trying to write a code where my polygon moves from left to right ends of my screen. The main issue I shared is that I'm not able to translate this using fps animator This is my polygon code: private void drawface(GL2 gl) { …
0
votes
1 answer

C# How to get the size of an object generated in OpenGL from Tao library

I'm building an app that can show 3D view of STL files in a SimpleOpenGlControl using TAO.FreeGlut and TAO.OpenGL referencies. I need to get the size of the displayed 3D model for some feature but can't find it. How can I get the size of the…
Eric Brochu
  • 109
  • 6
0
votes
0 answers

presenting Textures Projections from multiple angels with PyOpenGL

i'm quite new to OpenGL. i have my hands on camera calibration (Translate (X,Y,Z),Rotation (X,Y,Z), Focal Length) and i have the images from each camera. Also, i have a 3d model (obj) i managed to construct into my openGL project, and a point cloud…
Bob Sfog
  • 105
  • 8
0
votes
0 answers

Is there any function increase line in openGl

I want to create a line at (0,0)(1,0), then create (0,0)(2,0), then 3, 4,... up to 10, then again back (9,0)....(1,0). Is there any way how to do this? void DrawLine(int a) { glBegin(GL_LINES);{ glVertex3f(a,0,0); …
mahbub
  • 1
  • 1
0
votes
1 answer

Why the quads do not render?

Im using PyOpenGL with PyQt5 widgets. In my OpenGL widget I have the following code: class Renderizador(QOpenGLWidget): def __init__(self, parent=None): super().__init__(parent) self._x = -0.1 self._y = -0.1 …
Jaime02
  • 299
  • 7
  • 21
0
votes
1 answer

Can I use glScale on GL_POINTS?

I am programming a GUI framework in lwjgl (opengl for java). I've recently implemented rounded rectangles by rendering a couple of normal rectangles surrounded by circles. To render the circles I used GL11.GL_POINTS. I now reached the point, where I…
DraxCode
  • 43
  • 5
0
votes
2 answers

OpenGL appears to be using (far too aggressive) frustum culling which I can't see how to modify

I'm trying to get an OpenGL application working in c++. OpenGL appears to be culling far & near objects. The screenshot should be a load of square tiles but the squares that are a certain distance too close or too far from the camera are not…
0
votes
0 answers

Is immediate mode OpenGL guaranteed to work on modern hardware, even though it's deprecated?

I'm maintaining a legacy application which uses OpenGL for rendering. The application works well on each workstation even though it relies on the deprecated immediate mode. However, should the workstations' hardware be replaced with modern…
sklopec
  • 63
  • 3
0
votes
1 answer

How to save the current view matrix using pyglet

I am using pyglet and want to have a function that can draw a color to the background of the scene. I am currently just drawing a rectangle to the screen that goes from the bottom left to the top right. This works great until I start applying…
Jmonsky
  • 1,519
  • 1
  • 9
  • 16
0
votes
1 answer

Overlapping lines with OpenGl

I have two lines that cross each other and I have set the opacity for these lines to 0.7. Here's the code: glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glLineWidth(7); glBegin(GL_LINES); glColor4f(0.9, 0.3, 0.4,…
Jhon
  • 99
  • 3
  • 15
0
votes
1 answer

How to use Texture Units (they don't appear to be working)

I'm trying to combine two textures using the colour of one and the alpha of another, to do this I'm using the glTexEnvf() to combine the two aspects of the textures after storing them in different texture units. But it's not working and I believe it…
0
votes
0 answers

Difference between glColor3f and glColor3d

The code I'm working on, in a nutshell, uses OpenGL to represent data (stored as double) as the colour of some geometry. Using the default colour shading between vertices it then samples back the colour over the geometry to see the values at…
pavichokche
  • 91
  • 1
  • 8