projects
/
fishladder.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
all campaign levels are done
[fishladder.git]
/
vg
/
vg.h
diff --git
a/vg/vg.h
b/vg/vg.h
index 2c86d4d3b596749469f7550c84947acca1118f6e..5d67f714807264699dbda5a33984ffe6e7f2cbba 100644
(file)
--- a/
vg/vg.h
+++ b/
vg/vg.h
@@
-35,8
+35,12
@@
m3x3f vg_pv;
// Engine globals
GLFWwindow* vg_window;
// Engine globals
GLFWwindow* vg_window;
-int vg_window_x = 1280;
-int vg_window_y = 720;
+
+// 1366, 768
+// 1920, 1080
+
+int vg_window_x = 1366;
+int vg_window_y = 768;
v2f vg_mouse;
v3f vg_mouse_ws;
v2f vg_mouse;
v3f vg_mouse_ws;
@@
-150,6
+154,7
@@
static void vg_init( int argc, char *argv[], const char *window_name )
glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, 3 );
glfwWindowHint( GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE );
glfwWindowHint( GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE );
glfwWindowHint( GLFW_CONTEXT_VERSION_MINOR, 3 );
glfwWindowHint( GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE );
glfwWindowHint( GLFW_OPENGL_DEBUG_CONTEXT, GL_TRUE );
+ glfwWindowHint( GLFW_RESIZABLE, GLFW_FALSE );
glfwWindowHint( GLFW_SAMPLES, 4 );
glfwWindowHint( GLFW_SAMPLES, 4 );
@@
-248,24
+253,14
@@
static void vg_init( int argc, char *argv[], const char *window_name )
{
ui_begin( &ui_global_ctx, vg_window_x, vg_window_y );
{
ui_begin( &ui_global_ctx, vg_window_x, vg_window_y );
-
- // TODO: Find a more elegent form for this
- int mouse_state = 0;
- if( vg_get_button( "primary" ) ) mouse_state = 2;
- if( vg_get_button_down( "primary" ) ) mouse_state = 1;
- if( vg_get_button_up( "primary" ) ) mouse_state = 3;
-
- ui_set_mouse( &ui_global_ctx, vg_mouse[0], vg_mouse[1], mouse_state );
+ ui_set_mouse( &ui_global_ctx, vg_mouse[0], vg_mouse[1], vg_get_button_state( "primary" ) );
vg_ui();
vg_console_draw();
vg_debugtools_draw();
ui_resolve( &ui_global_ctx );
vg_ui();
vg_console_draw();
vg_debugtools_draw();
ui_resolve( &ui_global_ctx );
- m3x3f view = M3X3_IDENTITY;
- m3x3_translate( view, (v3f){ -1.0f, 1.0f, 0.0f } );
- m3x3_scale( view, (v3f){ 1.0f/((float)vg_window_x*0.5f), -1.0f/((float)vg_window_y*0.5f), 1.0f } );
- ui_draw( &ui_global_ctx );
+ ui_draw( &ui_global_ctx, NULL );
}
glfwSwapBuffers( vg_window );
}
glfwSwapBuffers( vg_window );