VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /usr/share/emscripten/tests/box2d/glui/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/emscripten/tests/box2d/glui/glui_internal_control.h
/*
 Header file for use by GLUI controls.  
 Everything you need is right here.


*/
#ifndef __GLUI_INTERNAL_CONTROL_H
#define __GLUI_INTERNAL_CONTROL_H

/* This is the main GLUI external header */
#include "glui.h"

/* Here's some utility routines */
#include "glui_internal.h"


/**
  A GLUI_Control-drawing sentinal object.
  On creation, saves the current draw buffer and window.
  On destruction, restores draw buffer and window.
  This is way nicer than calling save/restore manually.
*/
class GLUI_DrawingSentinal {
	int orig_buf, orig_win;
	GLUI_Control *c;
public:
	/** The constructor sets up the drawing system */
	GLUI_DrawingSentinal(GLUI_Control *c_);
	/** The destructor cleans up drawing back how it was */
	~GLUI_DrawingSentinal();
	
	// Do-nothing routine to avoid compiler warning about unused variable
	inline void avoid_warning(void) {}
};
/** Just drop a GLUI_DRAWINGSENTINAL_IDIOM at the start of your draw methods,
and they'll return if we can't be drawn, and 
automatically save and restore all needed state. 
*/
#define GLUI_DRAWINGSENTINAL_IDIOM  if (NOT can_draw()) return; GLUI_DrawingSentinal drawSentinal(this); drawSentinal.avoid_warning();


/** Return the time, in seconds. */
inline double GLUI_Time(void) {return 0.001*glutGet(GLUT_ELAPSED_TIME);}

#endif

VaKeR 2022