Skip to content

henc · Display & Rendering

View creation / deletion, rendering, buffer swap, texture & update counters

int hencCreate( HWND hwnd )
  • 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.

HWND : IN (display window)

= 0 : Success < 0 : Fail


int hencDelete( HWND wnd )

Delete the generated HGLRC and HDC to display the map on HWND hwnd.

HWND : IN (Display window)

= 0 : Success < 0 : Fail


HGLRC hencGetGLRC( HWND hwnd )

Obtain the HGLRC corresponding to the specified window.

HWND : IN (Display window)

!= NULL : HGLRC == NULL : Failure (no information about display window)


HDC hencGetDC( HWND hwnd )

Obtain the HDC used for the specified HWND window.

HWND : IN (display window)

!= NULL : HDC == NULL : Failure (no information about display window)

HDC hencGetDC()

Obtain the HDC used for the current display window.

None

!= NULL : HDC == NULL : Failure (no current window)


int hencSelect( HWND hwnd )

Specify the map display target window.

HWND : IN (Display target window)

= 0 : Success < 0 : Fail


HWND hencGetHwnd( )

Obtain the window handle of the set display object window.

None

!= NULL : HWND (Handle value of display target window) == NULL : Failure (No display target window)


int hencClearBackground()

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

None

= 0 : Success < 0 : Failure


int hencSetViewport( int x, int y, int w, int h )

Specifies the map area of the display buffer. Need hencSelect() function.

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)

= 0 : Success < 0 : Fail


int hencClearViewport()

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.

None

= 0 : Success < 0 : Fail


int hencRender()
  •  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.

None

  • = 0 : Success
  • < 0 : Fail

int hencRenderWaitFinish()
  • 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.

None

  • = 0 : Success
  • < 0 : Fail

int hencRenderReset()
  • Prepare a partial drawing. Unlike the function, only the display preparation is performed.
  • Need function.

None

  • = 0 : Success
  • < 0 : Fail

int hencRenderMore()
  • 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.

None

  • 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

int hencRenderStop()
  • 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.

None

  • = 0 : Success

  • < 0 : Fail

int hencRenderMoreTimed( DWORD msec = 100 )
  • 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.

None

  • 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

int hencSwapBuffer()
  • 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

None

  • = 0 : Success
  • < 0 : Fail

int hencCopyBuffer()
  • 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

None

  • = 0 : Success
  • < 0 : Fail

bool hencEncfileIsRendered( int no )

It is determined whether or not a specific ENC file is partially displayed on the current screen.

  • Map cells are numbered from 0 in the order they are loaded.
  • 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

GLuint hencCaptureMapTexture( GLuint texture = 0 )
  • 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.

GLuint texture : IN (OpenGL Texture name)

OpenGL Texture name


void hencRenderMapTexture( GLuint tex )

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.

GLuint texture : IN (OpenGL Texture name)

None


DWORD hencGetMapUpdateCounter()
  • 현재창에 대한 변경사항 카운터 값을 획득한다.
  • 변경사항 카운터 값을 클리어(clear) 한 후 전시 버퍼를 새로 그려야 하는 설정의 변경사항을 확인할 수 있는 카운터 값이다.
  • 이 값은 개별창을 기준으로 전시 버퍼에 대한 변동치 값이다.
  • 지도 설정이 바뀔 경우에는 모든 전시창의 변동치 값이 올라가고,
  • 개별창의 전시 설정이 바뀔 경우에는 해당하는 창의 변동치 값만 올라간다.
  • 단일 Viewport에 대해서만 유효한 값이며, 다수의 Viewport인 경우에는 직접 변동 여부를 확인해야 한다.

None

변경사항 카운터 값


void hencClearMapUpdateCounter()

Clear the change counter value for the current window.

None

None


void hencIncMapUpdateCounter()

Manually indicates that there are changes to the current window.

None

None


void hencIncMapUpdateCounterAll()

Manually indicates that there is a change to the entire window.

None

None


void hencClearMapUpdateCounterAll()

Clear change counters for all windows.

None

None