# Tag Info

6

When you use linewidth or line antialiasing or pointwidth or pointsprites, OpenGL creates for you a small rectangle instead of the line or point, with texture coordinates. Nowadays you can even program this yourself using geometry shaders ot even the tesselator. A totally different approach is to use defered shading, using one geometric pass just to store ...

5

Enabling the extension is as simple as: var uints_for_indices = gl.getExtension("OES_element_index_uint"); if uints_for_indices is null then the extension is not available and you'll have to split your data anyway. If it's not null then you can now pass gl.UNSIGNED_INT for the index type into gl.drawElements.

4

There's quite a bit of information about this: Static/dynamic batching: basically combining objects into one super-object Atlas textures: combining textures into one large texture than only uses one material Switch to a deferred renderer if you are using many lights From my understanding to render an object that contains exceptional amount of vertices, ...

3

One good way you can arrange for a circle (or other shape) to be drawn for each vertex in a mesh is to use geometry instancing. This is a GPU feature that allows multiple instances (copies) of a mesh to be drawn at once, with the vertices/indices of the mesh given by one set of buffers, and another vertex buffer that can give additional data per-instance. ...

2

After a short research, I found this site, which describes the algorithm. I didn't know it before. An important thing you didn't mention in your question is the calculation of the decision parameter $d$, which is: $$d=f\left(N\right)+f\left(S\right)$$ It abuses the fact, that the bottom pixel will always lie on the circle or inside and the right pixel will ...

2

The following is really an assorted set of comments: Why integer? Floating-point hardware is (in general) far more complex than integer and so on many (old) CPUs it (a) might not have been available (because of silicon budget) and/or (b) took considerably more clock cycles to execute than integer operations. Re "Bresenham's" algorithm: IIRC there is a ...

2

Let's take web browsers as an example. On mobile, both Chrome and Firefox draw the page content on the GPU, and they typically have a lot of scrolling, so it's a relevant example. They work a little like Google Maps or Open Street Map's tileserver. They slice the page up into tiles and draw each tile into a texture. (The textures may well be in a texture ...

2

Traditionally, there are two ways to display something on the screen: Re-draw it from scratch every frame (or, every time something changes) Track the sections of the screen (ie. "dirty rectangles") that change each frame, and update only those portions. The first option is what most modern games / animations will do. Each frame, you re-submit all the draw ...

2

You can use OpenGl 4.x tessellation shaders to convert Bezier control points into polygons. A google search for "tessellation shader bezier" found this outline describing the tessellation of Bezier surfaces and curves: http://web.engr.oregonstate.edu/~mjb/cs519/Handouts/tessellation.1pp.pdf This offloads the Bezier evaluation from the CPU to the GPU and ...

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