ALEATY CNC Machining - ALEATY are a professional on-demand online manufacturing platform. We partner with hundreds of CNC machining factory.

Develop fictitious production environment with OpenGL (Ⅰ )

  • Time:
  • Click:351
Summary the data structure that the article introduced geometrical graph information, memory and indication fundamental. The client server essence that discusses GDI of interface of Windows graph equipment from applied process angle and empty screen demonstrate a skill. Tell about OpenGL graph library to be in finally fictitious production copy uses a base really. The keyword is fictitious make, client / server, openGL graph library 1 computer graph 1.

The array structure graph of information of 1 geometry graph shows begin from the indication of the dot. Line segment is all gather in the dot above it. The dot on geometry does not have size. The indication of line segment is used actually finite the point will produce a figure, consequently every nod the size with have certain. Right now dot is real geometrical point no longer, resemble element however (image woof) . Every resemble element is the smallest unit that location can organize on indication screen, also be to be on indication screen can controlled most fraction. Indication screen as be being counted by the 2 dimension of composition resembling element group. Every resemble an element of element correspondence array. Every have an address like element, the suffix of corresponding array. Brightness resembling element is worth corresponding element value. Set shows the on screen each brightness that resembles element can produce a picture. 1.

The memory of information of 2 geometry graph pursues 1 frame bumper and image show a picture is by the composition resembling element of limited amount. If the indication equipment with a higher resolution has 1000 to resemble element each in X and Y direction, criterion this indication screen will contain 1 million to resemble element. To show light of each bits is dark, the each brightness information that needs 1 bit at least like element, its store the space needs at least 1 million / 8 byte. Use memory to call frame bumper like the memory of element brightness array. Frame bumper is to point to show those who inspect card to go up inspect memory. 1.

The indication grating of information of 3 geometry graph shows is uses morer figure demonstrates a method. Grating shows is to use bumper of frame of scanning of scanning generator per sec. 30 arrive 60 times, the information that resembles the delegate element brightness is taken out all right, send toward monitor next. The access of frame bumper address and real estate of synchronism of grating scanning signal are unripe. The content of frame bumper uses output to inspect screen signal to control intensity of CRT electron beam. Intensity size decides to resemble the indication light and shade of element. Frame bumper address uses the deflexion of electron beam of output level and CRT of control of perpendicular deflexion signal. The screen coordinate that the deflexion of electron beam decides to resemble element (X, y) . Bumper of frame of every time scanning makes screen gets break. Because grating shows the system uses direct memory to access (DMA) hardware scans ceaselessly frame bumper, show the figure come, consequently image is generated do not suffer in the center of processor (CPU) control. 1.

Driver of 4 indication equipment can transplant with what use a program in sexual application, the content that using the geometrical graph information that the program compiles is not bumper of immediate change frame shows as the standard the instruction stocks indication file however in, use indication equipment driver to explain the image that indication instruction needs with generation next. Indication file driver forms graphical application process and the interface between indication equipment. If apply a program to be able to produce a standard to display file code, so every particular indication device that contains driver runs applied program correctly, increased applied order thereby can transplant quality. Indication equipment is offerred together by hardware business normally with indication driver. 1.

Array of bumper of frame of indication measure of graph of 5 application process is direct answer relatively with indication screen content, the figure that and with brightness the form of encode was saved is shown. The implementation measure of graphical application process includes: Allocate indication equipment and memory by initialization program above all. Apply a program to keep graphical information into frame bumper next, convey to show equipment directly by frame bumper. Blank of correspondence of empty frame bumper displays screen. By the end graphical program releases indication equipment to include reapportion memory finally. The graph below environment of 2   Windows shows 2.

The Xu Bing below environment of 1   Windows shows in MS-DOS application, graph and text program often are written directly not only inspect screen to go up, and when such doing, often bypass BIOS screen is called. Avoided this kind of state below Windows environment however. Issueing physics to inspect screen in environment of much task Windows above all is one shares resource. All indication activities that use a program, must be operated through Windows API function. Any trying that bypass API function regards the behavior of disturbed system as. Write physics to inspect screen to go up far from in operation of the screen below Windows environment next, although use API,also be when function such. Applied process requests to keep the operation of text or graph, it is keep information fictitious screen to also call equipment environment DC. Final Windows goes to fictitious screen image on physical indication screen. 2.

Interface of 2 graphs user (GDI) client / Windows of server essence   will apply a program to come out from the depart in specific output equipment. In MS-DOS, applied process is in charge of be process designing of all output equipment. Windows application process is not in charge of pair of output equipment process designing. GDI of graphical user interface offerred an independence to dictate at the standard plot of equipment to use a program collect. To additive new hardware, offer driver by hardware manufacturer, and applied process is founded through GDI and safeguard equipment environment (DC) . Win32 application process was become by space below Windows95 environment user mode and core mode. Prohibit be being taken directly below user mode with graphical equipment resource, give however mode of operating system core will finish. The client that this kind of mode calls GDI / if server mode pursues 2. The client of GDI / server mode will use a program effectively each other are detached, the security that enhanced Windows environment thereby is characteristic. And any servers that visit the function that exports equipment to stay in GDI square, assured to inbreak thereby the screen data that uses a program to cannot visit other application process directly. Graph the graph of process of application of 23   OpenGL supports 3.

Software of graph of 1   OpenGL is applying medium positional   OpenGL is the branch of the workstation of IRIS GL graph of SGI company. In recent years, regard industrial standard figure as library, need waits in CAD/CAM high three-dimensional boy or girl friend is visible get applied extensively with graphical scale domain. OpenGL offerred the functional port between program and equipment of graphical input output to apply programmer, defined an independence the graphical core system at the language. In writing applied process process, embed OpenGL to corresponding language with the conventional means that accords with a language in. If the graph is shown 3 times,OpenGL uses medium position in the graph. Because OpenGL itself and hardware reach the rock-bottom software of the operating system to have nothing to do, make graphical application process is obtained thereby taller can transplant quality. Graph 33.

Client of 2   OpenGL / OpenGL of   of server graph indication means passes a client / server means realizes a graph to show. Applied process works as the client and call OpenGL API. OpenGL client module serves module communication to erupt simultaneously with OpenGL the OpenGL order that gives applied order. OpenGL serves module to call interface of Win32 equipment drive to use driver. An OpenGL serves a program to often safeguard environment of a few OpenGL at the same time. OpenGL environment is OpenGL client's located OpenGL condition. OpenGL environment makes chromatic environment again, it is the bridge between OpenGL and Windows system. All OpenGL are called be finished through chromatic environment. OpenGL chromatic environment and equipment environment have same pattern resembling element. Can produce a chromatic environment that is close to to it after had set pattern resembling element for an equipment environment. Pass the equipment environment that give out, the plot on the equipment that chromatic environment can point out in equipment environment. If its logic mode pursues 4. Graph 4   go with OpenGL chromatic the typical unit process of cargo bandling of window of a Windows is as follows: .

Establish right window pattern; .

Establish pattern resembling element; .

Found equipment environment; .

Found a chromatic environment; .

Will chromatic environment sets the current and chromatic environment that is Cheng of a line; .

Line Cheng undertakes concerned the initialization of OpenGL; .

Line Cheng transfers OpenGL chromatic function; .

After OpenGL handles an end, will chromatic environment sets what use currently to be not (disconnect the connection with chromatic environment) ; .

Release chromatic environment and equipment environment. CNC Milling