henc · Display & Rendering
View creation / deletion, rendering, buffer swap, texture & update counters
hencCreate
Section titled “hencCreate”Prototype
Section titled “Prototype”int hencCreate( HWND hwnd )Function
Section titled “Function”- Create HGLRC and HDC, which are information to be used for map display window.
- To use the OpenGL API, you must have a display window.
- All APIs related to the exhibition should be prepared for display via the function, and must be called after using the function before use.
- When displaying in multiple windows, use function to distinguish the window to be displayed. However, the display setting works with a single setting, and can not be set separately for each window.
Parameters
Section titled “Parameters”HWND : IN (display window)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencDelete
Section titled “hencDelete”Prototype
Section titled “Prototype”int hencDelete( HWND wnd )Function
Section titled “Function”Delete the generated HGLRC and HDC to display the map on HWND hwnd.
Parameters
Section titled “Parameters”HWND : IN (Display window)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencGetGLRC
Section titled “hencGetGLRC”Prototype
Section titled “Prototype”HGLRC hencGetGLRC( HWND hwnd )Function
Section titled “Function”Obtain the HGLRC corresponding to the specified window.
Parameters
Section titled “Parameters”HWND : IN (Display window)
Return Value
Section titled “Return Value”!= NULL : HGLRC == NULL : Failure (no information about display window)
hencGetDC
Section titled “hencGetDC”Prototype
Section titled “Prototype”HDC hencGetDC( HWND hwnd )Function
Section titled “Function”Obtain the HDC used for the specified HWND window.
Parameters
Section titled “Parameters”HWND : IN (display window)
Return Value
Section titled “Return Value”!= NULL : HDC == NULL : Failure (no information about display window)
Prototype
Section titled “Prototype”HDC hencGetDC()Function
Section titled “Function”Obtain the HDC used for the current display window.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”!= NULL : HDC == NULL : Failure (no current window)
hencSelect
Section titled “hencSelect”Prototype
Section titled “Prototype”int hencSelect( HWND hwnd )Function
Section titled “Function”Specify the map display target window.
Parameters
Section titled “Parameters”HWND : IN (Display target window)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencGetHwnd
Section titled “hencGetHwnd”Prototype
Section titled “Prototype”HWND hencGetHwnd( )Function
Section titled “Function”Obtain the window handle of the set display object window.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”!= NULL : HWND (Handle value of display target window) == NULL : Failure (No display target window)
hencClearBackground
Section titled “hencClearBackground”Prototype
Section titled “Prototype”int hencClearBackground()Function
Section titled “Function”Clear the entire OpenGL display buffer in the currently selected display window. Therefore, the previously drawn map contents are deleted and can not be reused. It is a function to erase only the display buffer of OpenGL, so the screen of the current window is not affected. Need function
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”= 0 : Success < 0 : Failure
hencSetViewport
Section titled “hencSetViewport”Prototype
Section titled “Prototype”int hencSetViewport( int x, int y, int w, int h )Function
Section titled “Function”Specifies the map area of the display buffer. Need hencSelect() function.
Parameters
Section titled “Parameters”int x : IN (WinPos, Window coordinate system, Specify the upper left corner of the display area) int y : IN (WinPos, Window coordinate system, Specify the upper left corner of the display area) int w : IN (WinPos, Window coordinate system, Specify the width of the display area) int h : IN (WinPos, Window coordinate system, Specify the height of the display area)
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencClearViewport
Section titled “hencClearViewport”Prototype
Section titled “Prototype”int hencClearViewport()Function
Section titled “Function”Delete the contents of the display buffer only by the area specified by . If you are using multiple Viewports() function, you should use this function to partially clear the display buffer without using function. Need function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”= 0 : Success < 0 : Fail
hencRender
Section titled “hencRender”Prototype
Section titled “Prototype”int hencRender()Function
Section titled “Function”- Draw a map in the map area of the display buffer. It is a function that returns after drawing the whole map according to the current setting, and it may take a long time depending on the capacity of the map. It is drawn only on the buffer and does not appear on the actual display screen.
- It will actually appear on the screen after the display function is called.
- Need function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencRenderWaitFinish
Section titled “hencRenderWaitFinish”Prototype
Section titled “Prototype”int hencRenderWaitFinish()Function
Section titled “Function”- Due to the nature of OpenGL, it takes a certain amount of time because the picture is not completed immediately after it is drawn in the buffer. This is a function to wait until the drawing is completed. In most cases, the use of this function is unnecessary.
- Need function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencRenderReset
Section titled “hencRenderReset”Prototype
Section titled “Prototype”int hencRenderReset()Function
Section titled “Function”- Prepare a partial drawing. Unlike the function, only the display preparation is performed.
- Need function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencRenderMore
Section titled “hencRenderMore”Prototype
Section titled “Prototype”int hencRenderMore()Function
Section titled “Function”- Draw only one element of the entire map drawing process. That is, the result is returned in a short time because it provides a partial drawing. By calling this function repeatedly, the entire drawing process can be progressed and completed in sequence.
- Need and function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”-
0 : Success in drawing one element (if more drawing elements remain)
- = 0 : Success in drawing one element (If the entire drawing is complete)
- < 0 : Fail
hencRenderStop
Section titled “hencRenderStop”Prototype
Section titled “Prototype”int hencRenderStop()Function
Section titled “Function”- The partial drawing process is interrupted, and the temporary information generated during the process is deleted.
- At this time, the unfinished map image remains in the map buffer.
- Need and function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”-
= 0 : Success
- < 0 : Fail
hencRenderMoreTimed
Section titled “hencRenderMoreTimed”Prototype
Section titled “Prototype”int hencRenderMoreTimed( DWORD msec = 100 )Function
Section titled “Function”- It is the same function as , but it is a function that draws a number of elements in a certain time. When the specified time or more elapses, the function is automatically returned.
- Need and function.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”-
0 : Success in drawing one element (if more drawing elements remain)
- = 0 : Success in drawing one element (If the entire drawing is complete)
- < 0 : Fail
hencSwapBuffer
Section titled “hencSwapBuffer”Prototype
Section titled “Prototype”int hencSwapBuffer()Function
Section titled “Function”- Displays the contents of the display buffer on the screen. This function uses the characteristics of OpenGL, and what is displayed on the actual screen is an asynchronous function that occurs after the point at which the function returns. Therefore, performance can be improved by making more use of the CPU. However, it should be noted that undesirable results may occur when drawing using HDC in a window.
- When this function is called, the contents of the map may be left in the display buffer or may remain erroneous. This may vary depending on the OpenGL device driver, and generally no map content remains.
- Need function.
- Available after full or partial map drawing
- Drawing a full map :
- Drawing partial map : , , , and so on
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencCopyBuffer
Section titled “hencCopyBuffer”Prototype
Section titled “Prototype”int hencCopyBuffer()Function
Section titled “Function”- Copies the contents of the display buffer to the screen. This function copies and displays the contents of the display buffer as it is on the screen.
- It is a synchronous function that performs copying after waiting for OpenGL display to complete. Since the display is waiting for completion, the CPU utilization is lower than . However, HDC can be used to draw on the display screen.
- The contents of the previous map remain in the display buffer even after this function is called
- Need function.
- Available after full map drawing or partial map drawing process
- Drawing full map :
- Drawing partial map : , , , and so on
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”- = 0 : Success
- < 0 : Fail
hencEncfileIsRendered
Section titled “hencEncfileIsRendered”Prototype
Section titled “Prototype”bool hencEncfileIsRendered( int no )Function
Section titled “Function”It is determined whether or not a specific ENC file is partially displayed on the current screen.
Parameters
Section titled “Parameters”- Map cells are numbered from 0 in the order they are loaded.
Return Value
Section titled “Return Value”- true : It means that some or all are being displayed on the screen.
- false : It means that it is not included in the screen area
hencCaptureMapTexture
Section titled “hencCaptureMapTexture”Prototype
Section titled “Prototype”GLuint hencCaptureMapTexture( GLuint texture = 0 )Function
Section titled “Function”- Make the entire contents of the buffer for the current map display into a texture.
- If the texture number is 0, create a new one.
- If the Texture number is not 0, reuse the given Texture number.
Parameters
Section titled “Parameters”GLuint texture : IN (OpenGL Texture name)
Return Value
Section titled “Return Value”OpenGL Texture name
hencRenderMapTexture
Section titled “hencRenderMapTexture”Prototype
Section titled “Prototype”void hencRenderMapTexture( GLuint tex )Function
Section titled “Function”Draw a map on the screen using the buffer store Texutre for the previously stored map display. The same window as at the time of capturing, and it is normally drawn only when there is no change in the size of the window.
Parameters
Section titled “Parameters”GLuint texture : IN (OpenGL Texture name)
Return Value
Section titled “Return Value”None
hencGetMapUpdateCounter
Section titled “hencGetMapUpdateCounter”Prototype
Section titled “Prototype”DWORD hencGetMapUpdateCounter()Function
Section titled “Function”- 현재창에 대한 변경사항 카운터 값을 획득한다.
- 변경사항 카운터 값을 클리어(clear) 한 후 전시 버퍼를 새로 그려야 하는 설정의 변경사항을 확인할 수 있는 카운터 값이다.
- 이 값은 개별창을 기준으로 전시 버퍼에 대한 변동치 값이다.
- 지도 설정이 바뀔 경우에는 모든 전시창의 변동치 값이 올라가고,
- 개별창의 전시 설정이 바뀔 경우에는 해당하는 창의 변동치 값만 올라간다.
- 단일 Viewport에 대해서만 유효한 값이며, 다수의 Viewport인 경우에는 직접 변동 여부를 확인해야 한다.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”변경사항 카운터 값
hencClearMapUpdateCounter
Section titled “hencClearMapUpdateCounter”Prototype
Section titled “Prototype”void hencClearMapUpdateCounter()Function
Section titled “Function”Clear the change counter value for the current window.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None
hencIncMapUpdateCounter
Section titled “hencIncMapUpdateCounter”Prototype
Section titled “Prototype”void hencIncMapUpdateCounter()Function
Section titled “Function”Manually indicates that there are changes to the current window.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None
hencIncMapUpdateCounterAll
Section titled “hencIncMapUpdateCounterAll”Prototype
Section titled “Prototype”void hencIncMapUpdateCounterAll()Function
Section titled “Function”Manually indicates that there is a change to the entire window.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None
hencClearMapUpdateCounterAll
Section titled “hencClearMapUpdateCounterAll”Prototype
Section titled “Prototype”void hencClearMapUpdateCounterAll()Function
Section titled “Function”Clear change counters for all windows.
Parameters
Section titled “Parameters”None
Return Value
Section titled “Return Value”None