menus...
	* Shortcuts item moved from Help to Edit
misc...
	* fix: q1 mdl reader out of bounds reading crash
	* fix: q1 mdl loading of MDL_FRAME_GROUP case
	* fix: rightclick main wnd border, release in texbro glwidget == crash (unfreezepointer)
	* texbro: search in currently shown textures
	* ask for saving nonsaved map on project settings change
	* func_detail to nongame group ents counter
	* deiconify main wnd, unmaximize maximized view on app closing to save correct layout data
	* close preferences dialog on ESC
	* Enter = Ok in global and path settings dialogs
	* print renderer stats in XY views too
	* global 'show renderer stats' option, def = off
	* ~10x faster opengl text rendering
This commit is contained in:
Garux
2017-08-02 09:25:04 +03:00
parent cba5583d23
commit 65ca31fd44
12 changed files with 286 additions and 119 deletions

View File

@@ -138,8 +138,8 @@ void ClipPoint::Draw( const char *label, float scale ){
// draw label
glRasterPos3f( m_ptClip[0] + offset, m_ptClip[1] + offset, m_ptClip[2] + offset );
//glCallLists( GLsizei( strlen( label ) ), GL_UNSIGNED_BYTE, label ); //fails with GCC
//glCallLists( GLsizei( strlen( label ) ), GL_UNSIGNED_BYTE, reinterpret_cast<const GLubyte*>( label ) ); //worx
//glCallLists( GLsizei( strlen( label ) ), GL_UNSIGNED_BYTE, label ); //fails //new font rendering?
//glCallLists( GLsizei( strlen( label ) ), GL_UNSIGNED_BYTE, reinterpret_cast<const GLubyte*>( label ) ); //worx :o
GlobalOpenGL().drawString( label );
}
@@ -2594,6 +2594,9 @@ void XYWnd::XY_Draw(){
glClear( GL_COLOR_BUFFER_BIT );
extern void Renderer_ResetStats();
Renderer_ResetStats();
//
// set up viewpoint
//
@@ -2763,6 +2766,22 @@ void XYWnd::XY_Draw(){
}
}
if( g_camwindow_globals.m_showStats ){
glMatrixMode( GL_PROJECTION );
glLoadIdentity();
glOrtho( 0, m_nWidth, 0, m_nHeight, 0, 1 );
glMatrixMode( GL_MODELVIEW );
glLoadIdentity();
glColor3fv( vector3_to_array( g_xywindow_globals.color_viewname ) );
glRasterPos3f( 2.f, GlobalOpenGL().m_font->getPixelDescent() + 1.f, 0.0f );
extern const char* Renderer_GetStats();
GlobalOpenGL().drawString( Renderer_GetStats() );
}
GlobalOpenGL_debugAssertNoErrors();
glFinish();