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

OpenGL render view without a visible window in python

I need to render some scene. I managed to do it in python using pyopengl and pygame. The problem is that it creates a window for a short period of time. I want to render the same image and save it, without creating a visible window (Or possibly…
user972014
  • 3,296
  • 6
  • 49
  • 89
9
votes
2 answers

Not understanding the gluOrtho2D function

I am not able to what gluOrtho2D() function is doing? Is it fixing the origin at some particular point on the OpenGL window or something else? This is because gluOrtho2D(1,1,1,1) fixes the origin at the middle of the window. If it is not fixing the…
asn
  • 2,408
  • 5
  • 23
  • 37
8
votes
1 answer

Concave GL_POLYGON doesn't color in?

I have a problem when I try to use GL_POLYGON in OpenGL. I don't know how to explain this but all my vertices are connected with the beginning one. The problem happens when I try to color the object. I want to draw a simple object. void TOP (float…
user1924127
6
votes
1 answer

Draw a polygon in OpenGL GLUT with mouse

i want to draw a polygon in openGL Glut with mouse interaction, every left click that will be made will be a vertex and a line will be drawn between every vertex. when the right mouse will be clicked the polygon will close drawing a line from the…
leo_bouts
  • 329
  • 2
  • 17
5
votes
1 answer

How to blit a png image as an image overlay in PyOpenGL?

I am making a game in PyOpenGL and want to blit some images onto the screen as some overlay (for example, the pause button). How can I do that? I've tried using glBitmap(), but it doesn't work. This is what I have: pauseimg = pygame.image.load(path…
Noah
  • 445
  • 4
  • 19
5
votes
1 answer

How create a camera on PyOpenGL that can do "perspective rotations" on mouse movements?

I am creating a first-person view RPG and I want to rotate the camera in PyOpenGL when I move the mouse (just like some other games like Minecraft). What function can I use to do this and how? I tried to use gluLookAt() but I don't understand how it…
Noah
  • 445
  • 4
  • 19
5
votes
3 answers

OpenGL overlapping ugly rendering

I'm trying to render a scene with OpenGL 2.1 but the borders on overlapping shapes are weird. I tested some OpenGL initialisations but without any change. I reduce my issue to a simple test application with 2 sphere with the same result. I tried…
KiwiJaune
  • 530
  • 2
  • 16
4
votes
3 answers

GLSL fixed function fragment program replacement

When using the OpenGL fixed function pipeline for vertex setup, how a fragment program looks like that is compatible to the fixed function vertex setup? I guess that usually depends on the number of light sources and texture layers etc.. So for…
dronus
  • 10,774
  • 8
  • 54
  • 80
4
votes
1 answer

Texture for Torus is not applying properly

I'm creating a open GL program with 6 Torus. When I applied the texture it's displaying with one color. Even though it's not in a single color. I'm getting images from array. Other textures (skybox, planet, HUD) are applying properly except Torus…
AbRe
  • 162
  • 2
  • 10
4
votes
1 answer

Child window with OpenGL not responding to gluOrtho2D()

I created a child window using WinAPI, now I'm trying to draw a triangle there. It is drawn, but its scale is not correct. I think this is due to the fact that I have not properly installed orthogonal system. It is set in the init() function, I call…
German
  • 321
  • 1
  • 7
4
votes
1 answer

How do I bring a polygon to the foreground in OpenGL?

The code below creates 2 square polygons, red and green. I'm trying to place a red square on top of the green, but I can't. The depth buffer is declared, cleaned when necessary, an orthogonal system is configured correctly. If I specify a value…
German
  • 321
  • 1
  • 7
4
votes
1 answer

OpenGL translation before and after a rotation

The following is code (taken from http://www.glprogramming.com/red/chapter03.html) regarding how to draw a robot's arm and shoulder and rotating them by some user input: glPushMatrix(); glTranslatef (-1.0, 0.0, 0.0); glRotatef ((GLfloat)…
Favn Hghksd
  • 321
  • 6
  • 14
3
votes
1 answer

How can I use OpenGL to render to memory without requiring any windowing system library?

I would like to use OpenGL (version 1.5) to render images to memory, without displaying them on screen (I can e.g. just save them as image files or render them as ASCII in terminal). I do not want any I/O. I've found similar question at SO but none…
Miloslav Číž
  • 557
  • 4
  • 18
3
votes
1 answer

2D white grid not displaying above background

I'm trying to create a 2D hollow grid on top of a purple background; however, what's being displayed whenever I create the grid is a white window. I created the 2D grid using GL_Lines, as I only wanted the borders to be colored white and not the…
HR1
  • 487
  • 4
  • 14
3
votes
1 answer

Why does my pyglet application draw funny?

My pyglet application to view 3-d objects in STL format is acting funny. when I load a stl file, it works fine, but then when I try to draw it, it acts funny. code doesn't crash, but the test file I loaded for a cube doesn't look right. I think it…
HennieP12
  • 33
  • 4
1
2 3
22 23