# Tagged Questions

28 views

### Get closed ring around a mesh passing through given points

Suppose I've some points on a mesh (2+) that can be anywhere on the mesh, suppose for example these (ignore the small points, just consider the sphere): http://i.stack.imgur.com/nDzW3.png (sorry ...
107 views

### Using Geometric Slerp to move Camera

I'm writing a program in C++ using OpenGL and GLM; I'm trying to get my camera to follow my car. So far it successfully follows it around the screen, but I'm having trouble adjusting the Camera's ...
544 views

### How can I draw a quad in wireframe with modern OpenGL, without rendering the interior bisecting edge?

I want to draw a quad (not two triangles). I actually know that triangles are faster, as I answered this question. But let's say I am building a 3D modeling tool. It makes sense to draw a quad for ...
244 views

I'm currently trying to change my project to use GL_TRIANGLE_ADJACENCY instead of GL_TRIANGLES. Following this question, I have managed to construct my index buffer fine, but when it comes to the ...
60 views

So I've not been able to find much online about how data should be stored for triangle adjacency. Currently I calculate my adjacent using half-edges (mention in an answer here). But do I store this ...
298 views

### in the shadow of a sphere [duplicate]

(Related, but somewhat different, to my previous question) How can I determine in a fragment shader if a fragment is in the shadow of a sphere? That is, if it is occluded by the sphere and is past ...
357 views

### How do I render a filled and stroked path using OpenGL?

I want to render a 2-dimensional geometric path consisting of Bézier curves and straight lines. Paths can be concave. What is the most efficient way to draw this using modern OpenGL? Can I do this ...
2k views

### Rotate an object given only by its points?

I was recently writing a simple 3D maze FPP game. Once I was done fiddling with planes in OpenGL, I wanted to add support for importing Blender objects. The approach I used was triangulization of the ...
1k views

### Wrong faces culled in OpenGL when drawing a rectangular prism

I'm trying to learn opengl. I did some code for building a rectangular prism. I don't want to draw back faces so I used glCullFace(GL_BACK), glEnable(GL_CULL_FACE);. But I keep getting back faces also ...
967 views

### Render a polyline with rounded joints

I have a list of points (3D) and want to draw a line connecting all points with a specified width. The line should be rendered in OpenGL (using OSG) as triangles. The real challenge of this task is to ...
300 views

### How do I determine if a tile is a slope based on the tile image?

In my game, every tile is a 32x32 texture. All the slopes are a 0 - 45 degree angle. I would like to determine, at the time I load the tile, if the is sloped by examining its texture/bitmap data. How ...
445 views

### OpenGL, Offset and Camera Space

I was reading chapter 4 of the Arcsyntesis OpenGL tutorial when I came across this line in the GLSL shader. vec4 cameraPos = position + vec4(offset.x, offset.y, 0.0, 0.0); About it, the tutorial ...
149 views

### What is the purpose of glEdgeFlagv?

I know that what both glEdgeFlagv and glEdgeFlag do is toggle boundary edge status, but my question is why does the v version exist when the documentation specifies that the only difference is that ...
1k views

### what algorithms exist for combining multiple triangle meshes into one mesh

Let's say I have a terrain mesh of some triangles, and several smaller meshes which I want to add to that terrain mesh (think ground and some small mounds or berms for example). What would I look for ...
807 views

### How to generate a rotation matrix or a quaternion (properly rotated in regards to texture coordinates) for each triangle of a mesh?

I'm trying to build a uniform grid made of 3D points over the surface of an arbitrary mesh (we have texture-coordinates for each vertex...) Or to reformulate: imagine a mesh textured with a texture ...