StgSharpDebug Get the status of a certain key on the keyboard. Function handler to load an opengl function by serching its name. the name of the Opengl function An intptr value representing the pointer to the function OpenGL package used by current form context. Height of this form, represent in Representing Width of this form, represent in Width of this form, represent in Init an OpenGl context if current form has not been binded to any context. and set the context binded to current form as current OpenGL context. Something goes wrong and StgSharp fails in creating a new OpenGL context. Set all necessary metadata to current form instance Resize the current form New width of the window New height of the window Resize the current form A (width,height) representing the new size of current form Set the size limit of current form Minimum width of current form Minimum height of current form Maximum width of curent form Maximum height of current form Set the size limit of current form Minimun size of current form. In form of a of (width,height) Maximum size of current form. In form of a of (width,height) Necessary operation to init this form. Behaviour of current form when in a render cycle. When this form Init this form and render it on screen, and respond with operation Get OpenGL library of this form's context. A package contains all opengl APIs Define how current form render in one frame. Please define this befor calling any OpenGL api and other graphic methods. Create a set of . Amount of EBO to be created. Create a set of . Amount of VAO to be crated. Create a sets of Amount of textures to be crated. Create aset of . Amount of Object to be created. Create an instance of program New instance of instance. A timer counting frames after its construction. Frames after this timer created. Convert a into uint value. this will get total frames since the timer was created. to be converted Interface of all kinds OpenGL buffer onjects Get the only handle to one of the Object instance Bind a buffer instance to OpenGL Index of handle of the object in this instance to be bind A collecion of handle to Element Buffer Object in OpenGL. Each value indexed from instance of this class this is the only handle to one Element Buffer Object. Set data to current vertex buffer object Type of bufferData Index to find certain VBO in this instance Data to write in How OpenGL use these data, defined by Set data to current vertex buffer object Type of bufferData Index to find certain VBO in this instance A array of data to write in How OpenGL use these data, defined by Load all aupportable OpenGL APIs and bind them to given context. The used as current OpenGL context A delegate that can get o Get the function pointer of given OpenGL api name Name of the OpenGL api The funtion pointer of the api in form of Compile the vertex shader to be attached to this shader. GLSL code of vertex shader. Inti a shader with no program attached. Link the shader to current context. Get a uniform form current shader, the value type of the uniform should be provided. Name of the Uniform in shader code Get a uniform form current shader, the value type of the uniform should be provided. Name of the Uniform in shader code Get a uniform form current shader, the value type of the uniform should be provided. Name of the Uniform in shader code Let the current context use this shader. Same function as OpenGL api glActiveTexture type of texture to activate Operation after alignment by calling . No calling of this method is acceptable, but it will bring the risk of that relevant code will not run if it is interrupted by frame overtime. Please call this method immediately after calling , too early or sonner may cause . The form used as frame update benchmark. Operation after frame update alignment. The action binded to a wrong alignment. Align a sets of code to frame update of a . Usually, a call of is required. This method is used as sigle thread method. If more than one alignment is requested, a will throw. The form used as frame update benchmark. More than one alingment attached to one form timer Same fucntion as OpenGL api glAttachShader. Only the first in handle will be attached to the first in handle. The rest shader and program will be ignored. Shader program to be attachec A shader part to attach Bind the indexed buffer object to certain type of buffer Same function as OpenGL api, glBindTexture. Type of texture to bind Sign of texture Same function as OpenGL api, glBindVertexArray Clear buffers to preset values Call apiClearColor in OpenGL specifies the red, green, blue, and alpha values used by apiClear to clear the color buffers. Values specified by apiClearColor are clamped to the range [0,1] Specify the red values used when the color buffers are cleared. Specify the red values used when the color buffers are cleared. Specify the red values used when the color buffers are cleared. Specify the red values used when the color buffers are cleared. Conpile the provided shader code in string form. A string array contains all shaders' code An enum represent the type of the shader to conpile, including vertex shader and fragment shader. An handle of conpiled shader Same function as OpenGL api, glCreateProgram A handle representing a single shader program Same function as OpenGL api, glCreateProgram. Used for creating multiple shader program. A handle representing all shader programs Creates a form and its associated Required width Required width Tittle of the window Same function as OpenGL api, glDeleteBuffer. This method can delete one buffer in one call a handle representing the buffer to be deleted Same function as OpenGL api, glDeleteBuffer. This method can delete a sets of buffers in one call. Array of buffers to be deleted Same function as OpenGL api, glDeleteVertexArrays Handle of vertex objects. Same fucntion as the OpenGL api glGenBuffers Same fucnction as OpenGL api glGenTextures. amount of textures to generate Same fucntion as OpenGL api, glGenVertexArray Amount of vao to be generated Same fucntion as OpenGL api, glGetUniformLocation Shader program to find the uniform Name of the uniform Make the OpenGL context of a certain as the activated OpenGL context. Set data value to a float , all types of parameters are float. The target The first value to be set The second value to be set The third value to be set The forth value to be set Set data value to a float , all types of parameters are float. The target A packing four parameters of the uniform Set data value to a float , all types of parameters are float. The target The first value to be set The second value to be set The third value to be set Set data value to a float , all types of parameters are float. The target The first value to be set The second value to be set Set data value to a float , all types of parameters are float. The target The value to be set Set data value to a int , all types of parameters are int. The target The value to be set Set data value to a float , all types of parameters are . The target A value of the uniform Set how a shader parameter read data from a VBO. Serial number of the parameter Amount of data each elements contains Type of data read by shader Pixels stride of each sets of data Same function as OpenGL api glTexImage2d texture target to load image in level of mipmap, 0 if default OpenGL's internal color channel format width of image height of image color channels of this image how this image express each pixel data array of pixels Same fucntion as OpenGL api glTexParameteri texture target to set parameters name of parameter value of parameter Same fucntion as OpenGL api glUseShader. Sign of program to be used Same function as the OpenGL api, glViewPort A sensor used for cheking out if a bullet hit a player or something else A 2D vector presenting the position of an enemy entity, position can also be visited by X, Y X position of an enenmy entity Y position of an enemy entity Version of current StgSharp platform. Main version represent in hundred's digit, and sub version represent in ten's digit. Init an instance of OpenGL program, This method should be called before other graphic methods, after LoadGL method. Write a log message to log file, and mark the level of this message. A string contains information of how current evironment runs. The severity of current message. Part of a circle. All points on a arc has the same distance to their center. A collection of all point on the same plain and has the same distance to a point The origin of this coordinate. The horizontial axis of the coordinate. Point to the right direction. The vertical axis of the coordinate. Point to the top direction. 当几何体调用了过多的CalcVec方法时,产生UnusedVertexException异常 Caculate the movement of a point. The game tick represent time passed by A 3d vector representing movement Move begin side of a line. It is recommended to override this function rather than loading an with same function. Time passed since current line was created. Move end side of a line. It is recommended to override this function rather than loading an with same function. Time passed since current line was created. Move the third vertix. this is a useless method for Parallelograms. Current time tick Geometry overdefined Move the third vertix. This method is useless for Parallelograms. Current time tick Geometry overdefined 平面几何体。包含三角形,对称四边形,自由多边形等。最多可由16个点参数定义。 Tick time this geometry eas crested Get all sides of this . A array contains all straight s of current geometry item. Get a flat cincide with current geometry. Update the coordinate of the point. If this is a moving point, (Points on sides or surface if other geometry items) please do not define any motion here, codes will be ignored by program Time passes since the program begin, counted by frames 计算中心点相对于参考原点的位移 当前游戏刻 A square A linear data structure with dynamic length. It contains a of , each is twice longer than the former one. Init a with a certain amount of elements prepared. Amount of elements to be prepared. Create a new instance of , and fill the begining ones of elemtns as given instance. Amount of beginning elements to be filled Length of this A pair of value A value. The lower byte is , and higher byte is . The first value. The second value. Whether this linked list has no members or not. The first memeber of this linkec list. Set value to this property will reset the first node. The last memeber of this linkec list. Set value to this property will reset the first node. Add an item to the tail of linked list. The item ready to add to the list Remove all members from this list Insert a member to current linkedlist, the new member will be after a certain existed member. New member will be inserted after this member The new member to be inserted Remove a member from this linkedlist. Member to be removed from this list remove the first member of the list remove the last member of the list OpenGL numeric type. An IEEE-754 floating-point value, clamped to the range [0,1]. OpenGL numeric type. An IEEE-754 double precision floating-point value, clamped to the range [0,1]. A two dimension vector defined by two elements. Vec2Ds in StgSharp are defaultly usaed as colum vector. Reurns the value of ArcSin(x) The sine value of the angle Get the value of E ^ x; Returns the value of ln(x). calculate the value of x^y Returns the value of x^y returns a random float number between 0 and 1. Generates a random seed in int value. A handle to an OpenGL object, must be indexed from a . Direct call will cause A handle to an OpenGL object. temporarily release the handle of GLhandle sets. Please call method before indexing. Realse all resource in this handle. This will release all resource in this . This will be not usable. The COLORREF value is used to specify an RGB color. When specifying an explicit [RGB](/windows/desktop/api/Wingdi/nf-wingdi-rgb) color, the **COLORREF** value has the following hexadecimal form: `0x00bbggrr` The low-order byte contains a value for the relative intensity of red; the second byte contains a value for green; and the third byte contains a value for blue. The high-order byte must be zero. The maximum value for a single byte is 0xFF. To create a **COLORREF** color value, use the [RGB](/windows/desktop/api/Wingdi/nf-wingdi-rgb) macro. To extract the individual values for the red, green, and blue components of a color value, use the [**GetRValue**](/windows/desktop/api/Wingdi/nf-wingdi-getrvalue), [GetGValue](/windows/desktop/api/Wingdi/nf-wingdi-getgvalue), and [GetBValue](/windows/desktop/api/Wingdi/nf-wingdi-getbvalue) macros, respectively. Read more on docs.microsoft.com. A pointer to a null-terminated, constant, ANSI character string. A pointer to the first character in the string. The content should be considered readonly, as it was typed as constant in the SDK. Gets the number of characters up to the first null character (exclusive). Returns a with a copy of this character array, decoding as UTF-8. A , or if is . Returns a span of the characters in this string, up to the first null character (exclusive). A pointer to a null-terminated, constant character string. A pointer to the first character in the string. The content should be considered readonly, as it was typed as constant in the SDK. Gets the number of characters up to the first null character (exclusive). Returns a with a copy of this character array, up to the first null character (exclusive). A , or if is . Returns a span of the characters in this string, up to the first null character (exclusive). The GLYPHMETRICSFLOAT structure contains information about the placement and orientation of a glyph in a character cell. The values of GLYPHMETRICSFLOAT are specified as notional units. Specifies the width of the smallest rectangle (the glyph's black box) that completely encloses the glyph. Specifies the height of the smallest rectangle (the glyph's black box) that completely encloses the glyph. Specifies the x and y coordinates of the upper-left corner of the smallest rectangle that completely encloses the glyph. Specifies the horizontal distance from the origin of the current character cell to the origin of the next character cell. Specifies the vertical distance from the origin of the current character cell to the origin of the next character cell. The LAYERPLANEDESCRIPTOR structure describes the pixel format of a drawing surface. Please notice, as documented above, that certain layer plane properties are not supported in the current implementation. The implementation is the Microsoft GDI software implementation of OpenGL. Hardware manufacturers that enhance parts of OpenGL may support some layer plane properties not supported by the generic implementation. Specifies the size of this data structure. Set this value to sizeof(LAYERPLANEDESCRIPTOR). Specifies the version of this data structure. Set this value to 1. A set of bit flags that specify properties of the layer plane. The properties are generally not mutually exclusive; any combination of bit flags can be set, with the exceptions noted. The following bit flag constants are defined. This doc was truncated. Read more on docs.microsoft.com. Specifies the type of pixel data. The following types are defined. This doc was truncated. Read more on docs.microsoft.com. Specifies the number of color bitplanes in each color buffer. For RGBA pixel types, it is the size of the color buffer, excluding the alpha bitplanes. For color-index pixels, it is the size of the color-index buffer. Specifies the number of red bitplanes in each RGBA color buffer. Specifies the shift count for red bitplanes in each RGBA color buffer. Specifies the number of green bitplanes in each RGBA color buffer. Specifies the shift count for green bitplanes in each RGBA color buffer. Specifies the number of blue bitplanes in each RGBA color buffer. Specifies the shift count for blue bitplanes in each RGBA color buffer. Specifies the number of alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported. Specifies the shift count for alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported. Specifies the total number of bitplanes in the accumulation buffer. Specifies the number of red bitplanes in the accumulation buffer. Specifies the number of green bitplanes in the accumulation buffer. Specifies the number of blue bitplanes in the accumulation buffer. Specifies the number of alpha bitplanes in the accumulation buffer. Specifies the depth of the depth (z-axis) buffer. Specifies the depth of the stencil buffer. Specifies the number of auxiliary buffers. Auxiliary buffers are not supported. Not used. Must be zero. When the LPD_TRANSPARENT flag is set, specifies the transparent color or index value. Typically the value is zero. The PIXELFORMATDESCRIPTOR structure describes the pixel format of a drawing surface. Please notice carefully, as documented above, that certain pixel format properties are not supported in the current generic implementation. The generic implementation is the Microsoft GDI software implementation of OpenGL. Hardware manufacturers may enhance parts of OpenGL, and may support some pixel format properties not supported by the generic implementation. Specifies the size of this data structure. This value should be set to sizeof(PIXELFORMATDESCRIPTOR). Specifies the version of this data structure. This value should be set to 1. A set of bit flags that specify properties of the pixel buffer. The properties are generally not mutually exclusive; you can set any combination of bit flags, with the exceptions noted. The following bit flag constants are defined. This doc was truncated. Read more on docs.microsoft.com. Specifies the type of pixel data. The following types are defined. This doc was truncated. Read more on docs.microsoft.com. Specifies the number of color bitplanes in each color buffer. For RGBA pixel types, it is the size of the color buffer, excluding the alpha bitplanes. For color-index pixels, it is the size of the color-index buffer. Specifies the number of red bitplanes in each RGBA color buffer. Specifies the shift count for red bitplanes in each RGBA color buffer. Specifies the number of green bitplanes in each RGBA color buffer. Specifies the shift count for green bitplanes in each RGBA color buffer. Specifies the number of blue bitplanes in each RGBA color buffer. Specifies the shift count for blue bitplanes in each RGBA color buffer. Specifies the number of alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported. Specifies the shift count for alpha bitplanes in each RGBA color buffer. Alpha bitplanes are not supported. Specifies the total number of bitplanes in the accumulation buffer. Specifies the number of red bitplanes in the accumulation buffer. Specifies the number of green bitplanes in the accumulation buffer. Specifies the number of blue bitplanes in the accumulation buffer. Specifies the number of alpha bitplanes in the accumulation buffer. Specifies the depth of the depth (z-axis) buffer. Specifies the depth of the stencil buffer. Specifies the number of auxiliary buffers. Auxiliary buffers are not supported. Specifies the number of overlay and underlay planes. Bits 0 through 3 specify up to 15 overlay planes and bits 4 through 7 specify up to 15 underlay planes. Ignored. Earlier implementations of OpenGL used this member, but it is no longer used. Specifies the transparent color or index of an underlay plane. When the pixel type is RGBA, dwVisibleMask is a transparent RGB color value. When the pixel type is color index, it is a transparent index value. Ignored. Earlier implementations of OpenGL used this member, but it is no longer used. The POINTFLOAT structure contains the x and y coordinates of a point. Learn more about this API from docs.microsoft.com. Specifies the horizontal (x) coordinate of a point. Specifies the vertical (y) coordinate of a point. Contains extern methods from "GDI32.dll". Contains extern methods from "KERNEL32.dll". Contains extern methods from "OPENGL32.dll". Contains extern methods from "USER32.dll". The ChoosePixelFormat function attempts to match an appropriate pixel format supported by a device context to a given pixel format specification. Specifies the device context that the function examines to determine the best match for the pixel format descriptor pointed to by ppfd. Pointer to a PIXELFORMATDESCRIPTOR structure that specifies the requested pixel format. In this context, the members of the PIXELFORMATDESCRIPTOR structure that ppfd points to are used as follows: This doc was truncated. Read more on docs.microsoft.com. If the function succeeds, the return value is a pixel format index (one-based) that is the closest match to the given pixel format descriptor. If the function fails, the return value is zero. To get extended error information, call GetLastError. You must ensure that the pixel format matched by the ChoosePixelFormat function satisfies your requirements. For example, if you request a pixel format with a 24-bit RGB color buffer but the device context offers only 8-bit RGB color buffers, the function returns a pixel format with an 8-bit RGB color buffer. The DescribePixelFormat function obtains information about the pixel format identified by iPixelFormat of the device associated with hdc. The function sets the members of the PIXELFORMATDESCRIPTOR structure pointed to by ppfd with that pixel format data. Specifies the device context. Index that specifies the pixel format. The pixel formats that a device context supports are identified by positive one-based integer indexes. The size, in bytes, of the structure pointed to by ppfd. The DescribePixelFormat function stores no more than nBytes bytes of data to that structure. Set this value to sizeof(PIXELFORMATDESCRIPTOR). Pointer to a PIXELFORMATDESCRIPTOR structure whose members the function sets with pixel format data. The function stores the number of bytes copied to the structure in the structure's nSize member. If, upon entry, ppfd is NULL, the function writes no data to the structure. This is useful when you only want to obtain the maximum pixel format index of a device context. If the function succeeds, the return value is the maximum pixel format index of the device context. In addition, the function sets the members of the PIXELFORMATDESCRIPTOR structure pointed to by ppfd according to the specified pixel format. If the function fails, the return value is zero. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. The DeleteEnhMetaFile function deletes an enhanced-format metafile or an enhanced-format metafile handle. A handle to an enhanced metafile. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. If the hemf parameter identifies an enhanced metafile stored in memory, the DeleteEnhMetaFile function deletes the metafile. If hemf identifies a metafile stored on a disk, the function deletes the metafile handle but does not destroy the actual metafile. An application can retrieve the file by calling the GetEnhMetaFile function. The GetEnhMetaFilePixelFormat function retrieves pixel format information for an enhanced metafile. Identifies the enhanced metafile. Specifies the size, in bytes, of the buffer into which the pixel format information is copied. Pointer to a PIXELFORMATDESCRIPTOR structure that contains the logical pixel format specification. The metafile uses this structure to record the logical pixel format specification. If the function succeeds and finds a pixel format, the return value is the size of the metafile's pixel format. If no pixel format is present, the return value is zero. If an error occurs and the function fails, the return value is GDI_ERROR. To get extended error information, call GetLastError. When an enhanced metafile specifies a pixel format in its ENHMETAHEADER structure and the pixel format fits in the buffer, the pixel format information is copied into ppfd. When cbBuffer is too small to contain the pixel format of the metafile, the pixel format is not copied to the buffer. In either case, the function returns the size of the metafile's pixel format. For information on metafile recording and other operations, see Enhanced Metafile Operations. Read more on docs.microsoft.com. The GetPixelFormat function obtains the index of the currently selected pixel format of the specified device context. Specifies the device context of the currently selected pixel format index returned by the function. If the function succeeds, the return value is the currently selected pixel format index of the specified device context. This is a positive, one-based index value. If the function fails, the return value is zero. To get extended error information, call GetLastError. Learn more about this API from docs.microsoft.com. The SetPixelFormat function sets the pixel format of the specified device context to the format specified by the iPixelFormat index. Specifies the device context whose pixel format the function attempts to set. Index that identifies the pixel format to set. The various pixel formats supported by a device context are identified by one-based indexes. Pointer to a PIXELFORMATDESCRIPTOR structure that contains the logical pixel format specification. The system's metafile component uses this structure to record the logical pixel format specification. The structure has no other effect upon the behavior of the SetPixelFormat function. If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call GetLastError. If hdc references a window, calling the SetPixelFormat function also changes the pixel format of the window. Setting the pixel format of a window more than once can lead to significant complications for the Window Manager and for multithread applications, so it is not allowed. An application can only set the pixel format of a window one time. Once a window's pixel format is set, it cannot be changed. You should select a pixel format in the device context before calling the wglCreateContext function. The wglCreateContext function creates a rendering context for drawing on the device in the selected pixel format of the device context. An OpenGL window has its own pixel format. Because of this, only device contexts retrieved for the client area of an OpenGL window are allowed to draw into the window. As a result, an OpenGL window should be created with the WS_CLIPCHILDREN and WS_CLIPSIBLINGS styles. Additionally, the window class attribute should not include the CS_PARENTDC style. Read more on docs.microsoft.com. The SwapBuffers function exchanges the front and back buffers if the current pixel format for the window referenced by the specified device context includes a back buffer. If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call GetLastError. If the current pixel format for the window referenced by the device context does not include a back buffer, this call has no effect and the content of the back buffer is undefined when the function returns. With multithread applications, flush the drawing commands in any other threads drawing to the same window before calling SwapBuffers. Read more on docs.microsoft.com. Closes an open object handle. A valid handle to an open object. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. If the application is running under a debugger, the function will throw an exception if it receives either a handle value that is not valid or a pseudo-handle value. This can happen if you close a handle twice, or if you call CloseHandle on a handle returned by the FindFirstFile function instead of calling the FindClose function. The CloseHandle function closes handles to the following objects: This doc was truncated. Read more on docs.microsoft.com. Frees the loaded dynamic-link library (DLL) module and, if necessary, decrements its reference count. A handle to the loaded library module. The LoadLibrary, LoadLibraryEx, GetModuleHandle, or GetModuleHandleEx function returns this handle. Read more on docs.microsoft.com. If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call the GetLastError function. The system maintains a per-process reference count for each loaded module. A module that was loaded at process initialization due to load-time dynamic linking has a reference count of one. The reference count for a module is incremented each time the module is loaded by a call to LoadLibrary. The reference count is also incremented by a call to LoadLibraryEx unless the module is being loaded for the first time and is being loaded as a data or image file. The reference count is decremented each time the FreeLibrary or FreeLibraryAndExitThread function is called for the module. When a module's reference count reaches zero or the process terminates, the system unloads the module from the address space of the process. Before unloading a library module, the system enables the module to detach from the process by calling the module's DllMain function, if it has one, with the DLL_PROCESS_DETACH value. Doing so gives the library module an opportunity to clean up resources allocated on behalf of the current process. After the entry-point function returns, the library module is removed from the address space of the current process. It is not safe to call FreeLibrary from DllMain. For more information, see the Remarks section in DllMain. Calling FreeLibrary does not affect other processes that are using the same module. Use caution when calling FreeLibrary with a handle returned by GetModuleHandle. The GetModuleHandle function does not increment a module's reference count, so passing this handle to FreeLibrary can cause a module to be unloaded prematurely. A thread that must unload the DLL in which it is executing and then terminate itself should call FreeLibraryAndExitThread instead of calling FreeLibrary and ExitThread separately. Otherwise, a race condition can occur. For details, see the Remarks section of FreeLibraryAndExitThread. Read more on docs.microsoft.com. The wglDeleteContext function deletes a specified OpenGL rendering context. If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call GetLastError. It is an error to delete an OpenGL rendering context that is the current context of another thread. However, if a rendering context is the calling thread's current context, the wglDeleteContext function changes the rendering context to being not current before deleting it. The wglDeleteContext function does not delete the device context associated with the OpenGL rendering context when you call the wglMakeCurrent function. After calling wglDeleteContext, you must call DeleteDC to delete the associated device context. Read more on docs.microsoft.com. The wglCreateContext function creates a new OpenGL rendering context, which is suitable for drawing on the device referenced by hdc. The rendering context has the same pixel format as the device context. If the function succeeds, the return value is a valid handle to an OpenGL rendering context. If the function fails, the return value is NULL. To get extended error information, call GetLastError. A rendering context is not the same as a device context. Set the pixel format of the device context before creating a rendering context. For more information on setting the device context's pixel format, see the SetPixelFormat function. To use OpenGL, you create a rendering context, select it as a thread's current rendering context, and then call OpenGL functions. When you are finished with the rendering context, you dispose of it by calling the wglDeleteContext function. The following code example shows wglCreateContext usage. This doc was truncated. Read more on docs.microsoft.com. The wglCreateLayerContext function creates a new OpenGL rendering context for drawing to a specified layer plane on a device context. If the function succeeds, the return value is a handle to an OpenGL rendering context. If the function fails, the return value is NULL. To get extended error information, call GetLastError. A rendering context is a port through which all OpenGL commands pass. Every thread that makes OpenGL calls must have one current, active rendering context. A rendering context is not the same as a device context; a rendering context contains information specific to OpenGL, while a device context contains information specific to GDI. Before you create a rendering context, set the pixel format of the device context with the SetPixelFormat function. You can use a rendering context in a specified layer plane of a window with identical pixel formats only. With OpenGL applications that use multiple threads, you create a rendering context, select it as the current rendering context of a thread, and make OpenGL calls for the specified thread. When you are finished with the rendering context of the thread, call the wglDeleteContext function. Read more on docs.microsoft.com. The wglCopyContext function copies selected groups of rendering states from one OpenGL rendering context to another. If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call GetLastError. Using the wglCopyContext function, you can synchronize the rendering state of two rendering contexts. You can only copy the rendering state between two rendering contexts within the same process. The rendering contexts must be from the same OpenGL implementation. For example, you can always copy a rendering state between two rendering contexts with identical pixel format in the same process. You can copy the same state information available only with the glPushAttrib function. You cannot copy some state information, such as pixel pack/unpack state, render mode state, select state, and feedback state. When you call wglCopyContext, make sure that the destination rendering context, hglrcDst, is not current to any thread. Read more on docs.microsoft.com. The wglDescribeLayerPlane function obtains information about the layer planes of a given pixel format. If the function succeeds, the return value is TRUE. In addition, the wglDescribeLayerPlane function sets the members of the LAYERPLANEDESCRIPTOR structure pointed to by plpd according to the specified layer plane (iLayerPlane ) of the specified pixel format (iPixelFormat ). If the function fails, the return value is FALSE. The numbering of planes (iLayerPlane ) determines their order. Higher-numbered planes overlay lower-numbered planes. The wglGetCurrentContext function obtains a handle to the current OpenGL rendering context of the calling thread. If the calling thread has a current OpenGL rendering context, wglGetCurrentContext returns a handle to that rendering context. Otherwise, the return value is NULL. The current OpenGL rendering context of a thread is associated with a device context by means of the wglMakeCurrent function. You can use the wglGetCurrentDC function to obtain a handle to the device context associated with the current OpenGL rendering context. The wglGetCurrentDC function obtains a handle to the device context that is associated with the current OpenGL rendering context of the calling thread. If the calling thread has a current OpenGL rendering context, the function returns a handle to the device context associated with that rendering context by means of the wglMakeCurrent function. Otherwise, the return value is NULL. You associate a device context with an OpenGL rendering context when it calls the wglMakeCurrent function. You can use the wglGetCurrentContext function to obtain a handle to the calling thread's current OpenGL rendering context. Retrieves the palette entries from a given color-index layer plane for a specified device context. Type: int If the function succeeds, the return value is the number of entries that were set in the palette in the specified layer plane of the window. If the function fails or when no pixel format is selected, the return value is zero. To get extended error information, call GetLastError. Each color-index layer plane in a window has a palette with a size 2^n, where n is the number of bit planes in the layer plane. You cannot modify the transparent index of a palette. Use the wglRealizeLayerPalette function to realize the layer palette. Initially the layer palette contains only entries for white. Read more on docs.microsoft.com. The wglGetProcAddress function returns the address of an OpenGL extension function for use with the current OpenGL rendering context. When the function succeeds, the return value is the address of the extension function. When no current rendering context exists or the function fails, the return value is NULL. To get extended error information, call GetLastError. The OpenGL library supports multiple implementations of its functions. Extension functions supported in one rendering context are not necessarily available in a separate rendering context. Thus, for a given rendering context in an application, use the function addresses returned by the wglGetProcAddress function only. The spelling and the case of the extension function pointed to by lpszProc must be identical to that of a function supported and implemented by OpenGL. Because extension functions are not exported by OpenGL, you must use wglGetProcAddress to get the addresses of vendor-specific extension functions. The extension function addresses are unique for each pixel format. All rendering contexts of a given pixel format share the same extension function addresses. Read more on docs.microsoft.com. The wglMakeCurrent function makes a specified OpenGL rendering context the calling thread's current rendering context. When the wglMakeCurrent function succeeds, the return value is TRUE; otherwise the return value is FALSE. To get extended error information, call GetLastError. The hdc parameter must refer to a drawing surface supported by OpenGL. It need not be the same hdc that was passed to wglCreateContext when hglrc was created, but it must be on the same device and have the same pixel format. GDI transformation and clipping in hdc are not supported by the rendering context. The current rendering context uses the hdc device context until the rendering context is no longer current. Before switching to the new rendering context, OpenGL flushes any previous rendering context that was current to the calling thread. A thread can have one current rendering context. A process can have multiple rendering contexts by means of multithreading. A thread must set a current rendering context before calling any OpenGL functions. Otherwise, all OpenGL calls are ignored. A rendering context can be current to only one thread at a time. You cannot make a rendering context current to multiple threads. An application can perform multithread drawing by making different rendering contexts current to different threads, supplying each thread with its own rendering context and device context. If an error occurs, the wglMakeCurrent function makes the thread's current rendering context not current before returning. Read more on docs.microsoft.com. The wglRealizeLayerPalette function maps palette entries from a given color-index layer plane into the physical palette or initializes the palette of an RGBA layer plane. If the function succeeds, the return value is TRUE, even if bRealize is TRUE and the physical palette is not available. If the function fails or when no pixel format is selected, the return value is FALSE. To get extended error information, call GetLastError. The physical palette for a layer plane is a shared resource among windows with layer planes. When more than one window attempts to realize a palette for a given physical layer plane, only one palette at a time is realized. When you call the wglRealizeLayerPalette function, the layer palette of a foreground window is always realized first. When a window's layer palette is realized, its palette entries are always mapped one-to-one into the physical palette. Unlike GDI logical palettes, with wglRealizeLayerPalette there is no mapping of other windows' layer palettes to the current physical palette. Whenever a window becomes the foreground window, call wglRealizeLayerPalette to realize its layer palettes again, even if the pixel type of the layer plane is RGBA. Because wglRealizeLayerPalette doesn't realize the palette of the main plane, use GDI palette functions to realize the main plane palette. Read more on docs.microsoft.com. Sets the palette entries in a given color-index layer plane for a specified device context. Type: int If the function succeeds, the return value is the number of entries that were set in the palette in the specified layer plane of the window. If the function fails or no pixel format is selected, the return value is zero. To get extended error information, call GetLastError. Each color-index plane in a window has a palette with a size 2^n, where n is the number of bit planes in the layer plane. You cannot modify the transparent index of a palette. Use the wglRealizeLayerPalette function to realize the layer palette. Initially the layer palette contains only entries for white. The wglSetLayerPaletteEntries function doesn't set the palette entries of the main plane palette. To update the main plane palette, use GDI palette functions. Read more on docs.microsoft.com. The wglShareLists function enables multiple OpenGL rendering contexts to share a single display-list space. When the function succeeds, the return value is TRUE. When the function fails, the return value is FALSE and the display lists are not shared. To get extended error information, call GetLastError. When you create an OpenGL rendering context, it has its own display-list space. The wglShareLists function enables a rendering context to share the display-list space of another rendering context; any number of rendering contexts can share a single display-list space. Once a rendering context shares a display-list space, the rendering context always uses the display-list space until the rendering context is deleted. When the last rendering context of a shared display-list space is deleted, the shared display-list space is deleted. All the indexes and definitions of display lists in a shared display-list space are shared. You can only share display lists with rendering contexts within the same process. However, not all rendering contexts in a process can share display lists. Rendering contexts can share display lists only if they use the same implementation of OpenGL functions. All client rendering contexts of a given pixel format can always share display lists. All rendering contexts of a shared display list must use an identical pixel format. Otherwise the results depend on the implementation of OpenGL used.
Note  The wglShareLists function is only available with OpenGL version 1.01 or later. To determine the version number of the implementation of OpenGL, call glGetString.
 
Read more on docs.microsoft.com.
The wglSwapLayerBuffers function swaps the front and back buffers in the overlay, underlay, and main planes of the window referenced by a specified device context. If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call GetLastError. When a layer plane doesn't include a back buffer, calling the wglSwapLayerBuffers function has no effect on that layer plane. After you call wglSwapLayerBuffers, the state of the back buffer content is given in the corresponding LAYERPLANEDESCRIPTOR structure of the layer plane or in the PIXELFORMATDESCRIPTOR structure of the main plane. The wglSwapLayerBuffers function swaps the front and back buffers in the specified layer planes simultaneously. Some devices don't support swapping layer planes individually; they swap all layer planes as a group. When the PFD_SWAP_LAYER_BUFFERS flag of the PIXELFORMATDESCRIPTOR structure is set, it indicates that a device can swap individual layer planes and that you can call wglSwapLayerBuffers. With applications that use multiple threads, before calling wglSwapLayerBuffers, clear all drawing commands in all threads drawing to the same window. Read more on docs.microsoft.com. The wglUseFontBitmaps function creates a set of bitmap display lists for use in the current OpenGL rendering context. (Unicode) If the function succeeds, the return value is TRUE. If the function fails, the return value is FALSE. To get extended error information, call GetLastError. The wglUseFontBitmaps function defines count display lists in the current OpenGL rendering context. Each display list has an identifying number, starting at listBase. Each display list consists of a single call to glBitmap. The definition of bitmap listBase + i is taken from the glyph first + i of the font currently selected in the device context specified by hdc. If a glyph is not defined, then the function defines an empty display list for it. The wglUseFontBitmaps function creates bitmap text in the plane of the screen. It enables the labeling of objects in OpenGL. In the current version of Microsoft's implementation of OpenGL, you cannot make GDI calls to a device context that has a double-buffered pixel format. Therefore, you cannot use the GDI fonts and text functions with such device contexts. You can use the wglUseFontBitmaps function to circumvent this limitation and draw text in a double-buffered device context. The function determines the parameters of each call to glBitmap as follows. This doc was truncated. Read more on docs.microsoft.com. The wglUseFontOutlines function creates a set of display lists, one for each glyph of the currently selected outline font of a device context, for use with the current rendering context. (Unicode) When the function succeeds, the return value is TRUE. When the function fails, the return value is FALSE and no display lists are generated. To get extended error information, call GetLastError. The wglUseFontOutlines function defines the glyphs of an outline font with display lists in the current rendering context. The wglUseFontOutlines function works with TrueType fonts only; stroke and raster fonts are not supported. Each display list consists of either line segments or polygons, and has a unique identifying number starting with the listBase number. The wglUseFontOutlines function approximates glyph outlines by subdividing the quadratic B-spline curves of the outline into line segments, until the distance between the outline and the interpolated midpoint is within the value specified by deviation. This is the final format used when format is WGL_FONT_LINES. When you specify WGL_FONT_OUTLINES, the display lists created don't contain any normals; thus lighting doesn't work properly. To get the correct lighting of lines use WGL_FONT_POLYGONS and set glPolygonMode( GL_FRONT, GL_LINE ). When you specify format as WGL_FONT_POLYGONS the outlines are further tessellated into separate triangles, triangle fans, triangle strips, or quadrilateral strips to create the surface of each glyph. With WGL_FONT_POLYGONS, the created display lists call glFrontFace( GL_CW ) or glFrontFace( GL_CCW ); thus the current front-face value might be altered. For the best appearance of text with WGL_FONT_POLYGONS, cull the back faces as follows: This doc was truncated. Read more on docs.microsoft.com. Destroys the specified menu and frees any memory that the menu occupies. Type: HMENU A handle to the menu to be destroyed. Read more on docs.microsoft.com. Type: BOOL If the function succeeds, the return value is nonzero. If the function fails, the return value is zero. To get extended error information, call GetLastError. Before closing, an application must use the DestroyMenu function to destroy a menu not assigned to a window. A menu that is assigned to a window is automatically destroyed when the application closes. DestroyMenu is recursive, that is, it will destroy the menu and all its submenus. Read more on docs.microsoft.com. Creates an overlapped, pop-up, or child window with an extended window style; otherwise, this function is identical to the CreateWindow function. (Unicode) Type: DWORD The extended window style of the window being created. For a list of possible values, see Extended Window Styles. Read more on docs.microsoft.com. Type: LPCTSTR A null-terminated string or a class atom created by a previous call to the RegisterClass or RegisterClassEx function. The atom must be in the low-order word of lpClassName; the high-order word must be zero. If lpClassName is a string, it specifies the window class name. The class name can be any name registered with RegisterClass or RegisterClassEx, provided that the module that registers the class is also the module that creates the window. The class name can also be any of the predefined system class names. Read more on docs.microsoft.com. Type: LPCTSTR The window name. If the window style specifies a title bar, the window title pointed to by lpWindowName is displayed in the title bar. When using CreateWindow to create controls, such as buttons, check boxes, and static controls, use lpWindowName to specify the text of the control. When creating a static control with the SS_ICON style, use lpWindowName to specify the icon name or identifier. To specify an identifier, use the syntax "#num". Read more on docs.microsoft.com. Type: DWORD The style of the window being created. This parameter can be a combination of the window style values, plus the control styles indicated in the Remarks section. Read more on docs.microsoft.com. Type: int The initial horizontal position of the window. For an overlapped or pop-up window, the x parameter is the initial x-coordinate of the window's upper-left corner, in screen coordinates. For a child window, x is the x-coordinate of the upper-left corner of the window relative to the upper-left corner of the parent window's client area. If x is set to CW_USEDEFAULT, the system selects the default position for the window's upper-left corner and ignores the y parameter. CW_USEDEFAULT is valid only for overlapped windows; if it is specified for a pop-up or child window, the x and y parameters are set to zero. Read more on docs.microsoft.com. Type: int The initial vertical position of the window. For an overlapped or pop-up window, the y parameter is the initial y-coordinate of the window's upper-left corner, in screen coordinates. For a child window, y is the initial y-coordinate of the upper-left corner of the child window relative to the upper-left corner of the parent window's client area. For a list box y is the initial y-coordinate of the upper-left corner of the list box's client area relative to the upper-left corner of the parent window's client area. If an overlapped window is created with the WS_VISIBLE style bit set and the x parameter is set to CW_USEDEFAULT, then the y parameter determines how the window is shown. If the y parameter is CW_USEDEFAULT, then the window manager calls ShowWindow with the SW_SHOW flag after the window has been created. If the y parameter is some other value, then the window manager calls ShowWindow with that value as the nCmdShow parameter. Read more on docs.microsoft.com. Type: int The width, in device units, of the window. For overlapped windows, nWidth is the window's width, in screen coordinates, or CW_USEDEFAULT. If nWidth is CW_USEDEFAULT, the system selects a default width and height for the window; the default width extends from the initial x-coordinates to the right edge of the screen; the default height extends from the initial y-coordinate to the top of the icon area. CW_USEDEFAULT is valid only for overlapped windows; if CW_USEDEFAULT is specified for a pop-up or child window, the nWidth and nHeight parameter are set to zero. Read more on docs.microsoft.com. Type: int The height, in device units, of the window. For overlapped windows, nHeight is the window's height, in screen coordinates. If the nWidth parameter is set to CW_USEDEFAULT, the system ignores nHeight. Read more on docs.microsoft.com. Type: HWND A handle to the parent or owner window of the window being created. To create a child window or an owned window, supply a valid window handle. This parameter is optional for pop-up windows. To create a message-only window, supply HWND_MESSAGE or a handle to an existing message-only window. Read more on docs.microsoft.com. Type: HMENU A handle to a menu, or specifies a child-window identifier, depending on the window style. For an overlapped or pop-up window, hMenu identifies the menu to be used with the window; it can be NULL if the class menu is to be used. For a child window, hMenu specifies the child-window identifier, an integer value used by a dialog box control to notify its parent about events. The application determines the child-window identifier; it must be unique for all child windows with the same parent window. Read more on docs.microsoft.com. Type: HINSTANCE A handle to the instance of the module to be associated with the window. Read more on docs.microsoft.com. Type: LPVOID Pointer to a value to be passed to the window through the CREATESTRUCT structure (lpCreateParams member) pointed to by the lParam param of the WM_CREATE message. This message is sent to the created window by this function before it returns. If an application calls CreateWindow to create a MDI client window, lpParam should point to a CLIENTCREATESTRUCT structure. If an MDI client window calls CreateWindow to create an MDI child window, lpParam should point to a MDICREATESTRUCT structure. lpParam may be NULL if no additional data is needed. Read more on docs.microsoft.com. Type: HWND If the function succeeds, the return value is a handle to the new window. If the function fails, the return value is NULL. To get extended error information, call GetLastError. This function typically fails for one of the following reasons: This doc was truncated. The CreateWindowEx function sends WM_NCCREATE, WM_NCCALCSIZE, and WM_CREATE messages to the window being created. If the created window is a child window, its default position is at the bottom of the Z-order. If the created window is a top-level window, its default position is at the top of the Z-order (but beneath all topmost windows unless the created window is itself topmost). For information on controlling whether the Taskbar displays a button for the created window, see Managing Taskbar Buttons. For information on removing a window, see the DestroyWindow function. The following predefined control classes can be specified in the lpClassName parameter. Note the corresponding control styles you can use in the dwStyle parameter. This doc was truncated. Read more on docs.microsoft.com. Represents a Win32 handle that can be closed with .