What is a Rendering Context? Beginner OpenGL, open the Red Book, will tell you that OpenGL is a state machine, OpenGL uses a client-server model, then feel good abstraction, until later learned the drawing context to connect these. We can think of each hardware GPU as a server. Each drawing context corresponds to a client application. A client maintains a state machine. If two windows correspond to two different drawing contexts, the two windows are State independence. Applying the drawing context means that the application of system resources still requires a lot of resources for each drawing context. Remember to try to load WebGL pages continuously on the TAB page of chrome. Since WebGL uses OpenGL ES, it also needs to draw contexts. When loading more than thirty pages, Chrome crashed. All OpenGL calls need to specify which context to call. In different contexts, the same resource ID may correspond to different types of resources in their respective contexts. Different operating systems have their own drawing context to create and set the current drawing context API. How to create a drawing context We generally do demo program, will use GLUT, so many people may not have created their own drawing context. In addition to creating a window, the GLUT function GlutCreateWindow also creates a drawing context and sets the created drawing context to the current drawing context. For the Windows platform, first create a Device Context (DC) with DC input and create a drawing context. After creating the drawing context, call MakeCurrent to set the created context to the current drawing context. After creating the drawing context and setting it as the current context, you cannot use the latest OpenGL features. APIs that call OpenGL 1.1 will still crash. In general, we use the Glew library and call glewInit() to get the function entry address of the new feature that OpenGL ships with the graphics driver. Draw contexts and threads Two threads at the same time MakeCurrent to the same drawing context will cause the program to crash. The general practice of a large program is to apply for a thread that is dedicated to drawing. When a thread is created, a drawing context is requested for the drawing thread, which is always the current context. All drawing-related operations are done in the drawing thread. Resource sharing between contexts Each window has one context. The advantage is that you can ensure that the state machines do not affect each other. However, multiple windows need to use the same texture. How to avoid duplicate resource applications? The answer is that the graphic resources between the contexts can be shared. First create the context A, then use the A as the input, and create the context B. Then B can access the texture resource created under the A context. Resources such as textures, shaders, and Buffers can be shared, but container objects such as Frame Buffer Object (FBO), Vertex Array Object (VAO), etc. cannot be shared, but the shared textures and VBOs can be bound to container objects of their respective contexts.
The 8-inch tablet will have a big impact on the 7-inch and 10-inch tablet market. Because the portability of an 8-inch tablet is stronger than that of a 10-inch tablet, and the usable area is larger than that of a 7-inch tablet. The most important thing is that the price is more moderate, which is much cheaper than a 10-inch tablet. It can be said that the 8-inch tablet computer has a good balance between portability and screen display area, and is more likely to be favored by the majority of users.
8 Inches Tablet Pc,Tablet Computer,8 Inch Android Tablets,8 Inch Tablet Jingjiang Gisen Technology Co.,Ltd , https://www.jsgisentec.com