@@ -1089,6 +1089,8 @@ BND_EXPORT NVGcolor bndNodeWireColor(const BNDnodeTheme *theme, BNDwidgetState s | |||||
#ifdef _MSC_VER | #ifdef _MSC_VER | ||||
#pragma warning (disable: 4996) // Switch off security warnings | #pragma warning (disable: 4996) // Switch off security warnings | ||||
#pragma warning (disable: 4100) // Switch off unreferenced formal parameter warnings | #pragma warning (disable: 4100) // Switch off unreferenced formal parameter warnings | ||||
#pragma warning (disable: 4244) | |||||
#pragma warning (disable: 4305) | |||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
#define BND_INLINE inline | #define BND_INLINE inline | ||||
#else | #else | ||||
@@ -1213,6 +1213,9 @@ int main() | |||||
glfwSetTime(0); | glfwSetTime(0); | ||||
double c = 0.0; | |||||
int total = 0; | |||||
while (!glfwWindowShouldClose(window)) | while (!glfwWindowShouldClose(window)) | ||||
{ | { | ||||
double mx, my; | double mx, my; | ||||
@@ -1231,11 +1234,20 @@ int main() | |||||
glClearColor(0,0,0,1); | glClearColor(0,0,0,1); | ||||
glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT); | glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT|GL_STENCIL_BUFFER_BIT); | ||||
double t = glfwGetTime(); | |||||
nvgBeginFrame(_vg, winWidth, winHeight, pxRatio); | nvgBeginFrame(_vg, winWidth, winHeight, pxRatio); | ||||
draw(_vg, winWidth, winHeight); | draw(_vg, winWidth, winHeight); | ||||
nvgEndFrame(_vg); | nvgEndFrame(_vg); | ||||
double t2 = glfwGetTime(); | |||||
c += (t2 - t); | |||||
total++; | |||||
if (total > (1*60)) { | |||||
printf("%fms\n", (c / (double)total)*1000.0); | |||||
total = 0; | |||||
c = 0.0; | |||||
} | |||||
glfwSwapBuffers(window); | glfwSwapBuffers(window); | ||||
glfwPollEvents(); | glfwPollEvents(); | ||||
@@ -678,15 +678,18 @@ OUI_EXPORT short uiGetMarginDown(int item); | |||||
#include <assert.h> | #include <assert.h> | ||||
#ifdef _MSC_VER | #ifdef _MSC_VER | ||||
#pragma warning (disable: 4996) // Switch off security warnings | |||||
#pragma warning (disable: 4100) // Switch off unreferenced formal parameter warnings | |||||
#ifdef __cplusplus | |||||
#define UI_INLINE inline | |||||
#else | |||||
#define UI_INLINE | |||||
#endif | |||||
#pragma warning (disable: 4996) // Switch off security warnings | |||||
#pragma warning (disable: 4100) // Switch off unreferenced formal parameter warnings | |||||
#pragma warning (disable: 4244) | |||||
#pragma warning (disable: 4305) | |||||
#ifdef __cplusplus | |||||
#define UI_INLINE inline | |||||
#else | |||||
#define UI_INLINE | |||||
#endif | |||||
#else | #else | ||||
#define UI_INLINE inline | |||||
#define UI_INLINE inline | |||||
#endif | #endif | ||||
#define UI_MAX_KIND 16 | #define UI_MAX_KIND 16 | ||||