Changes: - Add GLAD dependency via vcpkg for proper OpenGL function loading - Force NVIDIA GPU usage with game-style exports (NvOptimusEnablement) - Create working console version (SecondVoice_Console.exe) - Add dual executable build (UI + Console versions) - Update to OpenGL 4.6 Core Profile with GLSL 460 - Add GPU detection and logging - Fix GLFW header conflicts with GLFW_INCLUDE_NONE Note: OpenGL shaders still failing to compile despite GLAD integration. Console version is fully functional for audio capture and translation. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
49 lines
1.1 KiB
C++
49 lines
1.1 KiB
C++
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
#define GLFW_INCLUDE_NONE // Don't include OpenGL headers (GLAD provides them)
|
|
#include <GLFW/glfw3.h>
|
|
|
|
namespace secondvoice {
|
|
|
|
struct TranslationMessage {
|
|
std::string chinese;
|
|
std::string french;
|
|
};
|
|
|
|
class TranslationUI {
|
|
public:
|
|
TranslationUI(int width, int height);
|
|
~TranslationUI();
|
|
|
|
bool initialize();
|
|
void render();
|
|
bool shouldClose() const;
|
|
|
|
void addTranslation(const std::string& chinese, const std::string& french);
|
|
bool isStopRequested() const { return stop_requested_; }
|
|
void resetStopRequest() { stop_requested_ = false; }
|
|
|
|
void setRecordingDuration(int seconds) { recording_duration_ = seconds; }
|
|
void setProcessingStatus(const std::string& status) { processing_status_ = status; }
|
|
|
|
private:
|
|
void renderTranslations();
|
|
void renderControls();
|
|
void renderStatus();
|
|
|
|
int width_;
|
|
int height_;
|
|
GLFWwindow* window_ = nullptr;
|
|
|
|
std::vector<TranslationMessage> messages_;
|
|
bool stop_requested_ = false;
|
|
bool auto_scroll_ = true;
|
|
|
|
int recording_duration_ = 0;
|
|
std::string processing_status_;
|
|
};
|
|
|
|
} // namespace secondvoice
|