Questions tagged [legacy-opengl]

11 questions
9
votes
1 answer

Why different result when change input order in GL_LINES?

Code: #include #include #pragma comment(lib, "opengl32") #include #include //Initialize OpenGL void init(void) { glClearColor(0, 0, 0, 0); glViewport(0, 0, 500, 500); …
zombielei
  • 121
  • 1
  • 3
4
votes
3 answers

OpenGL Vertex - Texture Mapping

I have a mesh loaded by an obj file (wavefront), complete with normals and texture coordinates per face, and its relative texture available. In my C++ / OpenGL code (assignment for a computer graphics class) I bind correctly the texture, but fail at…
phagio
  • 67
  • 6
3
votes
2 answers

Why do we multiply vertex from left side in vertex shader with matrices?

I have been learning OpenGL 3.3 and I saw this expression: gl_Position = projection * view * model * vertex I am confused because I read in some book that if the vector (vertex) is placed on the right side of the matrix then it would be a column…
Ankit singh kushwah
  • 791
  • 1
  • 5
  • 19
3
votes
1 answer

What if we don't mention Modelview and projection matrix?

So I've been learning opengl for some weeks now and managed to understand all the viewing pipelines. As far my understanding goes we need to bring the object to world space and then the world space to view space. After that the clipping is done by…
Broskiee
  • 133
  • 3
2
votes
1 answer

Fonts rendered through textures look thinned

I'm rendering fonts using Cairo to surfaces, convert those surfaces to RGBA textures and then display them on GL_QUADS using orthotogonal projection and alpha blending. When I use Cairo to render directly to the window (i.e., without hardware…
2
votes
3 answers

Fast clipping without clearing stencil buffer

I'm writing an OpenGL application that runs on a Raspberry Pi, i.e., a quite resource-limited system. Essentially, a few quads with RGBA textures are overlayed/alpha blended on top of each other with individual translation/rotation applied. They are…
1
vote
1 answer

Background behind 3D model

I have object loader, which i want to have background. I tried to put jpg image like texture to my application. I tried to make that with FreeImage library, but the image didn't show. Also i tried with Gdiplus, i opened the image but when i opened…
I.To
  • 13
  • 4
1
vote
1 answer

Texture rendering in OpenGL

I know there are tons of questions about it, but I found nothing useful so far so, here I am. I'm trying to render a texture which is attached to a wavefront .obj mesh. I continued to fail (somehow, it was like textures were not correctly loaded),…
phagio
  • 67
  • 6
0
votes
2 answers

How to convert a 3D model into an OpenGL fixed pipeline representation

I have a CAD model in Solidworks (which can be converted to STL, OBJ, STEP , VRML etc.) that I need to render in an old application, which still uses fixed pipeline. Ideally, I would like to convert my model into a series of glMaterialfv, glBegin,…
mallwright
  • 101
  • 2
0
votes
0 answers

Implement Shadow Mapping in Legacy OpenGL

I'm trying to implement shadow mapping in Legacy OpenGL by following this tutorial, but texture projection doesn't seem to work. All I get is a thin black line instead of a shadow. I have a (optional) texture in Texture Stage 0 and the Shadow Map is…
Mario
  • 13
  • 3
0
votes
1 answer

OpenGL old-style diffuse shading producing unexpected effects

Question: What is going wrong with the shape of the contours of constant illumination in the below picture ? Detail: Although Lambertian shading might be ill-regarded because it exposes the hard edges of our low-poly models, and because it models…
Simon
  • 173
  • 2
  • 7