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
3
votes
1 answer

confusion about glPerspective and GL_POLYGON

I am confused about how glPerspective works. I know in theory what it does but I am confused about it when trying to use it. Here is my code (I used Pygame to create the window): import pygame, sys from OpenGL.GL import * from OpenGL.GLU import…
Another_coder
  • 728
  • 1
  • 9
  • 23
3
votes
1 answer

OpenGL python and pygame translation after rotation not working for mouselook and movement

I'm trying to make a simple mouse look with standard arrow key movement, and I've got the mouselook working but the translations from the rotated points seem to move along an orthogonal basis, but not one that is aligned with the rotation of the…
3
votes
1 answer

How to rotate a cube using mouse in pyopengl

I know what the problem is but i cannot figure out a solution. The problem is that the rotation is applied with the axis fixed on the cube so that if you turn one axis Pi radians then the other axis will look like the mouse controls are inverted. I…
3
votes
1 answer

legacy opengl - rendering cube map layout, understanding glTexCoord3f parameters

I would like to render a cube map layout (orthographic projection) - something like this. Let's focus on the +X face (right on the picture). The code which renders +X face looks this way: glBegin(GL_QUADS); glTexCoord3f(1, 1,…
Irbis
  • 1,432
  • 1
  • 13
  • 39
3
votes
1 answer

Does glRotatef rotate the normal directions as well?

I'm trying to rotate a specific object in space with glRotatef. I'm not exactly sure how it works under the hood so I'm not sure if the normal vectors I've set for the vertices of the object will be rotated along with the vertex coordinates. I just…
myopunk
  • 55
  • 4
3
votes
1 answer

Problems with creating a UI and glRotatef()

I am making a minimal Doom-style FPS game engine using Python, PyGame and Legacy PyOpenGL. I hope that the player will be able to look around in four directions - forward, backwards, left and right - using glRotatef() by pressing the left and right…
3
votes
1 answer

Drawing a Cog which rotates around the Y axis in OpenGL

As stated in the title: I want to create a 3D cog with 10 teeth which rotates around its center (like a cog does). The cog has square teeth and, for the sake of simplicity, has flat sides between the teeth - no curves on this cog. Visualization of…
R. Rengold
  • 193
  • 13
3
votes
1 answer

Can't correctly reshape polygons in the window

I'm trying to develop a program in which every time a click is performed on the window, a random-size circle appears on the window centered on where the click happened. After that, I need to use glOrtho() or gluOrtho2D() so that the viewing volume…
user11387363
3
votes
1 answer

Why can't Pyglet draw a polygon correctly?

I'm randomly creating points to use to draw a polygon with Pyglet. But Pyglet doesn't do the job right most of the time. Well I tried drawing a polygon with another graphic module and actually it worked but if Pyglet was working alright it would…
Adenzu
  • 65
  • 8
3
votes
1 answer

OpenGL B-Spline with weight isn`t rendered correctly

I'm working on a project with B-Splines in OpenGL. The B-Spline itself works as far as I can say but I also want to add some weight to my control-points in a range of 1-10 in order to have the spline go closer to points with higher weight. The…
3
votes
0 answers

OpenGL projects crashing

Screenshot This code compiles without errors or warning, but it can't run it, application crashing instantly. #include int WinWidth = 640, WinHeight = 480; int WinFar = 10; void DrawPoint(float x, float y) { glColor3f(1.0, 1.0,…
3
votes
1 answer

Drawing a thick line with legacy OpenGL (immediate mode) in C++

i wanted to create a line that is thick using OpenGL library in c++ but it is not working. i tried this code: glBegin(GL_LINES); glLineWidth(3); glVertex2f(-0.7f, -1.0f); glVertex2f(-0.7f, 1.0f); glEnd(); is there something wrong here?
Jhon
  • 99
  • 3
  • 15
3
votes
2 answers

Cannot draw to the same position using gluSphere()?

I am making a game using PyOpenGL. I want to have bullets shot from a place every 4 seconds, but when I used gluSphere() to draw the bullet it doesn't appear to the place I excepted (except the first time of drawing the sphere). How can I solve…
Noah
  • 445
  • 4
  • 19
3
votes
1 answer

is there a way to render points faster OpenGL

i need to visualize around 50k-60k points in openGL i managed to print them all but when i use rotate it takes so much time between each rotation because it just prints all the data every single frame. is there a way to print all the data once and…
Bob Sfog
  • 105
  • 8
3
votes
1 answer

How to correctly add a light to make object get a better view with pygame and pyopengl

I am following the tutorial available in https://pythonprogramming.net/opengl-pyopengl-python-pygame-tutorial/ where he teachs how to render a cube with pyOpenGL an pygame. When rendering the cube, the tutorial set color to all the vertices of the…
underfloor
  • 301
  • 3
  • 12
1
2
3
22 23