mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-09-12 13:28:36 +00:00
Rename AppData to AppState
This commit is contained in:
@@ -11,7 +11,7 @@ class TestCase;
|
||||
class Sample;
|
||||
class InputGeom;
|
||||
|
||||
struct AppData
|
||||
struct AppState
|
||||
{
|
||||
SDL_Window* window;
|
||||
SDL_GLContext glContext;
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "AppState.h"
|
||||
|
||||
#include <imgui.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#include "AppData.h"
|
||||
|
||||
extern AppData app;
|
||||
extern AppState app;
|
||||
|
||||
inline void DrawScreenspaceText(float x, float y, ImU32 color, const char* text, bool centered = false)
|
||||
{
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include "AppData.h"
|
||||
|
||||
#include "AppState.h"
|
||||
#include "InputGeom.h"
|
||||
#include "Sample.h"
|
||||
|
||||
#include "SDL_opengl.h"
|
||||
#include "Sample.h"
|
||||
|
||||
#ifdef __APPLE__
|
||||
# include <OpenGL/glu.h>
|
||||
@@ -13,7 +11,7 @@
|
||||
|
||||
#include <imgui.h>
|
||||
|
||||
void AppData::resetCamera()
|
||||
void AppState::resetCamera()
|
||||
{
|
||||
// Reset camera and fog to match the mesh bounds.
|
||||
if (inputGeometry)
|
||||
@@ -38,7 +36,7 @@ void AppData::resetCamera()
|
||||
glFogf(GL_FOG_END, camr * 1.25f);
|
||||
}
|
||||
|
||||
void AppData::updateWindowSize()
|
||||
void AppState::updateWindowSize()
|
||||
{
|
||||
SDL_GetWindowSize(window, &width, &height);
|
||||
SDL_GL_GetDrawableSize(window, &drawableWidth, &drawableHeight);
|
||||
@@ -52,7 +50,7 @@ void AppData::updateWindowSize()
|
||||
glGetDoublev(GL_PROJECTION_MATRIX, projectionMatrix);
|
||||
}
|
||||
|
||||
void AppData::updateUIScale() const
|
||||
void AppState::updateUIScale() const
|
||||
{
|
||||
ImGuiIO& io = ImGui::GetIO();
|
||||
io.DisplaySize = ImVec2(static_cast<float>(width), static_cast<float>(height));
|
||||
@@ -61,7 +59,7 @@ void AppData::updateUIScale() const
|
||||
static_cast<float>(drawableHeight) / static_cast<float>(height));
|
||||
}
|
||||
|
||||
void AppData::worldToScreen(float x, float y, float z, float* screenX, float* screenY) const
|
||||
void AppState::worldToScreen(float x, float y, float z, float* screenX, float* screenY) const
|
||||
{
|
||||
GLdouble modelviewMatrix[16];
|
||||
glGetDoublev(GL_MODELVIEW_MATRIX, modelviewMatrix);
|
||||
@@ -16,7 +16,7 @@
|
||||
// 3. This notice may not be removed or altered from any source distribution.
|
||||
//
|
||||
|
||||
#include "AppData.h"
|
||||
#include "AppState.h"
|
||||
#include "InputGeom.h"
|
||||
#include "SDL.h"
|
||||
#include "SDL_keycode.h"
|
||||
@@ -28,13 +28,13 @@
|
||||
#include "TestCase.h"
|
||||
#include "imguiHelpers.h"
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
|
||||
#include <imgui.h>
|
||||
#include <imgui_impl_opengl2.h>
|
||||
#include <imgui_impl_sdl2.h>
|
||||
#include <implot.h>
|
||||
|
||||
#include <functional>
|
||||
#include <string>
|
||||
#ifdef __APPLE__
|
||||
# include <OpenGL/glu.h>
|
||||
#else
|
||||
@@ -68,7 +68,7 @@ constexpr ImGuiWindowFlags staticWindowFlags = ImGuiWindowFlags_NoMove
|
||||
| ImGuiWindowFlags_NoCollapse;
|
||||
}
|
||||
|
||||
AppData app;
|
||||
AppState app;
|
||||
|
||||
int main(int /*argc*/, char** /*argv*/)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user