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

glPushMatrix() glPopMatrix() doesn't work

I try to code two object move independent which mean both are moving two different direction it's worked but it can't move continuous. when i put glTranslatef() at outside the glPushMatrix() ... glPopMatrix() it work normally. void display() { …
MUN FONG CHAN
  • 21
  • 1
  • 4
0
votes
1 answer

Order independent transparency in legacy OpenGL

I've been searching for resources covering order independent transparency, but they all cover modern OpenGL (3.0+), which I can accomplish, but I haven't found anything that explains how to implement any of these algorithms in legacy OpenGL. What…
Kotauskas
  • 1,239
  • 11
  • 31
0
votes
1 answer

GL_Invalid_Operation in OpenGL applications

I am currently wiring an OpenGL application and am getting GL_INVALID_OPERATION. The whole GL is scattered among several files and its hard to create an example out of it, but I have created an OpenGL trace using apitrace. This is one chunk that…
Nidhoegger
  • 4,973
  • 4
  • 36
  • 81
0
votes
1 answer

How I can use Keyboard interaction in this code

i want to use keyboard key to move the object on the path but after using keyboard function the object is not moving.Please help me with this.after applying keyboard function the object is not moving from its place. i want to add 3 different…
0
votes
0 answers

glutSolidSphere fails to color

I am reviving some openGL/glutcode from over 10 years ago. It looks like freeglut has taken over from glut, and something is not quite the same. This code used to color the sphere: void DrawRider() { glDisable(GL_TEXTURE_2D); …
Joymaker
  • 813
  • 1
  • 9
  • 23
0
votes
1 answer

Why, when i scale polygons my light intensity changes?

I need to easy change my polygon scale in OpenGL project, but for some reason, the light intensity is directly proportional to the size of the polygons. I tried to move light direction to different places. Change light intensity and div normal…
user10520282
0
votes
1 answer

Why aren't the figures appearing in the screen?

My last work consists of adding a 3D cube with texture to the center of the circle I've already made, but the screen just appears black for some reason, no figures or anything; I know it's probably something I added in the wrong place or something…
escobarveras
  • 69
  • 2
  • 8
0
votes
1 answer

How to draw different colored line strips with Legacy OpenGL?

So, I have a matrix of pairs of x and y coordinates, each line in the matrix represents a route, which I would like to represent as a GL_LINE_STRIP in OpenGL. The thing is I would like to draw the lines with different colors each time. I thought my…
0
votes
0 answers

How to make transparent on 2D shapes OpenGL?

I am trying to make the rectangle to become 50% transparency by using alpha. But it is not working and my shapes become not appearing anymore. Any solution to fix this? (Drawing rectangle functions in object class) void Object::drawRect(GLint x1,…
0
votes
1 answer

didnot get expected output on reading /dev/fb0

I want to display present screen in an OpenGL window using /dev/fb0, I need to get faster pixel mappings, I have written some code, but unfortunately it doesn't give what I expect ? is this the problem because of using /dev/fb0 or code itself? any…
0
votes
0 answers

Sharpgl can see a line parallel to the Z axis

I drew a line parallel to the Z axis in sharpgl. I set the camera above the Z axis, so I thought I would see 1 point, but I don't see it. Later I want to draw a large number of these lines side by side, now I'm trying on one. Camera…
0
votes
1 answer

Displaying two different objects on same screen

I am trying to display a sphere and a torus on the same screen, but it seems like the "glutInitDisplayMode" is what is causing me to display only one. When I keep it as glutInitDisplayMode(GLUT_SINGLE | GLUT_RGBA |GLUT_DEPTH) the torus…
vs9999
  • 61
  • 4
0
votes
1 answer

Making the square bigger when it moves

#include // this library is for standard input and output #include "glut.h" // this library is for glut the OpenGL Utility Toolkit #include float squareX = 0.0f; float squareY = 200.0f; static int flag = 1; void drawShape(void)…
Muddy
  • 382
  • 3
  • 14
-1
votes
1 answer

OpenGL Draw Around a Circle At Angles

I am trying to draw an image at 45 degree increments in the shape of a circle. I am getting the image from a txt file. I am trying to translate the matrix by 45 degrees but its not working. This is what I tried but it's not…
-1
votes
1 answer

Why does glTranslatef() resize object?

I have 3 rectangles and I need to place them in shape of podium. At this moment they look like this: Code of display func: glPushMatrix(); glRotated(rotate_x, 1.0, 0.0, 0.0); glRotated(rotate_y, 0.0, 1.0, 0.0); glScalef(1, 3, 1); …
1 2 3
22
23