Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
José Pardo Madera
/
pag_practicas_2025
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
0b1250b5
authored
Sep 25, 2025
by
José Pardo Madera
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
Comentado mensajes de log en callbacks
parent
b2fbdb1f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
main.cpp
main.cpp
View file @
0b1250b5
...
...
@@ -28,28 +28,28 @@ void window_refresh_callback(GLFWwindow *window) {
glfwSwapBuffers
(
window
);
PAG
::
log
<<
"Refresh callback called"
<<
std
::
endl
;
//
PAG::log << "Refresh callback called" << std::endl;
}
void
framebuffer_size_callback
(
GLFWwindow
*
window
,
int
width
,
int
height
)
{
PAG
::
Renderer
::
getInstance
().
setViewport
(
width
,
height
);
PAG
::
log
<<
"Resize callback called. New size: "
<<
width
<<
", "
<<
height
<<
std
::
endl
;
//
PAG::log << "Resize callback called. New size: " << width << ", " << height << std::endl;
}
void
key_callback
(
GLFWwindow
*
window
,
int
key
,
int
scancode
,
int
action
,
int
mods
)
{
if
(
key
==
GLFW_KEY_ESCAPE
&&
action
==
GLFW_PRESS
)
{
glfwSetWindowShouldClose
(
window
,
GLFW_TRUE
);
}
PAG
::
log
<<
"Key callback called"
<<
std
::
endl
;
//
PAG::log << "Key callback called" << std::endl;
}
void
mouse_button_callback
(
GLFWwindow
*
window
,
int
button
,
int
action
,
int
mods
)
{
if
(
action
==
GLFW_PRESS
)
{
PAG
::
log
<<
"Pulsado el botón: mouse "
<<
button
<<
std
::
endl
;
//
PAG::log << "Pulsado el botón: mouse " << button << std::endl;
PAG
::
GUI
::
getInstance
().
addMouseButtonEvent
(
button
,
true
);
}
else
if
(
action
==
GLFW_RELEASE
)
{
PAG
::
log
<<
"Soltado el botón: mouse "
<<
button
<<
std
::
endl
;
//
PAG::log << "Soltado el botón: mouse " << button << std::endl;
PAG
::
GUI
::
getInstance
().
addMouseButtonEvent
(
button
,
false
);
}
}
...
...
@@ -57,9 +57,11 @@ void mouse_button_callback(GLFWwindow *window, int button, int action, int mods)
void
scroll_callback
(
GLFWwindow
*
window
,
double
xoffset
,
double
yoffset
)
{
static
double
position_in_gradient
=
0
;
/*
PAG::log << "Movida la rueda del raton "
<< xoffset << " unidades en horizontal y "
<< yoffset << " unidades en vertical" << std::endl;
*/
}
int
main
()
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment