I did not find a good definition of the concept of a drawing surface. What properties are associated with a surface? In the context of pure OpenGL there is no surface, since OpenGL has no notion of window system specific things. In OpenGL ES though you have the EGL API, which introduces the concept of a drawing surface, without defining it properly. What is your concise definition of a drawing surface?
Basically, a surface is something that you can render to. It's a kind of device context, but potentially smarter since surfaces may know how to display themselves or do other useful things. EGL has three surface types:
This forum post may be helpful.
In the Direct3D world, broadly speaking, a surface is some 2D image data. A texture is something that can be sampled and used in a shader. Typically textures are 'made of' surfaces; for example, each mip-map of a 2D texture is a surface, and each face of a cube map is a surface.
In Direct3D, a hardware surface is typically -- but not always -- a section of hardware memory in the DirectDraw surface format. This is the same format used by DDS image files, and basically consists of a header, and then image data in one of several image formats that are specified in the header section. The usual properties are width, height, pixel format, and maybe a few misc things like stereo (which may not actually be supported, of course).
It's basically not much more than a generic term for an image.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With