Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
I
ImGuiTest
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Déploiement
Releases
Registre de conteneur
Registre de modèles
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Ce projet est archivé. Le dépôt et les autres ressources du projet sont en lecture seule.
Afficher davantage de fils d'Ariane
Kubat
ImGuiTest
Validations
bb3b4356
Vérifiée
Valider
bb3b4356
rédigé
4 years ago
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
Small update
parent
7eb22890
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
3
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
3 fichiers modifiés
MainWindow.cpp
+17
-17
17 ajouts, 17 suppressions
MainWindow.cpp
MainWindow.h
+4
-0
4 ajouts, 0 suppression
MainWindow.h
imgui.ini
+12
-8
12 ajouts, 8 suppressions
imgui.ini
avec
33 ajouts
et
25 suppressions
MainWindow.cpp
+
17
−
17
Voir le fichier @
bb3b4356
...
...
@@ -138,28 +138,25 @@ MainWindow::HandleRender(void)
// Rendering
ImGui
::
Render
();
/* Always redraw */
int
w
,
h
;
int
__one__one
=
1
;
SDL_GetWindowSize
(
window
,
&
w
,
&
h
);
mpv_opengl_fbo
fbo
=
{
.
fbo
=
0
,
.
w
=
w
,
.
h
=
h
,
};
mpv_render_param
params
[]
=
{
{
MPV_RENDER_PARAM_OPENGL_FBO
,
&
fbo
},
{
MPV_RENDER_PARAM_FLIP_Y
,
&
__one__one
},
{(
mpv_render_param_type
)
0
}
};
// mpv_render_context_render(mpv_gl, params);
SDL_Window
*
backup_current_window
=
SDL_GL_GetCurrentWindow
();
SDL_GLContext
backup_current_context
=
SDL_GL_GetCurrentContext
();
ImGui
::
UpdatePlatformWindows
();
ImGui
::
RenderPlatformWindowsDefault
();
SDL_GL_MakeCurrent
(
backup_current_window
,
backup_current_context
);
mpv_render_context_render
(
mpv_gl
,
params
);
{
int
w
,
h
;
SDL_GetWindowSize
(
window
,
&
w
,
&
h
);
fbo
=
{
.
fbo
=
0
,
.
w
=
w
,
.
h
=
h
,
};
params
[
0
]
=
{
MPV_RENDER_PARAM_OPENGL_FBO
,
&
fbo
};
params
[
1
]
=
{
MPV_RENDER_PARAM_FLIP_Y
,
&
__fbo_one
};
params
[
2
]
=
{(
mpv_render_param_type
)
0
};
mpv_render_context_render
(
mpv_gl
,
params
);
}
ImGui_ImplOpenGL3_RenderDrawData
(
ImGui
::
GetDrawData
());
...
...
@@ -236,6 +233,9 @@ MainWindow::HandleLayers(void)
ImGui_ImplSDL2_NewFrame
(
window
);
ImGui
::
NewFrame
();
// ImGuiID dockspace_id = ImGui::GetID("MyDockSpace");
// ImGui::DockSpace(dockspace_id, ImVec2(0.0f, 0.0f));
// 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
if
(
show_demo_window
)
ImGui
::
ShowDemoWindow
(
&
show_demo_window
);
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
MainWindow.h
+
4
−
0
Voir le fichier @
bb3b4356
...
...
@@ -26,6 +26,10 @@ private:
bool
done
;
int
__fbo_one
=
1
;
mpv_opengl_fbo
fbo
;
mpv_render_param
params
[
3
];
static
Uint32
wakeup_on_mpv_render_update
,
wakeup_on_mpv_events
;
/* Need to be static */
static
std
::
shared_ptr
<
MainWindow
>
self
;
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
imgui.ini
+
12
−
8
Voir le fichier @
bb3b4356
[Window][Debug##Default]
Pos
=
6
0,60
Size
=
400,400
Pos
=
6
29,35
Size
=
1219,824
Collapsed
=
0
[Window][Hello, world!]
ViewportPos
=
165,1
ViewportId
=
0xEBE6C6E6
Size
=
630,377
Pos
=
1450,62
Size
=
390,789
Collapsed
=
0
[Window][Dear ImGui Demo]
ViewportPos
=
1160,4
ViewportId
=
0xE927CF2F
Size
=
738,485
Pos
=
213,94
Size
=
418,784
Collapsed
=
0
[Window][Another Window]
...
...
@@ -80,5 +78,11 @@ Pos=503,51
Size
=
771,465
Collapsed
=
0
[Window][Render]
Pos
=
25,17
Size
=
349,1016
Collapsed
=
0
[Docking][Data]
DockSpace
ID
=
0xF852211D Pos=637,80 Size=1203,789 CentralNode=1
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter