4 ms·
What does “surface” mean here? It’s not explained or even used once in the article body.
by pimlottc 6y ago
What does “surface” mean here? It’s not explained or even used once in the article body.
- nvrspyx 6y agoFrom skimming, it has something to do with media buffers, but I don't really know what that is as a lay person with next to zero web development experience/knowledge.
- pavlov 6y agoA surface typically means a 2D image buffer managed by an API. For example, a graphics API like Metal or Direct3D lets you create surfaces that reside either in GPU or CPU memory. Or, an OS-level interprocess API like Apple's IOSurface lets you create shared surfaces that can be accessed by multiple processes.
- magicalist 6y ago> What does “surface” mean here? It’s not explained or even used once in the article body. Yeah, seems like a poor choice of title without the explanation. For rendering implementations, "surface" usually refers to a part of memory being rendered into as output or that something else has rendered into that is being used as input, like an image buffer that webcam output is dumped into. One example set of docs: https://docs.microsoft.com/en-us/windows/win32/direct3d9/direct3d-surfaces https://docs.microsoft.com/en-us/windows/win32/direct3d9/dir... I don't know if I've ever really thought about the name. I guess maybe at some point it was more straightforward and a surface was just a part of memory that was going to be blitted directly to screen and so in that sense you're painting a "surface" of that area of the screen? I'd be interested if anyone knows a more detailed etymology.
- foobiekr 6y ago"Canvas" was already taken at the time these APIs were becoming popular.
- kevingadd 6y agotypically terminology-wise I see "canvas" used to refer to a surface targeted by paint operations, vs other surfaces which may be read-only (contain an image you loaded from disk or a snapshot of a canvas at a previous point in time). In D3D terminology I think it's almost always been "surfaces" and "render targets", where the latter is something you can paint into. Surfaces are often broken down into levels, and don't necessarily contain image data (they can contain depth/stencil data for 3D rendering, for example)
- foobiekr 6y agoYes. In the pre-DirectX games SDK for Windows 95 it was a mix of “surface” and DIB (eg CreateCompatibleDIB). The win32 API was already using “canvas” in many places. Surface actually shows up in OS/2 Presentation Manager as well.
- brucedawson 6y agoGood point. I don't think anybody gave much thought to the title after I came up with it - I suspect it is easy to gloss over during the edit passes. I chose the title so long ago that I can't really remember what I was thinking.
- toast0 6y agoIt seems like you were trying to reference 'Don't Copy That Floppy'
- thaumasiotes 6y agohttps://docs.microsoft.com/en-us/windows/win32/direct3d9/direct3d-surfaces https://docs.microsoft.com/en-us/windows/win32/direct3d9/dir... > A surface represents a linear area of display memory and usually resides in the display memory of the display card, although surfaces can exist in system memory. https://stackoverflow.com/questions/1033445/what-exactly-is-a-surface-in-opengl-es-or-direct3d https://stackoverflow.com/questions/1033445/what-exactly-is-... > broadly speaking, a surface is some 2D image data.