Skip to main content
7 votes
Accepted

Texture rendering in OpenGL

This type of artifact is a tell-tale sign that you've messed up your texture image format at the byte level. It's hard to tell what exactly is wrong, but it's something along the lines of bad pitch or ...
IneQuation's user avatar
7 votes
Accepted

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

There is no 100% consensus on what order matrix multiplication should model things, worse the industry is split along this. Some sources use row major and some sources use column major matrices. Great ...
joojaa's user avatar
  • 8,437
5 votes

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

OpenGL uses column-major matrices. For example, the translation values will be in the last row rather than the last column of the matrix. For example when loading matrices into uniforms in glsl, the <...
user1118321's user avatar
  • 3,421
5 votes
Accepted

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

Your screen isn't 3D, so how do you display 3D objects on it? You need to map 3D coordinates into 2D space. This also explains why your OpenGL code is not behaving how you're expecting it to. Sorry if ...
aces's user avatar
  • 1,353
5 votes
Accepted

Background behind 3D model

Normally if you paint a background image you simply draw a textured full-screen square while depth testing and writing is disabled before drawing the actual scene (where you re-enable depth) In the ...
ratchet freak's user avatar
3 votes
Accepted

Fonts rendered through textures look thinned

From looking at your example images this looks like a case of Alpha blending being applied to the RGB channel of the font-atlas texture and then again applied via the A channel when rendering. The ...
PaulHK's user avatar
  • 2,322
2 votes
Accepted

OpenGL Vertex - Texture Mapping

I see you use glEnable(GL_TEXTURE_GEN_S); but also use glTexCoord(...) to load coordinates. These are mutually exclusive features IIRC. If you are supplying your own texture coordinates you should not ...
PaulHK's user avatar
  • 2,322
2 votes

OpenGL Vertex - Texture Mapping

for (i = 0, i < 3, ++i) glTexCoord3d(texturePoint[i].x, texturePoint[i].y, 0); glVertex3d(v[i]->x(), v[i]->y(), v[i]->z()); This code calls <...
Dan Hulme's user avatar
  • 6,840
1 vote
Accepted

Can I "recreate" vendor-specific OpenGL extensions?

Most vendor-specific extensions (particularly those of more recent vintage) are based on the particular nature of that vendor's hardware. And even if some other vendor's hardware could do something ...
Nicol Bolas's user avatar
  • 9,842
1 vote
Accepted

OpenGL old-style diffuse shading producing unexpected effects

As far as I remember, without a fragment shader the shading is only evaluated at vertices then interpolated. Try subdividing the mesh.
Fabrice NEYRET's user avatar
1 vote

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

You can compile it into a ...
ratchet freak's user avatar
1 vote
Accepted

Fast clipping without clearing stencil buffer

It sounds like what you need is a scissor test. It's specifically designed for clipping against an unrotated rectangle, and should be faster than messing about with the stencil buffer.
russ's user avatar
  • 2,402
1 vote

OpenGL Vertex - Texture Mapping

Your geometry may be prepared for Direct3D, which has texture space origin placed differently (top-left vs bottom-left corner). Try flipping either the texture's Y coordinates (i.e. load it from the ...
IneQuation's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible