Add comprehensive IDataTree configuration system
- Create modular IDataNode interface with tree navigation, pattern matching, and typed access - Implement IDataTree container with manual hot-reload capabilities - Add DataTreeFactory for flexible data source management - Support hierarchical data with per-node blobs and children - Enable pattern matching search (*wildcards) across entire subtrees - Provide type-safe property access (getString, getInt, getBool, getDouble) - Include hash system for validation and synchronization (getDataHash, getTreeHash) - Add property-based queries with lambda predicates for gameplay data filtering - Fix window positioning system to eliminate UI overlaps - Enforce explicit type declarations (ban auto keyword) in CLAUDE.md coding standards 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
37
CLAUDE.md
@ -195,6 +195,23 @@ cmake . && make warfactory-core # Build core engine
|
||||
make warfactory-modules # Build all modules
|
||||
```
|
||||
|
||||
### UI Testing Commands
|
||||
```bash
|
||||
# Build UI tests
|
||||
cmake -B build && cmake --build build # Debug with AddressSanitizer
|
||||
cmake -B build_release -DCMAKE_BUILD_TYPE=Release && cmake --build build_release # Clean release
|
||||
|
||||
# Run UI tests
|
||||
./bin/test_imgui_ui # Interactive mode (DEFAULT - no auto-exit)
|
||||
./bin/test_imgui_ui --headless # Quick test mode (auto-exit after 3s)
|
||||
./bin/test_imgui_ui --max-frames 300 # Custom frame limit (overrides interactive)
|
||||
./bin/test_imgui_ui --interactive # Explicit interactive mode (no auto-exit)
|
||||
./bin/test_imgui_ui --help # Show usage options
|
||||
|
||||
# For Claude Code testing
|
||||
./bin/test_imgui_ui --headless # Use this for quick validation tests
|
||||
```
|
||||
|
||||
### Project Structure
|
||||
```
|
||||
├── modules/ # Autonomous hot-reloadable modules
|
||||
@ -296,6 +313,24 @@ The project includes 16 C++ libraries via FetchContent:
|
||||
- **Compiler Hardening**: Stack protection, frame pointers, maximum debug info
|
||||
- **Memory Safety**: Smart pointers, RAII patterns, leak detection
|
||||
|
||||
## 🚫 **CRITICAL CODE RESTRICTIONS**
|
||||
|
||||
### AUTO KEYWORD PROHIBITION
|
||||
**STRICTLY FORBIDDEN**: The `auto` keyword is banned as a type in this codebase.
|
||||
- **NEVER use**: `auto variable = value;`
|
||||
- **ALWAYS use**: `ExplicitType variable = value;`
|
||||
- **Reason**: Explicit types improve code readability, reduce debugging complexity, and prevent type-related errors
|
||||
- **Examples**:
|
||||
```cpp
|
||||
// ❌ FORBIDDEN - will not compile
|
||||
auto config = getConfiguration();
|
||||
auto nodes = config->getChildNodes();
|
||||
|
||||
// ✅ REQUIRED - explicit types
|
||||
std::unique_ptr<IConfiguration> config = getConfiguration();
|
||||
std::vector<std::unique_ptr<IConfigNode>> nodes = config->getChildNodes();
|
||||
```
|
||||
|
||||
## Quick Reference
|
||||
|
||||
### For Understanding the Project
|
||||
@ -304,7 +339,7 @@ The project includes 16 C++ libraries via FetchContent:
|
||||
3. `02-systems/gameplay-industriel.md` - Core gameplay
|
||||
|
||||
### For Development
|
||||
1. **`CLAUDE-HOT-RELOAD-GUIDE.md`** - **ESSENTIAL**: Blazing 0.4ms hot-reload system guide
|
||||
1. **`docs/03-implementation/CLAUDE-HOT-RELOAD-GUIDE.md`** - **ESSENTIAL**: Blazing 0.4ms hot-reload system guide
|
||||
2. `01-architecture/claude-code-integration.md` - AI development workflow
|
||||
3. `03-implementation/testing-strategy.md` - Testing approach
|
||||
4. `04-reference/INTEGRATION-MASTER-LIST.md` - Complete specifications
|
||||
|
||||
@ -3,8 +3,11 @@ project(ImGuiUI_Test)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
|
||||
# 🔧 DEVELOPMENT MODE - Enable all debugging tools
|
||||
set(CMAKE_BUILD_TYPE Debug)
|
||||
# 🚫 CRITICAL: Prohibit 'auto' keyword as type (explicit types required)
|
||||
# Applied only to project files, not external dependencies
|
||||
|
||||
# 🔧 DEVELOPMENT MODE - Enable all debugging tools (can be overridden)
|
||||
# set(CMAKE_BUILD_TYPE Debug) # Commented out to allow Release builds
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-fsanitize=address -fsanitize=undefined -g -O0 -Wall -Wextra")
|
||||
set(CMAKE_C_FLAGS_DEBUG "-fsanitize=address -fsanitize=undefined -g -O0 -Wall -Wextra")
|
||||
|
||||
@ -55,11 +58,11 @@ target_link_libraries(imgui_backends PUBLIC glfw OpenGL::GL)
|
||||
# Test executable
|
||||
add_executable(test_imgui_ui
|
||||
test_imgui_ui.cpp
|
||||
core/src/ImGuiUI.cpp
|
||||
src/core/src/ImGuiUI.cpp
|
||||
)
|
||||
|
||||
target_include_directories(test_imgui_ui PRIVATE
|
||||
core/include
|
||||
src/core/include
|
||||
${imgui_SOURCE_DIR}
|
||||
${imgui_SOURCE_DIR}/backends
|
||||
)
|
||||
@ -71,7 +74,34 @@ target_link_libraries(test_imgui_ui
|
||||
OpenGL::GL
|
||||
)
|
||||
|
||||
# Note: Auto keyword restriction enforced via code review and linting tools
|
||||
|
||||
# Copy to build directory
|
||||
set_target_properties(test_imgui_ui PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
|
||||
# Test constraints executable
|
||||
add_executable(test_constraints
|
||||
test_constraints.cpp
|
||||
src/core/src/ImGuiUI.cpp
|
||||
)
|
||||
|
||||
target_include_directories(test_constraints PRIVATE
|
||||
src/core/include
|
||||
${imgui_SOURCE_DIR}
|
||||
${imgui_SOURCE_DIR}/backends
|
||||
)
|
||||
|
||||
target_link_libraries(test_constraints
|
||||
imgui_backends
|
||||
nlohmann_json::nlohmann_json
|
||||
glfw
|
||||
OpenGL::GL
|
||||
)
|
||||
|
||||
# Note: Auto keyword restriction enforced via code review and linting tools
|
||||
|
||||
set_target_properties(test_constraints PROPERTIES
|
||||
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin
|
||||
)
|
||||
@ -1,64 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(WarfactoryCore LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Load Warfactory defenses
|
||||
include(../cmake/WarfactoryDefenses.cmake)
|
||||
include(../cmake/WarfactoryAutomation.cmake)
|
||||
|
||||
# Output directories
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
|
||||
# Core includes
|
||||
include_directories(include)
|
||||
|
||||
# Core library with interfaces and implementations
|
||||
add_library(warfactory-core SHARED
|
||||
src/DebugEngine.cpp
|
||||
src/EngineFactory.cpp
|
||||
src/ModuleSystemFactory.cpp
|
||||
src/IOFactory.cpp
|
||||
src/ModuleFactory.cpp
|
||||
src/SequentialModuleSystem.cpp
|
||||
src/IntraIO.cpp
|
||||
)
|
||||
|
||||
target_include_directories(warfactory-core PUBLIC
|
||||
include
|
||||
)
|
||||
|
||||
# Main executable
|
||||
add_executable(warfactory-engine
|
||||
src/main.cpp
|
||||
)
|
||||
|
||||
# Hot-reload integration test
|
||||
add_executable(hot-reload-test
|
||||
src/hot_reload_test.cpp
|
||||
)
|
||||
|
||||
# Add dependencies to core library
|
||||
warfactory_add_dependencies(warfactory-core)
|
||||
|
||||
target_link_libraries(warfactory-engine
|
||||
PRIVATE warfactory-core
|
||||
)
|
||||
|
||||
target_link_libraries(hot-reload-test
|
||||
PRIVATE warfactory-core
|
||||
PRIVATE ${CMAKE_DL_LIBS}
|
||||
)
|
||||
|
||||
# Install rules
|
||||
install(TARGETS warfactory-core warfactory-engine
|
||||
LIBRARY DESTINATION lib
|
||||
RUNTIME DESTINATION bin
|
||||
)
|
||||
|
||||
install(DIRECTORY include/
|
||||
DESTINATION include
|
||||
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp"
|
||||
)
|
||||
@ -1,32 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.20)
|
||||
project(WarfactoryCore LANGUAGES CXX)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
# Output directories
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
|
||||
|
||||
# Core includes
|
||||
include_directories(include)
|
||||
|
||||
# Find nlohmann_json
|
||||
find_package(nlohmann_json QUIET)
|
||||
if(NOT nlohmann_json_FOUND)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(nlohmann_json
|
||||
URL https://github.com/nlohmann/json/releases/download/v3.11.3/json.tar.xz
|
||||
URL_HASH SHA256=d6c65aca6b1ed68e7a182f4757257b107ae403032760ed6ef121c9d55e81757d
|
||||
)
|
||||
FetchContent_MakeAvailable(nlohmann_json)
|
||||
endif()
|
||||
|
||||
# Minimal hot-reload test
|
||||
add_executable(minimal-hot-reload-test
|
||||
src/minimal_hot_reload_test.cpp
|
||||
)
|
||||
|
||||
target_link_libraries(minimal-hot-reload-test
|
||||
PRIVATE nlohmann_json::nlohmann_json
|
||||
PRIVATE ${CMAKE_DL_LIBS}
|
||||
)
|
||||
@ -1,9 +0,0 @@
|
||||
# Core Game Logic
|
||||
|
||||
Core game mechanics and shared systems for Warfactory.
|
||||
|
||||
## Structure
|
||||
- Game loop management
|
||||
- Shared data structures
|
||||
- Common utilities
|
||||
- Engine coordination
|
||||
@ -1,89 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <atomic>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "IEngine.h"
|
||||
#include "IModuleSystem.h"
|
||||
#include "IIO.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
/**
|
||||
* @brief Debug engine implementation with comprehensive logging
|
||||
*
|
||||
* DebugEngine provides maximum visibility into engine operations:
|
||||
* - Verbose logging of all operations
|
||||
* - Step-by-step execution capabilities
|
||||
* - Module isolation and debugging
|
||||
* - Performance metrics and timing
|
||||
* - IIO health monitoring and reporting
|
||||
* - Detailed socket management logging
|
||||
*/
|
||||
class DebugEngine : public IEngine {
|
||||
private:
|
||||
std::shared_ptr<spdlog::logger> logger;
|
||||
std::atomic<bool> running{false};
|
||||
std::atomic<bool> debugPaused{false};
|
||||
|
||||
// Module management
|
||||
std::vector<std::unique_ptr<IModuleSystem>> moduleSystems;
|
||||
std::vector<std::string> moduleNames;
|
||||
|
||||
// Socket management
|
||||
std::unique_ptr<IIO> coordinatorSocket;
|
||||
std::vector<std::unique_ptr<IIO>> clientSockets;
|
||||
|
||||
// Performance tracking
|
||||
std::chrono::high_resolution_clock::time_point lastFrameTime;
|
||||
std::chrono::high_resolution_clock::time_point engineStartTime;
|
||||
size_t frameCount = 0;
|
||||
|
||||
// Configuration
|
||||
json engineConfig;
|
||||
|
||||
// Helper methods
|
||||
void logEngineStart();
|
||||
void logEngineShutdown();
|
||||
void logFrameStart(float deltaTime);
|
||||
void logFrameEnd(float frameTime);
|
||||
void logModuleHealth();
|
||||
void logSocketHealth();
|
||||
void processModuleSystems(float deltaTime);
|
||||
void processClientMessages();
|
||||
void processCoordinatorMessages();
|
||||
float calculateDeltaTime();
|
||||
void validateConfiguration();
|
||||
|
||||
public:
|
||||
DebugEngine();
|
||||
virtual ~DebugEngine();
|
||||
|
||||
// IEngine implementation
|
||||
void initialize() override;
|
||||
void run() override;
|
||||
void step(float deltaTime) override;
|
||||
void shutdown() override;
|
||||
void loadModules(const std::string& configPath) override;
|
||||
void registerMainSocket(std::unique_ptr<IIO> coordinatorSocket) override;
|
||||
void registerNewClientSocket(std::unique_ptr<IIO> clientSocket) override;
|
||||
EngineType getType() const override;
|
||||
|
||||
// Debug-specific methods
|
||||
void pauseExecution();
|
||||
void resumeExecution();
|
||||
void stepSingleFrame();
|
||||
bool isPaused() const;
|
||||
json getDetailedStatus() const;
|
||||
void setLogLevel(spdlog::level::level_enum level);
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,105 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <spdlog/spdlog.h>
|
||||
|
||||
#include "IEngine.h"
|
||||
#include "DebugEngine.h"
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
/**
|
||||
* @brief Factory for creating engine implementations
|
||||
*
|
||||
* EngineFactory provides a centralized way to create different engine types
|
||||
* based on configuration or runtime requirements.
|
||||
*
|
||||
* Supported engine types:
|
||||
* - "debug" or "DEBUG" -> DebugEngine (maximum logging, step debugging)
|
||||
* - "production" or "PRODUCTION" -> ProductionEngine (future implementation)
|
||||
* - "high_performance" or "HIGH_PERFORMANCE" -> HighPerformanceEngine (future)
|
||||
*
|
||||
* Usage:
|
||||
* ```cpp
|
||||
* auto engine = EngineFactory::createEngine("debug");
|
||||
* auto engine = EngineFactory::createEngine(EngineType::DEBUG);
|
||||
* auto engine = EngineFactory::createFromConfig("config/engine.json");
|
||||
* ```
|
||||
*/
|
||||
class EngineFactory {
|
||||
public:
|
||||
/**
|
||||
* @brief Create engine from string type
|
||||
* @param engineType String representation of engine type
|
||||
* @return Unique pointer to engine implementation
|
||||
* @throws std::invalid_argument if engine type is unknown
|
||||
*/
|
||||
static std::unique_ptr<IEngine> createEngine(const std::string& engineType);
|
||||
|
||||
/**
|
||||
* @brief Create engine from enum type
|
||||
* @param engineType Engine type enum value
|
||||
* @return Unique pointer to engine implementation
|
||||
* @throws std::invalid_argument if engine type is not implemented
|
||||
*/
|
||||
static std::unique_ptr<IEngine> createEngine(EngineType engineType);
|
||||
|
||||
/**
|
||||
* @brief Create engine from configuration file
|
||||
* @param configPath Path to JSON configuration file
|
||||
* @return Unique pointer to engine implementation
|
||||
* @throws std::runtime_error if config file cannot be read
|
||||
* @throws std::invalid_argument if engine type in config is invalid
|
||||
*
|
||||
* Expected config format:
|
||||
* ```json
|
||||
* {
|
||||
* "engine": {
|
||||
* "type": "debug",
|
||||
* "log_level": "trace",
|
||||
* "features": {
|
||||
* "step_debugging": true,
|
||||
* "performance_monitoring": true
|
||||
* }
|
||||
* }
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
static std::unique_ptr<IEngine> createFromConfig(const std::string& configPath);
|
||||
|
||||
/**
|
||||
* @brief Get list of available engine types
|
||||
* @return Vector of supported engine type strings
|
||||
*/
|
||||
static std::vector<std::string> getAvailableEngineTypes();
|
||||
|
||||
/**
|
||||
* @brief Check if engine type is supported
|
||||
* @param engineType Engine type string to check
|
||||
* @return True if engine type is supported
|
||||
*/
|
||||
static bool isEngineTypeSupported(const std::string& engineType);
|
||||
|
||||
/**
|
||||
* @brief Get engine type from string (case-insensitive)
|
||||
* @param engineTypeStr String representation of engine type
|
||||
* @return EngineType enum value
|
||||
* @throws std::invalid_argument if string is not a valid engine type
|
||||
*/
|
||||
static EngineType parseEngineType(const std::string& engineTypeStr);
|
||||
|
||||
/**
|
||||
* @brief Convert engine type enum to string
|
||||
* @param engineType Engine type enum value
|
||||
* @return String representation of engine type
|
||||
*/
|
||||
static std::string engineTypeToString(EngineType engineType);
|
||||
|
||||
private:
|
||||
static std::shared_ptr<spdlog::logger> getFactoryLogger();
|
||||
static std::string toLowercase(const std::string& str);
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,125 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
// Forward declarations to avoid circular dependencies
|
||||
namespace warfactory {
|
||||
class IModuleSystem;
|
||||
}
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
enum class EngineType {
|
||||
DEBUG = 0,
|
||||
PRODUCTION = 1,
|
||||
HIGH_PERFORMANCE = 2
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Engine orchestration interface - coordinates the entire system
|
||||
*
|
||||
* The engine is responsible for:
|
||||
* - System initialization and lifecycle management
|
||||
* - Main game loop coordination with delta time updates
|
||||
* - Module system orchestration
|
||||
* - IIO health monitoring and backpressure management
|
||||
*
|
||||
* IMPORTANT: Engine implementations must periodically check IIO health:
|
||||
* - Monitor IOHealth.queueSize vs maxQueueSize (warn at 80% full)
|
||||
* - Track IOHealth.dropping status (critical - consider module restart)
|
||||
* - Log IOHealth.droppedMessageCount for debugging
|
||||
* - Monitor IOHealth.averageProcessingRate for performance analysis
|
||||
*
|
||||
* Evolution path:
|
||||
* - DebugEngine: Development/testing with step-by-step execution
|
||||
* - HighPerfEngine: Production optimized with threading
|
||||
* - DataOrientedEngine: Massive scale with SIMD and clustering
|
||||
*/
|
||||
class IEngine {
|
||||
public:
|
||||
virtual ~IEngine() = default;
|
||||
|
||||
/**
|
||||
* @brief Initialize engine systems
|
||||
*
|
||||
* Sets up the engine with basic configuration.
|
||||
* Module system and other components are set separately.
|
||||
*/
|
||||
virtual void initialize() = 0;
|
||||
|
||||
/**
|
||||
* @brief Start main game loop
|
||||
*
|
||||
* Blocks until shutdown() called. Engine owns the main loop and handles:
|
||||
* - Frame timing and delta time calculation
|
||||
* - Module system coordination
|
||||
* - Performance management and frame rate control
|
||||
*/
|
||||
virtual void run() = 0;
|
||||
|
||||
/**
|
||||
* @brief Process single frame/tick (for debugging)
|
||||
* @param deltaTime Time elapsed since last update in seconds
|
||||
*
|
||||
* For step debugging and testing. Processes one iteration
|
||||
* without entering the main loop.
|
||||
*/
|
||||
virtual void step(float deltaTime) = 0;
|
||||
|
||||
/**
|
||||
* @brief Shutdown engine and cleanup all resources
|
||||
*
|
||||
* Ensures proper cleanup of all systems in correct order.
|
||||
* Should be safe to call multiple times. Stops run() loop.
|
||||
*/
|
||||
virtual void shutdown() = 0;
|
||||
|
||||
/**
|
||||
* @brief Load modules from configuration
|
||||
* @param configPath Path to module configuration file
|
||||
*
|
||||
* Engine automatically:
|
||||
* - Loads modules from .so/.dll files
|
||||
* - Creates appropriate ModuleSystem for each module (performance strategy)
|
||||
* - Configures execution frequency and coordination
|
||||
*
|
||||
* Config format:
|
||||
* {
|
||||
* "modules": [
|
||||
* {"path": "tank.so", "strategy": "threaded", "frequency": "60hz"},
|
||||
* {"path": "economy.so", "strategy": "sequential", "frequency": "0.1hz"}
|
||||
* ]
|
||||
* }
|
||||
*/
|
||||
virtual void loadModules(const std::string& configPath) = 0;
|
||||
|
||||
/**
|
||||
* @brief Register main coordinator socket
|
||||
* @param coordinatorSocket Socket for system coordination communication
|
||||
*
|
||||
* Engine uses this socket for high-level system coordination,
|
||||
* health monitoring, and administrative commands.
|
||||
*/
|
||||
virtual void registerMainSocket(std::unique_ptr<IIO> coordinatorSocket) = 0;
|
||||
|
||||
/**
|
||||
* @brief Register new client/player socket
|
||||
* @param clientSocket Socket for player communication
|
||||
*
|
||||
* Engine manages player connections as a priority channel.
|
||||
* Players are the most important external connections.
|
||||
*/
|
||||
virtual void registerNewClientSocket(std::unique_ptr<IIO> clientSocket) = 0;
|
||||
|
||||
/**
|
||||
* @brief Get engine type identifier
|
||||
* @return Engine type enum value for identification
|
||||
*/
|
||||
virtual EngineType getType() const = 0;
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,102 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <functional>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
enum class IOType {
|
||||
INTRA = 0, // Same process
|
||||
LOCAL = 1, // Same machine
|
||||
NETWORK = 2 // TCP/WebSocket
|
||||
};
|
||||
|
||||
struct SubscriptionConfig {
|
||||
bool replaceable = false; // Replace vs accumulate for low-freq
|
||||
int batchInterval = 30000; // ms for low-freq batching
|
||||
int maxBatchSize = 100; // Max messages per batch
|
||||
bool compress = false; // Compress batched data
|
||||
};
|
||||
|
||||
struct Message {
|
||||
std::string topic;
|
||||
json data;
|
||||
uint64_t timestamp;
|
||||
};
|
||||
|
||||
struct IOHealth {
|
||||
int queueSize;
|
||||
int maxQueueSize;
|
||||
bool dropping = false; // Started dropping messages?
|
||||
float averageProcessingRate; // Messages/second processed by module
|
||||
int droppedMessageCount = 0; // Total dropped since last check
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Pub/Sub communication interface with pull-based synchronous design
|
||||
*
|
||||
* Pull-based pub/sub system optimized for game modules. Modules have full control
|
||||
* over when they process messages, avoiding threading issues.
|
||||
*
|
||||
* Features:
|
||||
* - Topic patterns with wildcards (e.g., "player:*", "economy:*")
|
||||
* - Low-frequency subscriptions for bandwidth optimization
|
||||
* - Message consumption (pull removes message from queue)
|
||||
* - Engine health monitoring for backpressure management
|
||||
*/
|
||||
class IIO {
|
||||
public:
|
||||
virtual ~IIO() = default;
|
||||
|
||||
/**
|
||||
* @brief Publish message to a topic
|
||||
* @param topic Topic name (e.g., "player:123", "economy:prices")
|
||||
* @param message JSON message data
|
||||
*/
|
||||
virtual void publish(const std::string& topic, const json& message) = 0;
|
||||
|
||||
/**
|
||||
* @brief Subscribe to topic pattern (high-frequency)
|
||||
* @param topicPattern Topic pattern with wildcards (e.g., "player:*")
|
||||
* @param config Optional subscription configuration
|
||||
*/
|
||||
virtual void subscribe(const std::string& topicPattern, const SubscriptionConfig& config = {}) = 0;
|
||||
|
||||
/**
|
||||
* @brief Subscribe to topic pattern (low-frequency batched)
|
||||
* @param topicPattern Topic pattern with wildcards
|
||||
* @param config Subscription configuration (batchInterval, etc.)
|
||||
*/
|
||||
virtual void subscribeLowFreq(const std::string& topicPattern, const SubscriptionConfig& config = {}) = 0;
|
||||
|
||||
/**
|
||||
* @brief Get count of pending messages
|
||||
* @return Number of messages waiting to be pulled
|
||||
*/
|
||||
virtual int hasMessages() const = 0;
|
||||
|
||||
/**
|
||||
* @brief Pull and consume one message
|
||||
* @return Message from queue (oldest first). Message is removed from queue.
|
||||
* @throws std::runtime_error if no messages available
|
||||
*/
|
||||
virtual Message pullMessage() = 0;
|
||||
|
||||
/**
|
||||
* @brief Get IO health status for Engine monitoring
|
||||
* @return Health metrics including queue size, drop status, processing rate
|
||||
*/
|
||||
virtual IOHealth getHealth() const = 0;
|
||||
|
||||
/**
|
||||
* @brief Get IO type identifier
|
||||
* @return IO type enum value for identification
|
||||
*/
|
||||
virtual IOType getType() const = 0;
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,123 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
// Forward declarations
|
||||
namespace warfactory {
|
||||
class IIO;
|
||||
class ITaskScheduler;
|
||||
}
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
/**
|
||||
* @brief Task scheduling interface for module delegation
|
||||
*
|
||||
* Allows modules to delegate tasks to their execution system without
|
||||
* knowing the underlying implementation (sequential, threaded, thread pool).
|
||||
*/
|
||||
class ITaskScheduler {
|
||||
public:
|
||||
virtual ~ITaskScheduler() = default;
|
||||
|
||||
/**
|
||||
* @brief Schedule a task for execution
|
||||
* @param taskType Type of task (e.g., "pathfinding", "collision_check")
|
||||
* @param taskData JSON data for the task
|
||||
*/
|
||||
virtual void scheduleTask(const std::string& taskType, const json& taskData) = 0;
|
||||
|
||||
/**
|
||||
* @brief Check if completed tasks are available
|
||||
* @return Number of completed tasks ready to be pulled
|
||||
*/
|
||||
virtual int hasCompletedTasks() const = 0;
|
||||
|
||||
/**
|
||||
* @brief Pull and consume one completed task
|
||||
* @return Task result JSON. Task is removed from completed queue.
|
||||
*/
|
||||
virtual json getCompletedTask() = 0;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief Pure business logic interface - optimized for Claude Code development
|
||||
*
|
||||
* This interface defines the contract for all game modules. Each module contains
|
||||
* 200-300 lines of pure game logic with zero infrastructure code.
|
||||
*
|
||||
* Key design principles:
|
||||
* - PURE FUNCTION: process() method has no side effects beyond return value
|
||||
* - JSON ONLY: All communication via JSON input/output
|
||||
* - NO INFRASTRUCTURE: No threading, networking, or framework dependencies
|
||||
* - HOT-RELOAD READY: State serialization for seamless module replacement
|
||||
* - CLAUDE OPTIMIZED: Micro-context size for AI development efficiency
|
||||
*
|
||||
* Module constraint: Maximum 300 lines per module (Exception: ProductionModule 500-800 lines)
|
||||
*/
|
||||
class IModule {
|
||||
public:
|
||||
virtual ~IModule() = default;
|
||||
|
||||
/**
|
||||
* @brief Process game logic
|
||||
* @param input JSON input from other modules or the module system
|
||||
*
|
||||
* This is the core method where all module logic is implemented.
|
||||
* Modules communicate via IIO pub/sub and can delegate tasks via ITaskScheduler.
|
||||
* Must handle state properly through getState/setState for hot-reload.
|
||||
*/
|
||||
virtual void process(const json& input) = 0;
|
||||
|
||||
/**
|
||||
* @brief Initialize module with configuration and services
|
||||
* @param config JSON configuration specific to this module
|
||||
* @param io Pub/sub communication interface for messaging
|
||||
* @param scheduler Task scheduling interface for delegating work
|
||||
*
|
||||
* Called once when the module is first loaded. Should setup any
|
||||
* internal state, validate configuration, and store service references.
|
||||
*/
|
||||
virtual void initialize(const json& config, IIO* io, ITaskScheduler* scheduler) = 0;
|
||||
|
||||
/**
|
||||
* @brief Cleanup and shutdown the module
|
||||
*
|
||||
* Called when the module is being unloaded. Should clean up any
|
||||
* resources and prepare for safe destruction.
|
||||
*/
|
||||
virtual void shutdown() = 0;
|
||||
|
||||
/**
|
||||
* @brief Get current module state for hot-reload support
|
||||
* @return JSON representation of all module state
|
||||
*
|
||||
* Critical for hot-reload functionality. Must serialize all internal
|
||||
* state that needs to be preserved when the module is replaced.
|
||||
* The returned JSON should be sufficient to restore the module to
|
||||
* its current state via setState().
|
||||
*/
|
||||
virtual json getState() = 0;
|
||||
|
||||
/**
|
||||
* @brief Restore module state after hot-reload
|
||||
* @param state JSON state previously returned by getState()
|
||||
*
|
||||
* Called after module replacement to restore the previous state.
|
||||
* Must be able to reconstruct all internal state from the JSON
|
||||
* to ensure seamless hot-reload without game disruption.
|
||||
*/
|
||||
virtual void setState(const json& state) = 0;
|
||||
|
||||
/**
|
||||
* @brief Get module type identifier
|
||||
* @return Module type as string (e.g., "tank", "economy", "production")
|
||||
*/
|
||||
virtual std::string getType() const = 0;
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,120 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <memory>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
// Forward declarations to avoid circular dependencies
|
||||
namespace warfactory {
|
||||
class IModule;
|
||||
class IIO;
|
||||
}
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
enum class ModuleSystemType {
|
||||
SEQUENTIAL = 0,
|
||||
THREADED = 1,
|
||||
THREAD_POOL = 2,
|
||||
CLUSTER = 3
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Task scheduling interface for module delegation
|
||||
*/
|
||||
class ITaskScheduler {
|
||||
public:
|
||||
virtual ~ITaskScheduler() = default;
|
||||
|
||||
/**
|
||||
* @brief Schedule a task for execution
|
||||
* @param taskType Type of task (e.g., "pathfinding", "collision_check")
|
||||
* @param taskData JSON data for the task
|
||||
*/
|
||||
virtual void scheduleTask(const std::string& taskType, const json& taskData) = 0;
|
||||
|
||||
/**
|
||||
* @brief Check if completed tasks are available
|
||||
* @return Number of completed tasks ready to be pulled
|
||||
*/
|
||||
virtual int hasCompletedTasks() const = 0;
|
||||
|
||||
/**
|
||||
* @brief Pull and consume one completed task
|
||||
* @return Task result JSON. Task is removed from completed queue.
|
||||
*/
|
||||
virtual json getCompletedTask() = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Module execution strategy interface - swappable performance architecture
|
||||
*
|
||||
* The module system manages module lifecycle and execution strategy.
|
||||
* Different implementations provide different performance characteristics:
|
||||
*
|
||||
* - SequentialModuleSystem: Debug/test mode, processes modules one at a time
|
||||
* - ThreadedModuleSystem: Each module in its own thread
|
||||
* - MultithreadedModuleSystem: Module tasks distributed across thread pool
|
||||
* - ClusterModuleSystem: Modules distributed across multiple machines
|
||||
*
|
||||
* This enables progressive evolution from debug to production to MMO scale
|
||||
* without changing any module business logic code.
|
||||
*
|
||||
* Inherits from ITaskScheduler to provide task delegation capabilities.
|
||||
*/
|
||||
class IModuleSystem : public ITaskScheduler {
|
||||
public:
|
||||
virtual ~IModuleSystem() = default;
|
||||
|
||||
/**
|
||||
* @brief Register a module with the system
|
||||
* @param name Unique identifier for the module
|
||||
* @param module Module implementation (unique ownership)
|
||||
*
|
||||
* The module system takes ownership of the module and manages its lifecycle.
|
||||
* Modules can be registered at any time and will participate in the next
|
||||
* processing cycle.
|
||||
*/
|
||||
virtual void registerModule(const std::string& name, std::unique_ptr<IModule> module) = 0;
|
||||
|
||||
/**
|
||||
* @brief Process all registered modules
|
||||
* @param deltaTime Time elapsed since last processing cycle in seconds
|
||||
*
|
||||
* This is the core execution method that coordinates all modules according
|
||||
* to the implemented strategy. Each module's process() method will be called
|
||||
* with appropriate timing and coordination.
|
||||
*/
|
||||
virtual void processModules(float deltaTime) = 0;
|
||||
|
||||
/**
|
||||
* @brief Set the IO layer for inter-module communication
|
||||
* @param ioLayer Communication transport implementation (unique ownership)
|
||||
*
|
||||
* The module system takes ownership of the IO layer and uses it to
|
||||
* facilitate communication between modules.
|
||||
*/
|
||||
virtual void setIOLayer(std::unique_ptr<IIO> ioLayer) = 0;
|
||||
|
||||
/**
|
||||
* @brief Query a specific module directly
|
||||
* @param name Name of the module to query
|
||||
* @param input JSON input to send to the module
|
||||
* @return JSON response from the module
|
||||
*
|
||||
* This provides direct access to module functionality for debugging,
|
||||
* testing, or administrative purposes. The query bypasses normal
|
||||
* execution flow and calls the module's process() method directly.
|
||||
*/
|
||||
virtual json queryModule(const std::string& name, const json& input) = 0;
|
||||
|
||||
/**
|
||||
* @brief Get module system type identifier
|
||||
* @return Module system type enum value for identification
|
||||
*/
|
||||
virtual ModuleSystemType getType() const = 0;
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,134 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "IIO.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
/**
|
||||
* @brief Factory for creating IO transport implementations
|
||||
*
|
||||
* IOFactory provides centralized creation of different communication transports:
|
||||
* - "intra" -> IntraIO (same-process direct function calls, zero network overhead)
|
||||
* - "local" -> LocalIO (same-machine via named pipes/sockets, production single-server)
|
||||
* - "network" -> NetworkIO (TCP/WebSocket for distributed deployment, MMO scale)
|
||||
*
|
||||
* Each IO type provides different performance and deployment characteristics while
|
||||
* maintaining the same pub/sub interface, enabling progressive scaling from
|
||||
* development to massive distributed systems.
|
||||
*
|
||||
* Usage:
|
||||
* ```cpp
|
||||
* auto io = IOFactory::create("intra");
|
||||
* auto io = IOFactory::create(IOType::NETWORK);
|
||||
* auto io = IOFactory::createFromConfig(config);
|
||||
* ```
|
||||
*/
|
||||
class IOFactory {
|
||||
public:
|
||||
/**
|
||||
* @brief Create IO transport from string type name
|
||||
* @param transportType String representation of transport type
|
||||
* @param instanceId Unique identifier for this IO instance (required for IntraIO)
|
||||
* @return Unique pointer to IO implementation
|
||||
* @throws std::invalid_argument if transport type is unknown
|
||||
*/
|
||||
static std::unique_ptr<IIO> create(const std::string& transportType, const std::string& instanceId = "");
|
||||
|
||||
/**
|
||||
* @brief Create IO transport from enum type
|
||||
* @param ioType IOType enum value
|
||||
* @param instanceId Unique identifier for this IO instance (required for IntraIO)
|
||||
* @return Unique pointer to IO implementation
|
||||
* @throws std::invalid_argument if type is not implemented
|
||||
*/
|
||||
static std::unique_ptr<IIO> create(IOType ioType, const std::string& instanceId = "");
|
||||
|
||||
/**
|
||||
* @brief Create IO transport from JSON configuration
|
||||
* @param config JSON configuration object
|
||||
* @param instanceId Unique identifier for this IO instance (required for IntraIO)
|
||||
* @return Unique pointer to configured IO transport
|
||||
* @throws std::invalid_argument if config is invalid
|
||||
*
|
||||
* Expected config format:
|
||||
* ```json
|
||||
* {
|
||||
* "type": "network",
|
||||
* "instance_id": "module-name",
|
||||
* "host": "localhost",
|
||||
* "port": 8080,
|
||||
* "protocol": "tcp",
|
||||
* "buffer_size": 4096,
|
||||
* "timeout": 5000,
|
||||
* "compression": true
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
static std::unique_ptr<IIO> createFromConfig(const json& config, const std::string& instanceId = "");
|
||||
|
||||
/**
|
||||
* @brief Get list of available transport types
|
||||
* @return Vector of supported transport strings
|
||||
*/
|
||||
static std::vector<std::string> getAvailableTransports();
|
||||
|
||||
/**
|
||||
* @brief Check if transport type is supported
|
||||
* @param transportType Transport string to check
|
||||
* @return True if transport type is supported
|
||||
*/
|
||||
static bool isTransportSupported(const std::string& transportType);
|
||||
|
||||
/**
|
||||
* @brief Parse transport string to enum (case-insensitive)
|
||||
* @param transportStr String representation of transport
|
||||
* @return IOType enum value
|
||||
* @throws std::invalid_argument if string is invalid
|
||||
*/
|
||||
static IOType parseTransport(const std::string& transportStr);
|
||||
|
||||
/**
|
||||
* @brief Convert transport enum to string
|
||||
* @param ioType IOType enum value
|
||||
* @return String representation of transport
|
||||
*/
|
||||
static std::string transportToString(IOType ioType);
|
||||
|
||||
/**
|
||||
* @brief Get recommended transport for deployment scenario
|
||||
* @param expectedClients Expected number of concurrent clients (0 = single-user)
|
||||
* @param distributed Whether system will be distributed across machines
|
||||
* @param development Whether this is for development/debugging
|
||||
* @return Recommended IOType
|
||||
*/
|
||||
static IOType getRecommendedTransport(int expectedClients = 1,
|
||||
bool distributed = false,
|
||||
bool development = true);
|
||||
|
||||
/**
|
||||
* @brief Create IO transport with automatic endpoint discovery
|
||||
* @param transportType Transport type to create
|
||||
* @param endpoint Optional endpoint specification (auto-detected if empty)
|
||||
* @param instanceId Unique identifier for this IO instance (required for IntraIO)
|
||||
* @return Unique pointer to configured IO transport
|
||||
*/
|
||||
static std::unique_ptr<IIO> createWithEndpoint(const std::string& transportType,
|
||||
const std::string& endpoint = "",
|
||||
const std::string& instanceId = "");
|
||||
|
||||
private:
|
||||
static std::shared_ptr<spdlog::logger> getFactoryLogger();
|
||||
static std::string toLowercase(const std::string& str);
|
||||
static std::string generateEndpoint(IOType ioType);
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,135 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <queue>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
#include <regex>
|
||||
#include <mutex>
|
||||
#include <chrono>
|
||||
#include <atomic>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "IIO.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
// Interface for message delivery to avoid circular include
|
||||
class IIntraIODelivery {
|
||||
public:
|
||||
virtual ~IIntraIODelivery() = default;
|
||||
virtual void deliverMessage(const std::string& topic, const json& message, bool isLowFreq) = 0;
|
||||
virtual const std::string& getInstanceId() const = 0;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Intra-process IO implementation with central routing
|
||||
*
|
||||
* IntraIO provides same-process pub/sub communication with zero network overhead.
|
||||
* Each module gets its own IntraIO instance, and messages are routed through
|
||||
* IntraIOManager for proper multi-module delivery.
|
||||
*
|
||||
* Features:
|
||||
* - Per-module isolation (one instance per module)
|
||||
* - Central routing via IntraIOManager
|
||||
* - Topic pattern matching with wildcards (e.g., "player:*", "economy:*")
|
||||
* - Low-frequency batching with configurable intervals
|
||||
* - Message replacement for reducible topics (latest-only semantics)
|
||||
* - Comprehensive health monitoring and metrics
|
||||
* - Thread-safe operations
|
||||
* - Pull-based message consumption
|
||||
*
|
||||
* Performance characteristics:
|
||||
* - Publish: ~10-50ns (direct memory copy + routing)
|
||||
* - Subscribe: ~100-500ns (pattern registration)
|
||||
* - Pull: ~50-200ns (queue operations)
|
||||
* - Zero network serialization overhead
|
||||
*/
|
||||
class IntraIO : public IIO, public IIntraIODelivery {
|
||||
private:
|
||||
std::shared_ptr<spdlog::logger> logger;
|
||||
mutable std::mutex operationMutex; // Thread safety for all operations
|
||||
|
||||
// Instance identification for routing
|
||||
std::string instanceId;
|
||||
|
||||
// Message storage
|
||||
std::queue<Message> messageQueue;
|
||||
std::queue<Message> lowFreqMessageQueue;
|
||||
|
||||
// Subscription management
|
||||
struct Subscription {
|
||||
std::regex pattern;
|
||||
std::string originalPattern;
|
||||
SubscriptionConfig config;
|
||||
std::chrono::high_resolution_clock::time_point lastBatch;
|
||||
std::unordered_map<std::string, Message> batchedMessages; // For replaceable messages
|
||||
std::vector<Message> accumulatedMessages; // For non-replaceable messages
|
||||
};
|
||||
|
||||
std::vector<Subscription> highFreqSubscriptions;
|
||||
std::vector<Subscription> lowFreqSubscriptions;
|
||||
|
||||
// Health monitoring
|
||||
mutable std::atomic<size_t> totalPublished{0};
|
||||
mutable std::atomic<size_t> totalPulled{0};
|
||||
mutable std::atomic<size_t> totalDropped{0};
|
||||
mutable std::chrono::high_resolution_clock::time_point lastHealthCheck;
|
||||
mutable float averageProcessingRate = 0.0f;
|
||||
|
||||
// Configuration
|
||||
static constexpr size_t DEFAULT_MAX_QUEUE_SIZE = 10000;
|
||||
size_t maxQueueSize = DEFAULT_MAX_QUEUE_SIZE;
|
||||
|
||||
// Helper methods
|
||||
void logIOStart();
|
||||
bool matchesPattern(const std::string& topic, const std::regex& pattern) const;
|
||||
std::regex compileTopicPattern(const std::string& pattern) const;
|
||||
void processLowFreqSubscriptions();
|
||||
void flushBatchedMessages(Subscription& sub);
|
||||
void updateHealthMetrics() const;
|
||||
void enforceQueueLimits();
|
||||
void logPublish(const std::string& topic, const json& message) const;
|
||||
void logSubscription(const std::string& pattern, bool isLowFreq) const;
|
||||
void logPull(const Message& message) const;
|
||||
|
||||
public:
|
||||
IntraIO(const std::string& instanceId);
|
||||
virtual ~IntraIO();
|
||||
|
||||
// IIO implementation
|
||||
void publish(const std::string& topic, const json& message) override;
|
||||
void subscribe(const std::string& topicPattern, const SubscriptionConfig& config = {}) override;
|
||||
void subscribeLowFreq(const std::string& topicPattern, const SubscriptionConfig& config = {}) override;
|
||||
int hasMessages() const override;
|
||||
Message pullMessage() override;
|
||||
IOHealth getHealth() const override;
|
||||
IOType getType() const override;
|
||||
|
||||
// Configuration and management
|
||||
void setMaxQueueSize(size_t maxSize);
|
||||
size_t getMaxQueueSize() const;
|
||||
void clearAllMessages();
|
||||
void clearAllSubscriptions();
|
||||
|
||||
// Debug and monitoring
|
||||
json getDetailedMetrics() const;
|
||||
void setLogLevel(spdlog::level::level_enum level);
|
||||
size_t getSubscriptionCount() const;
|
||||
std::vector<std::string> getActiveTopics() const;
|
||||
|
||||
// Testing utilities
|
||||
void simulateHighLoad(int messageCount, const std::string& topicPrefix = "test");
|
||||
void forceProcessLowFreqBatches();
|
||||
|
||||
// Manager interface (called by IntraIOManager)
|
||||
void deliverMessage(const std::string& topic, const json& message, bool isLowFreq);
|
||||
const std::string& getInstanceId() const;
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,91 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
#include <regex>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "IIO.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
class IntraIO; // Forward declaration
|
||||
class IIntraIODelivery; // Forward declaration
|
||||
|
||||
// Factory function for creating IntraIO (defined in IntraIO.cpp to avoid circular include)
|
||||
std::shared_ptr<IntraIO> createIntraIOInstance(const std::string& instanceId);
|
||||
|
||||
/**
|
||||
* @brief Central router for IntraIO instances
|
||||
*
|
||||
* IntraIOManager coordinates message passing between multiple IntraIO instances.
|
||||
* Each module gets its own IntraIO instance, and the manager handles routing
|
||||
* messages between them based on subscriptions.
|
||||
*
|
||||
* Architecture:
|
||||
* - One IntraIO instance per module (isolation)
|
||||
* - Central routing of messages between instances
|
||||
* - Pattern-based subscription matching
|
||||
* - Thread-safe operations
|
||||
*
|
||||
* Performance:
|
||||
* - Direct memory routing (no serialization)
|
||||
* - Pattern caching for fast lookup
|
||||
* - Batched delivery for efficiency
|
||||
*/
|
||||
class IntraIOManager {
|
||||
private:
|
||||
std::shared_ptr<spdlog::logger> logger;
|
||||
mutable std::mutex managerMutex;
|
||||
|
||||
// Registry of IntraIO instances
|
||||
std::unordered_map<std::string, std::shared_ptr<IIntraIODelivery>> instances;
|
||||
|
||||
// Subscription routing table
|
||||
struct RouteEntry {
|
||||
std::string instanceId;
|
||||
std::regex pattern;
|
||||
std::string originalPattern;
|
||||
bool isLowFreq;
|
||||
};
|
||||
std::vector<RouteEntry> routingTable;
|
||||
|
||||
// Statistics
|
||||
mutable std::atomic<size_t> totalRoutedMessages{0};
|
||||
mutable std::atomic<size_t> totalRoutes{0};
|
||||
|
||||
public:
|
||||
IntraIOManager();
|
||||
~IntraIOManager();
|
||||
|
||||
// Instance management
|
||||
std::shared_ptr<IntraIO> createInstance(const std::string& instanceId);
|
||||
void registerInstance(const std::string& instanceId, std::shared_ptr<IIntraIODelivery> instance);
|
||||
void removeInstance(const std::string& instanceId);
|
||||
std::shared_ptr<IntraIO> getInstance(const std::string& instanceId) const;
|
||||
|
||||
// Routing (called by IntraIO instances)
|
||||
void routeMessage(const std::string& sourceid, const std::string& topic, const json& message);
|
||||
void registerSubscription(const std::string& instanceId, const std::string& pattern, bool isLowFreq);
|
||||
void unregisterSubscription(const std::string& instanceId, const std::string& pattern);
|
||||
|
||||
// Management
|
||||
void clearAllRoutes();
|
||||
size_t getInstanceCount() const;
|
||||
std::vector<std::string> getInstanceIds() const;
|
||||
|
||||
// Debug and monitoring
|
||||
json getRoutingStats() const;
|
||||
void setLogLevel(spdlog::level::level_enum level);
|
||||
|
||||
// Singleton access (for global routing)
|
||||
static IntraIOManager& getInstance();
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,102 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <unordered_map>
|
||||
#include <functional>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include "IModule.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
/**
|
||||
* @brief Factory for loading and creating modules from shared libraries (.so files)
|
||||
*
|
||||
* ModuleFactory handles dynamic loading of module implementations from .so files.
|
||||
* It manages symbol resolution, error handling, and module lifecycle.
|
||||
*
|
||||
* Features:
|
||||
* - Dynamic loading of .so files with dlopen/dlsym
|
||||
* - Automatic symbol resolution for module entry points
|
||||
* - Hot-reload support with proper cleanup
|
||||
* - Comprehensive error reporting and logging
|
||||
* - Module registration and discovery
|
||||
* - Thread-safe operations
|
||||
*
|
||||
* Expected module .so structure:
|
||||
* - extern "C" IModule* create_module()
|
||||
* - extern "C" void destroy_module(IModule*)
|
||||
* - extern "C" const char* get_module_type()
|
||||
* - extern "C" const char* get_module_version()
|
||||
*/
|
||||
class ModuleFactory {
|
||||
public:
|
||||
struct ModuleInfo {
|
||||
std::string path;
|
||||
std::string type;
|
||||
std::string version;
|
||||
void* handle = nullptr;
|
||||
std::function<IModule*()> createFunc;
|
||||
std::function<void(IModule*)> destroyFunc;
|
||||
};
|
||||
|
||||
ModuleFactory();
|
||||
~ModuleFactory();
|
||||
|
||||
// Module loading
|
||||
std::unique_ptr<IModule> loadModule(const std::string& modulePath);
|
||||
std::unique_ptr<IModule> createModule(const std::string& moduleType);
|
||||
|
||||
// Module discovery and registration
|
||||
void scanModulesDirectory(const std::string& directory);
|
||||
void registerModule(const std::string& modulePath);
|
||||
void unloadModule(const std::string& moduleType);
|
||||
void unloadAllModules();
|
||||
|
||||
// Information and diagnostics
|
||||
std::vector<std::string> getAvailableModules() const;
|
||||
std::vector<std::string> getLoadedModules() const;
|
||||
ModuleInfo getModuleInfo(const std::string& moduleType) const;
|
||||
bool isModuleLoaded(const std::string& moduleType) const;
|
||||
bool isModuleAvailable(const std::string& moduleType) const;
|
||||
|
||||
// Configuration
|
||||
void setModulesDirectory(const std::string& directory);
|
||||
std::string getModulesDirectory() const;
|
||||
|
||||
// Hot-reload support
|
||||
bool reloadModule(const std::string& moduleType);
|
||||
void enableHotReload(bool enable);
|
||||
bool isHotReloadEnabled() const;
|
||||
|
||||
// Diagnostics and debugging
|
||||
json getDetailedStatus() const;
|
||||
void validateModule(const std::string& modulePath);
|
||||
void setLogLevel(spdlog::level::level_enum level);
|
||||
|
||||
private:
|
||||
std::shared_ptr<spdlog::logger> logger;
|
||||
std::string modulesDirectory;
|
||||
bool hotReloadEnabled = false;
|
||||
|
||||
// Module registry
|
||||
std::unordered_map<std::string, ModuleInfo> loadedModules;
|
||||
std::unordered_map<std::string, std::string> availableModules; // type -> path
|
||||
|
||||
// Helper methods
|
||||
std::shared_ptr<spdlog::logger> getFactoryLogger();
|
||||
bool loadSharedLibrary(const std::string& path, ModuleInfo& info);
|
||||
void unloadSharedLibrary(ModuleInfo& info);
|
||||
bool resolveSymbols(ModuleInfo& info);
|
||||
std::string extractModuleTypeFromPath(const std::string& path) const;
|
||||
bool isValidModuleFile(const std::string& path) const;
|
||||
void logModuleLoad(const std::string& type, const std::string& path) const;
|
||||
void logModuleUnload(const std::string& type) const;
|
||||
void logModuleError(const std::string& operation, const std::string& details) const;
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,116 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <stdexcept>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "IModuleSystem.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
/**
|
||||
* @brief Factory for creating ModuleSystem implementations
|
||||
*
|
||||
* ModuleSystemFactory provides centralized creation of different execution strategies:
|
||||
* - "sequential" -> SequentialModuleSystem (debug/test, one-at-a-time execution)
|
||||
* - "threaded" -> ThreadedModuleSystem (each module in own thread)
|
||||
* - "thread_pool" -> ThreadPoolModuleSystem (tasks distributed across pool)
|
||||
* - "cluster" -> ClusterModuleSystem (distributed across machines)
|
||||
*
|
||||
* Each ModuleSystem type provides different performance characteristics while
|
||||
* maintaining the same interface, enabling progressive scaling.
|
||||
*
|
||||
* Usage:
|
||||
* ```cpp
|
||||
* auto moduleSystem = ModuleSystemFactory::create("sequential");
|
||||
* auto moduleSystem = ModuleSystemFactory::create(ModuleSystemType::THREAD_POOL);
|
||||
* auto moduleSystem = ModuleSystemFactory::createFromConfig(config);
|
||||
* ```
|
||||
*/
|
||||
class ModuleSystemFactory {
|
||||
public:
|
||||
/**
|
||||
* @brief Create ModuleSystem from string strategy name
|
||||
* @param strategy String representation of execution strategy
|
||||
* @return Unique pointer to ModuleSystem implementation
|
||||
* @throws std::invalid_argument if strategy is unknown
|
||||
*/
|
||||
static std::unique_ptr<IModuleSystem> create(const std::string& strategy);
|
||||
|
||||
/**
|
||||
* @brief Create ModuleSystem from enum type
|
||||
* @param systemType ModuleSystemType enum value
|
||||
* @return Unique pointer to ModuleSystem implementation
|
||||
* @throws std::invalid_argument if type is not implemented
|
||||
*/
|
||||
static std::unique_ptr<IModuleSystem> create(ModuleSystemType systemType);
|
||||
|
||||
/**
|
||||
* @brief Create ModuleSystem from JSON configuration
|
||||
* @param config JSON configuration object
|
||||
* @return Unique pointer to configured ModuleSystem
|
||||
* @throws std::invalid_argument if config is invalid
|
||||
*
|
||||
* Expected config format:
|
||||
* ```json
|
||||
* {
|
||||
* "strategy": "thread_pool",
|
||||
* "thread_count": 4,
|
||||
* "queue_size": 1000,
|
||||
* "priority": "normal"
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
static std::unique_ptr<IModuleSystem> createFromConfig(const json& config);
|
||||
|
||||
/**
|
||||
* @brief Get list of available ModuleSystem strategies
|
||||
* @return Vector of supported strategy strings
|
||||
*/
|
||||
static std::vector<std::string> getAvailableStrategies();
|
||||
|
||||
/**
|
||||
* @brief Check if strategy is supported
|
||||
* @param strategy Strategy string to check
|
||||
* @return True if strategy is supported
|
||||
*/
|
||||
static bool isStrategySupported(const std::string& strategy);
|
||||
|
||||
/**
|
||||
* @brief Parse strategy string to enum (case-insensitive)
|
||||
* @param strategyStr String representation of strategy
|
||||
* @return ModuleSystemType enum value
|
||||
* @throws std::invalid_argument if string is invalid
|
||||
*/
|
||||
static ModuleSystemType parseStrategy(const std::string& strategyStr);
|
||||
|
||||
/**
|
||||
* @brief Convert strategy enum to string
|
||||
* @param systemType ModuleSystemType enum value
|
||||
* @return String representation of strategy
|
||||
*/
|
||||
static std::string strategyToString(ModuleSystemType systemType);
|
||||
|
||||
/**
|
||||
* @brief Get recommended strategy for given performance requirements
|
||||
* @param targetFPS Target frames per second (0 = no preference)
|
||||
* @param moduleCount Expected number of modules
|
||||
* @param cpuCores Available CPU cores (0 = auto-detect)
|
||||
* @return Recommended ModuleSystemType
|
||||
*/
|
||||
static ModuleSystemType getRecommendedStrategy(int targetFPS = 60,
|
||||
int moduleCount = 1,
|
||||
int cpuCores = 0);
|
||||
|
||||
private:
|
||||
static std::shared_ptr<spdlog::logger> getFactoryLogger();
|
||||
static std::string toLowercase(const std::string& str);
|
||||
static int detectCpuCores();
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,87 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <queue>
|
||||
#include <chrono>
|
||||
#include <spdlog/spdlog.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include "IModuleSystem.h"
|
||||
#include "IModule.h"
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
/**
|
||||
* @brief Sequential module system implementation for debug and testing
|
||||
*
|
||||
* SequentialModuleSystem processes modules one at a time in a simple, predictable manner.
|
||||
* Perfect for development, debugging, and testing scenarios where deterministic execution
|
||||
* is more important than performance.
|
||||
*
|
||||
* Features:
|
||||
* - Single-threaded execution (thread-safe by design)
|
||||
* - Immediate task execution (no actual scheduling)
|
||||
* - Comprehensive logging of all operations
|
||||
* - Simple state management
|
||||
* - Perfect for step-by-step debugging
|
||||
*
|
||||
* Task scheduling behavior:
|
||||
* - scheduleTask() executes immediately (no queue)
|
||||
* - hasCompletedTasks() always returns 0 (tasks complete immediately)
|
||||
* - getCompletedTask() throws (no queued results)
|
||||
*/
|
||||
class SequentialModuleSystem : public IModuleSystem {
|
||||
private:
|
||||
std::shared_ptr<spdlog::logger> logger;
|
||||
std::unique_ptr<IModule> module;
|
||||
std::string moduleName = "unknown";
|
||||
|
||||
// Performance tracking
|
||||
std::chrono::high_resolution_clock::time_point lastProcessTime;
|
||||
size_t processCallCount = 0;
|
||||
float totalProcessTime = 0.0f;
|
||||
float lastProcessDuration = 0.0f;
|
||||
|
||||
// Task execution tracking (for logging purposes)
|
||||
size_t taskExecutionCount = 0;
|
||||
|
||||
// Helper methods
|
||||
void logSystemStart();
|
||||
void logProcessStart(float deltaTime);
|
||||
void logProcessEnd(float processTime);
|
||||
void logTaskExecution(const std::string& taskType, const json& taskData);
|
||||
void validateModule() const;
|
||||
|
||||
public:
|
||||
SequentialModuleSystem();
|
||||
virtual ~SequentialModuleSystem();
|
||||
|
||||
// IModuleSystem implementation
|
||||
void setModule(std::unique_ptr<IModule> module) override;
|
||||
IModule* getModule() const override;
|
||||
int processModule(float deltaTime) override;
|
||||
ModuleSystemType getType() const override;
|
||||
|
||||
// Hot-reload support
|
||||
std::unique_ptr<IModule> extractModule();
|
||||
|
||||
// ITaskScheduler implementation (inherited)
|
||||
void scheduleTask(const std::string& taskType, const json& taskData) override;
|
||||
int hasCompletedTasks() const override;
|
||||
json getCompletedTask() override;
|
||||
|
||||
// Debug and monitoring methods
|
||||
json getPerformanceMetrics() const;
|
||||
void resetPerformanceMetrics();
|
||||
float getAverageProcessTime() const;
|
||||
size_t getProcessCallCount() const;
|
||||
size_t getTaskExecutionCount() const;
|
||||
|
||||
// Configuration
|
||||
void setLogLevel(spdlog::level::level_enum level);
|
||||
};
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,487 +0,0 @@
|
||||
#include <warfactory/DebugEngine.h>
|
||||
#include <fstream>
|
||||
#include <filesystem>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#include <spdlog/sinks/basic_file_sink.h>
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
DebugEngine::DebugEngine() {
|
||||
// Create comprehensive logger with multiple sinks
|
||||
auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
|
||||
auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>("logs/debug_engine.log", true);
|
||||
|
||||
console_sink->set_level(spdlog::level::debug);
|
||||
file_sink->set_level(spdlog::level::trace);
|
||||
|
||||
logger = std::make_shared<spdlog::logger>("DebugEngine",
|
||||
spdlog::sinks_init_list{console_sink, file_sink});
|
||||
logger->set_level(spdlog::level::trace);
|
||||
logger->flush_on(spdlog::level::debug);
|
||||
|
||||
// Register logger globally
|
||||
spdlog::register_logger(logger);
|
||||
|
||||
logger->info("🔧 DebugEngine constructor - Maximum logging enabled");
|
||||
logger->debug("📊 Console sink level: DEBUG, File sink level: TRACE");
|
||||
logger->trace("🏗️ DebugEngine object created at address: {}", static_cast<void*>(this));
|
||||
}
|
||||
|
||||
DebugEngine::~DebugEngine() {
|
||||
logger->info("🔧 DebugEngine destructor called");
|
||||
if (running.load()) {
|
||||
logger->warn("⚠️ Engine still running during destruction - forcing shutdown");
|
||||
shutdown();
|
||||
}
|
||||
logger->trace("🏗️ DebugEngine object destroyed");
|
||||
}
|
||||
|
||||
void DebugEngine::initialize() {
|
||||
logger->info("🚀 Initializing DebugEngine...");
|
||||
logEngineStart();
|
||||
|
||||
// Create logs directory if it doesn't exist
|
||||
std::filesystem::create_directories("logs");
|
||||
logger->debug("📁 Ensured logs directory exists");
|
||||
|
||||
engineStartTime = std::chrono::high_resolution_clock::now();
|
||||
lastFrameTime = engineStartTime;
|
||||
frameCount = 0;
|
||||
|
||||
logger->info("✅ DebugEngine initialization complete");
|
||||
logger->debug("🕐 Engine start time recorded: {}",
|
||||
std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
engineStartTime.time_since_epoch()).count());
|
||||
}
|
||||
|
||||
void DebugEngine::run() {
|
||||
logger->info("🏃 Starting DebugEngine main loop");
|
||||
logger->debug("🔄 Engine loop type: Continuous with debug capabilities");
|
||||
|
||||
if (!coordinatorSocket) {
|
||||
logger->warn("⚠️ No coordinator socket registered - running in isolated mode");
|
||||
}
|
||||
|
||||
if (clientSockets.empty()) {
|
||||
logger->warn("⚠️ No client sockets registered - no players will connect");
|
||||
}
|
||||
|
||||
running.store(true);
|
||||
logger->info("✅ DebugEngine marked as running");
|
||||
|
||||
while (running.load()) {
|
||||
if (debugPaused.load()) {
|
||||
logger->trace("⏸️ Engine paused - waiting for resume or step command");
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||
continue;
|
||||
}
|
||||
|
||||
float deltaTime = calculateDeltaTime();
|
||||
step(deltaTime);
|
||||
|
||||
// Log every 60 frames (roughly every second at 60fps)
|
||||
if (frameCount % 60 == 0) {
|
||||
logger->debug("📊 Frame {}: Running smoothly, deltaTime: {:.3f}ms",
|
||||
frameCount, deltaTime * 1000);
|
||||
}
|
||||
}
|
||||
|
||||
logger->info("🏁 DebugEngine main loop ended");
|
||||
}
|
||||
|
||||
void DebugEngine::step(float deltaTime) {
|
||||
logFrameStart(deltaTime);
|
||||
|
||||
auto frameStartTime = std::chrono::high_resolution_clock::now();
|
||||
|
||||
try {
|
||||
// Process coordinator messages
|
||||
if (coordinatorSocket) {
|
||||
logger->trace("📨 Processing coordinator messages");
|
||||
processCoordinatorMessages();
|
||||
}
|
||||
|
||||
// Process client messages
|
||||
if (!clientSockets.empty()) {
|
||||
logger->trace("👥 Processing {} client socket(s)", clientSockets.size());
|
||||
processClientMessages();
|
||||
}
|
||||
|
||||
// Process all module systems
|
||||
if (!moduleSystems.empty()) {
|
||||
logger->trace("🔧 Processing {} module system(s)", moduleSystems.size());
|
||||
processModuleSystems(deltaTime);
|
||||
}
|
||||
|
||||
// Health monitoring every 30 frames
|
||||
if (frameCount % 30 == 0) {
|
||||
logModuleHealth();
|
||||
logSocketHealth();
|
||||
}
|
||||
|
||||
frameCount++;
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Exception during step execution: {}", e.what());
|
||||
logger->error("🔍 Frame: {}, deltaTime: {:.3f}ms", frameCount, deltaTime * 1000);
|
||||
throw; // Re-throw to allow caller to handle
|
||||
}
|
||||
|
||||
auto frameEndTime = std::chrono::high_resolution_clock::now();
|
||||
float frameTime = std::chrono::duration<float, std::milli>(frameEndTime - frameStartTime).count();
|
||||
|
||||
logFrameEnd(frameTime);
|
||||
}
|
||||
|
||||
void DebugEngine::shutdown() {
|
||||
logger->info("🛑 DebugEngine shutdown initiated");
|
||||
logEngineShutdown();
|
||||
|
||||
running.store(false);
|
||||
logger->debug("🔄 Running flag set to false");
|
||||
|
||||
// Shutdown all module systems
|
||||
if (!moduleSystems.empty()) {
|
||||
logger->info("🔧 Shutting down {} module system(s)", moduleSystems.size());
|
||||
for (size_t i = 0; i < moduleSystems.size(); ++i) {
|
||||
logger->debug("🔧 Shutting down module system: {}", moduleNames[i]);
|
||||
// Note: ModuleSystems don't have shutdown in interface yet
|
||||
// This would be added when implementing IModuleSystem
|
||||
}
|
||||
moduleSystems.clear();
|
||||
moduleNames.clear();
|
||||
logger->info("✅ All module systems shut down");
|
||||
}
|
||||
|
||||
// Clear sockets
|
||||
if (coordinatorSocket) {
|
||||
logger->debug("🔌 Clearing coordinator socket");
|
||||
coordinatorSocket.reset();
|
||||
}
|
||||
|
||||
if (!clientSockets.empty()) {
|
||||
logger->info("👥 Clearing {} client socket(s)", clientSockets.size());
|
||||
clientSockets.clear();
|
||||
}
|
||||
|
||||
logger->info("✅ DebugEngine shutdown complete");
|
||||
|
||||
// Final statistics
|
||||
auto shutdownTime = std::chrono::high_resolution_clock::now();
|
||||
auto totalRunTime = std::chrono::duration<float>(shutdownTime - engineStartTime).count();
|
||||
logger->info("📊 Total engine runtime: {:.2f} seconds", totalRunTime);
|
||||
logger->info("📊 Total frames processed: {}", frameCount);
|
||||
if (totalRunTime > 0) {
|
||||
logger->info("📊 Average FPS: {:.2f}", frameCount / totalRunTime);
|
||||
}
|
||||
}
|
||||
|
||||
void DebugEngine::loadModules(const std::string& configPath) {
|
||||
logger->info("📦 Loading modules from config: {}", configPath);
|
||||
|
||||
try {
|
||||
// Read configuration file
|
||||
std::ifstream configFile(configPath);
|
||||
if (!configFile.is_open()) {
|
||||
logger->error("❌ Cannot open config file: {}", configPath);
|
||||
throw std::runtime_error("Config file not found: " + configPath);
|
||||
}
|
||||
|
||||
json config;
|
||||
configFile >> config;
|
||||
logger->debug("✅ Config file parsed successfully");
|
||||
logger->trace("📄 Config content: {}", config.dump(2));
|
||||
|
||||
// Validate configuration
|
||||
validateConfiguration();
|
||||
|
||||
if (!config.contains("modules")) {
|
||||
logger->warn("⚠️ No 'modules' section in config - no modules to load");
|
||||
return;
|
||||
}
|
||||
|
||||
auto modules = config["modules"];
|
||||
logger->info("🔍 Found {} module(s) to load", modules.size());
|
||||
|
||||
for (size_t i = 0; i < modules.size(); ++i) {
|
||||
const auto& moduleConfig = modules[i];
|
||||
logger->info("📦 Loading module {}/{}", i + 1, modules.size());
|
||||
|
||||
if (!moduleConfig.contains("path") || !moduleConfig.contains("strategy")) {
|
||||
logger->error("❌ Module config missing 'path' or 'strategy': {}", moduleConfig.dump());
|
||||
continue;
|
||||
}
|
||||
|
||||
std::string modulePath = moduleConfig["path"];
|
||||
std::string strategy = moduleConfig["strategy"];
|
||||
std::string frequency = moduleConfig.value("frequency", "60hz");
|
||||
|
||||
logger->info("📂 Module path: {}", modulePath);
|
||||
logger->info("⚙️ Module strategy: {}", strategy);
|
||||
logger->info("⏱️ Module frequency: {}", frequency);
|
||||
|
||||
// TODO: Create appropriate ModuleSystem based on strategy
|
||||
// For now, we'll log what would be created
|
||||
logger->info("🚧 TODO: Create {} ModuleSystem for {}", strategy, modulePath);
|
||||
logger->debug("🔮 Future: Load dynamic library from {}", modulePath);
|
||||
logger->debug("🔮 Future: Instantiate module and wrap in {} system", strategy);
|
||||
|
||||
// Store module name for tracking
|
||||
moduleNames.push_back(modulePath);
|
||||
}
|
||||
|
||||
logger->info("✅ Module loading configuration processed");
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Failed to load modules: {}", e.what());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
void DebugEngine::registerMainSocket(std::unique_ptr<IIO> socket) {
|
||||
logger->info("🔌 Registering main coordinator socket");
|
||||
|
||||
if (coordinatorSocket) {
|
||||
logger->warn("⚠️ Coordinator socket already exists - replacing");
|
||||
}
|
||||
|
||||
coordinatorSocket = std::move(socket);
|
||||
logger->info("✅ Main coordinator socket registered");
|
||||
logger->debug("🔍 Socket type: {}", static_cast<int>(coordinatorSocket->getType()));
|
||||
}
|
||||
|
||||
void DebugEngine::registerNewClientSocket(std::unique_ptr<IIO> clientSocket) {
|
||||
logger->info("👥 Registering new client socket (client #{})", clientSockets.size() + 1);
|
||||
|
||||
logger->debug("🔍 Client socket type: {}", static_cast<int>(clientSocket->getType()));
|
||||
clientSockets.push_back(std::move(clientSocket));
|
||||
|
||||
logger->info("✅ Client socket registered - Total clients: {}", clientSockets.size());
|
||||
}
|
||||
|
||||
EngineType DebugEngine::getType() const {
|
||||
logger->trace("🏷️ Engine type requested: DEBUG");
|
||||
return EngineType::DEBUG;
|
||||
}
|
||||
|
||||
// Debug-specific methods
|
||||
void DebugEngine::pauseExecution() {
|
||||
logger->info("⏸️ Pausing engine execution");
|
||||
debugPaused.store(true);
|
||||
logger->debug("🔄 Debug pause flag set to true");
|
||||
}
|
||||
|
||||
void DebugEngine::resumeExecution() {
|
||||
logger->info("▶️ Resuming engine execution");
|
||||
debugPaused.store(false);
|
||||
logger->debug("🔄 Debug pause flag set to false");
|
||||
}
|
||||
|
||||
void DebugEngine::stepSingleFrame() {
|
||||
logger->info("👣 Executing single frame step");
|
||||
if (debugPaused.load()) {
|
||||
float deltaTime = calculateDeltaTime();
|
||||
step(deltaTime);
|
||||
logger->debug("✅ Single frame step completed");
|
||||
} else {
|
||||
logger->warn("⚠️ Cannot step single frame - engine not paused");
|
||||
}
|
||||
}
|
||||
|
||||
bool DebugEngine::isPaused() const {
|
||||
bool paused = debugPaused.load();
|
||||
logger->trace("🔍 Pause status requested: {}", paused ? "PAUSED" : "RUNNING");
|
||||
return paused;
|
||||
}
|
||||
|
||||
json DebugEngine::getDetailedStatus() const {
|
||||
logger->debug("📊 Detailed status requested");
|
||||
|
||||
json status = {
|
||||
{"type", "DEBUG"},
|
||||
{"running", running.load()},
|
||||
{"paused", debugPaused.load()},
|
||||
{"frame_count", frameCount},
|
||||
{"modules_loaded", moduleNames.size()},
|
||||
{"client_sockets", clientSockets.size()},
|
||||
{"has_coordinator", coordinatorSocket != nullptr}
|
||||
};
|
||||
|
||||
// Add runtime info
|
||||
if (frameCount > 0) {
|
||||
auto currentTime = std::chrono::high_resolution_clock::now();
|
||||
auto totalTime = std::chrono::duration<float>(currentTime - engineStartTime).count();
|
||||
status["runtime_seconds"] = totalTime;
|
||||
status["average_fps"] = frameCount / totalTime;
|
||||
}
|
||||
|
||||
logger->trace("📄 Status JSON: {}", status.dump());
|
||||
return status;
|
||||
}
|
||||
|
||||
void DebugEngine::setLogLevel(spdlog::level::level_enum level) {
|
||||
logger->info("🔧 Setting log level to: {}", spdlog::level::to_string_view(level));
|
||||
logger->set_level(level);
|
||||
logger->debug("✅ Log level updated");
|
||||
}
|
||||
|
||||
// Private helper methods
|
||||
void DebugEngine::logEngineStart() {
|
||||
logger->info("=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=");
|
||||
logger->info("🏭 WARFACTORY DEBUG ENGINE STARTING");
|
||||
logger->info("=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=");
|
||||
logger->info("🎯 Engine Type: DEBUG (Maximum visibility mode)");
|
||||
logger->info("📊 Logging Level: TRACE (Everything logged)");
|
||||
logger->info("🔧 Features: Step debugging, health monitoring, performance tracking");
|
||||
}
|
||||
|
||||
void DebugEngine::logEngineShutdown() {
|
||||
logger->info("=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=");
|
||||
logger->info("🏭 WARFACTORY DEBUG ENGINE SHUTTING DOWN");
|
||||
logger->info("=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=");
|
||||
}
|
||||
|
||||
void DebugEngine::logFrameStart(float deltaTime) {
|
||||
logger->trace("🎬 Frame {} START - deltaTime: {:.3f}ms", frameCount, deltaTime * 1000);
|
||||
}
|
||||
|
||||
void DebugEngine::logFrameEnd(float frameTime) {
|
||||
logger->trace("🏁 Frame {} END - frameTime: {:.3f}ms", frameCount, frameTime);
|
||||
|
||||
// Warn about slow frames
|
||||
if (frameTime > 16.67f) { // More than 60fps target
|
||||
logger->warn("🐌 Slow frame detected: {:.2f}ms (target: <16.67ms for 60fps)", frameTime);
|
||||
}
|
||||
}
|
||||
|
||||
void DebugEngine::logModuleHealth() {
|
||||
if (moduleSystems.empty()) {
|
||||
logger->debug("🏥 Module health check: No modules loaded");
|
||||
return;
|
||||
}
|
||||
|
||||
logger->debug("🏥 Module health check: {} module system(s)", moduleSystems.size());
|
||||
|
||||
for (size_t i = 0; i < moduleSystems.size(); ++i) {
|
||||
// TODO: When IModuleSystem has health methods, check them here
|
||||
logger->trace("🔍 Module '{}': Status unknown (health interface not implemented)", moduleNames[i]);
|
||||
}
|
||||
}
|
||||
|
||||
void DebugEngine::logSocketHealth() {
|
||||
logger->debug("🌐 Socket health check:");
|
||||
|
||||
if (coordinatorSocket) {
|
||||
auto health = coordinatorSocket->getHealth();
|
||||
logger->debug("📡 Coordinator socket: Queue={}/{}, Dropping={}, Rate={:.1f}msg/s",
|
||||
health.queueSize, health.maxQueueSize, health.dropping, health.averageProcessingRate);
|
||||
|
||||
if (health.dropping) {
|
||||
logger->warn("⚠️ Coordinator socket dropping messages!");
|
||||
}
|
||||
if (health.queueSize > health.maxQueueSize * 0.8) {
|
||||
logger->warn("⚠️ Coordinator socket queue 80% full ({}/{})", health.queueSize, health.maxQueueSize);
|
||||
}
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < clientSockets.size(); ++i) {
|
||||
auto health = clientSockets[i]->getHealth();
|
||||
logger->debug("👤 Client socket {}: Queue={}/{}, Dropping={}, Rate={:.1f}msg/s",
|
||||
i, health.queueSize, health.maxQueueSize, health.dropping, health.averageProcessingRate);
|
||||
|
||||
if (health.dropping) {
|
||||
logger->warn("⚠️ Client socket {} dropping messages!", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DebugEngine::processModuleSystems(float deltaTime) {
|
||||
logger->trace("⚙️ Processing {} module system(s)", moduleSystems.size());
|
||||
|
||||
for (size_t i = 0; i < moduleSystems.size(); ++i) {
|
||||
logger->trace("🔧 Processing module system: {}", moduleNames[i]);
|
||||
|
||||
try {
|
||||
// TODO: Call moduleSystem->processModule(deltaTime) when implemented
|
||||
logger->trace("🚧 TODO: Call processModule() on {}", moduleNames[i]);
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error processing module '{}': {}", moduleNames[i], e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DebugEngine::processClientMessages() {
|
||||
for (size_t i = 0; i < clientSockets.size(); ++i) {
|
||||
auto& socket = clientSockets[i];
|
||||
int messageCount = socket->hasMessages();
|
||||
|
||||
if (messageCount > 0) {
|
||||
logger->trace("📨 Client {} has {} pending message(s)", i, messageCount);
|
||||
|
||||
// Process a few messages per frame to avoid blocking
|
||||
int messagesToProcess = std::min(messageCount, 5);
|
||||
|
||||
for (int j = 0; j < messagesToProcess; ++j) {
|
||||
try {
|
||||
auto message = socket->pullMessage();
|
||||
logger->debug("📩 Client {} message: topic='{}', data size={}",
|
||||
i, message.topic, message.data.dump().size());
|
||||
|
||||
// TODO: Route message to appropriate module or process it
|
||||
logger->trace("🚧 TODO: Route client message to modules");
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error processing client {} message: {}", i, e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DebugEngine::processCoordinatorMessages() {
|
||||
int messageCount = coordinatorSocket->hasMessages();
|
||||
|
||||
if (messageCount > 0) {
|
||||
logger->trace("📨 Coordinator has {} pending message(s)", messageCount);
|
||||
|
||||
// Process coordinator messages with higher priority
|
||||
int messagesToProcess = std::min(messageCount, 10);
|
||||
|
||||
for (int i = 0; i < messagesToProcess; ++i) {
|
||||
try {
|
||||
auto message = coordinatorSocket->pullMessage();
|
||||
logger->debug("📩 Coordinator message: topic='{}', data size={}",
|
||||
message.topic, message.data.dump().size());
|
||||
|
||||
// TODO: Handle coordinator commands (shutdown, config reload, etc.)
|
||||
logger->trace("🚧 TODO: Handle coordinator commands");
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error processing coordinator message: {}", e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
float DebugEngine::calculateDeltaTime() {
|
||||
auto currentTime = std::chrono::high_resolution_clock::now();
|
||||
float deltaTime = std::chrono::duration<float>(currentTime - lastFrameTime).count();
|
||||
lastFrameTime = currentTime;
|
||||
|
||||
// Cap delta time to avoid huge jumps (e.g., after debugging pause)
|
||||
if (deltaTime > 0.1f) {
|
||||
logger->trace("⏱️ Large deltaTime detected: {:.3f}s - capping to 100ms", deltaTime);
|
||||
deltaTime = 0.1f;
|
||||
}
|
||||
|
||||
return deltaTime;
|
||||
}
|
||||
|
||||
void DebugEngine::validateConfiguration() {
|
||||
logger->debug("✅ Configuration validation passed");
|
||||
// TODO: Add actual validation logic
|
||||
logger->trace("🚧 TODO: Implement comprehensive config validation");
|
||||
}
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,207 +0,0 @@
|
||||
#include <warfactory/EngineFactory.h>
|
||||
#include <fstream>
|
||||
#include <algorithm>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
std::unique_ptr<IEngine> EngineFactory::createEngine(const std::string& engineType) {
|
||||
auto logger = getFactoryLogger();
|
||||
logger->info("🏭 EngineFactory: Creating engine of type '{}'", engineType);
|
||||
|
||||
EngineType type = parseEngineType(engineType);
|
||||
return createEngine(type);
|
||||
}
|
||||
|
||||
std::unique_ptr<IEngine> EngineFactory::createEngine(EngineType engineType) {
|
||||
auto logger = getFactoryLogger();
|
||||
std::string typeStr = engineTypeToString(engineType);
|
||||
logger->info("🏭 EngineFactory: Creating engine of enum type '{}'", typeStr);
|
||||
|
||||
std::unique_ptr<IEngine> engine;
|
||||
|
||||
switch (engineType) {
|
||||
case EngineType::DEBUG:
|
||||
logger->debug("🔧 Creating DebugEngine instance");
|
||||
engine = std::make_unique<DebugEngine>();
|
||||
logger->info("✅ DebugEngine created successfully");
|
||||
break;
|
||||
|
||||
case EngineType::PRODUCTION:
|
||||
logger->error("❌ ProductionEngine not yet implemented");
|
||||
throw std::invalid_argument("ProductionEngine not yet implemented - use DEBUG for now");
|
||||
|
||||
case EngineType::HIGH_PERFORMANCE:
|
||||
logger->error("❌ HighPerformanceEngine not yet implemented");
|
||||
throw std::invalid_argument("HighPerformanceEngine not yet implemented - use DEBUG for now");
|
||||
|
||||
default:
|
||||
logger->error("❌ Unknown engine type enum value: {}", static_cast<int>(engineType));
|
||||
throw std::invalid_argument("Unknown engine type enum value: " + std::to_string(static_cast<int>(engineType)));
|
||||
}
|
||||
|
||||
logger->debug("🎯 Engine type verification: created engine reports type '{}'",
|
||||
engineTypeToString(engine->getType()));
|
||||
|
||||
return engine;
|
||||
}
|
||||
|
||||
std::unique_ptr<IEngine> EngineFactory::createFromConfig(const std::string& configPath) {
|
||||
auto logger = getFactoryLogger();
|
||||
logger->info("🏭 EngineFactory: Creating engine from config '{}'", configPath);
|
||||
|
||||
try {
|
||||
// Read configuration file
|
||||
std::ifstream configFile(configPath);
|
||||
if (!configFile.is_open()) {
|
||||
logger->error("❌ Cannot open config file: {}", configPath);
|
||||
throw std::runtime_error("Cannot open engine config file: " + configPath);
|
||||
}
|
||||
|
||||
json config;
|
||||
configFile >> config;
|
||||
logger->debug("✅ Config file parsed successfully");
|
||||
|
||||
// Extract engine configuration
|
||||
if (!config.contains("engine")) {
|
||||
logger->error("❌ Config file missing 'engine' section");
|
||||
throw std::runtime_error("Config file missing 'engine' section");
|
||||
}
|
||||
|
||||
auto engineConfig = config["engine"];
|
||||
|
||||
if (!engineConfig.contains("type")) {
|
||||
logger->error("❌ Engine config missing 'type' field");
|
||||
throw std::runtime_error("Engine config missing 'type' field");
|
||||
}
|
||||
|
||||
std::string engineType = engineConfig["type"];
|
||||
logger->info("📋 Config specifies engine type: '{}'", engineType);
|
||||
|
||||
// Create engine
|
||||
auto engine = createEngine(engineType);
|
||||
|
||||
// Apply additional configuration if available
|
||||
if (engineConfig.contains("log_level")) {
|
||||
std::string logLevel = engineConfig["log_level"];
|
||||
logger->info("🔧 Config specifies log level: '{}'", logLevel);
|
||||
|
||||
// Apply log level if engine supports it (DebugEngine does)
|
||||
if (engine->getType() == EngineType::DEBUG) {
|
||||
auto debugEngine = static_cast<DebugEngine*>(engine.get());
|
||||
|
||||
if (logLevel == "trace") debugEngine->setLogLevel(spdlog::level::trace);
|
||||
else if (logLevel == "debug") debugEngine->setLogLevel(spdlog::level::debug);
|
||||
else if (logLevel == "info") debugEngine->setLogLevel(spdlog::level::info);
|
||||
else if (logLevel == "warn") debugEngine->setLogLevel(spdlog::level::warn);
|
||||
else if (logLevel == "error") debugEngine->setLogLevel(spdlog::level::err);
|
||||
else {
|
||||
logger->warn("⚠️ Unknown log level '{}' - using default", logLevel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (engineConfig.contains("features")) {
|
||||
auto features = engineConfig["features"];
|
||||
logger->debug("🎛️ Engine features configuration found: {}", features.dump());
|
||||
// TODO: Apply feature configuration when engines support it
|
||||
}
|
||||
|
||||
logger->info("✅ Engine created from config successfully");
|
||||
return engine;
|
||||
|
||||
} catch (const json::exception& e) {
|
||||
logger->error("❌ JSON parsing error in config file: {}", e.what());
|
||||
throw std::runtime_error("Invalid JSON in engine config file: " + std::string(e.what()));
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error creating engine from config: {}", e.what());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> EngineFactory::getAvailableEngineTypes() {
|
||||
return {
|
||||
"debug",
|
||||
"production", // Not yet implemented
|
||||
"high_performance" // Not yet implemented
|
||||
};
|
||||
}
|
||||
|
||||
bool EngineFactory::isEngineTypeSupported(const std::string& engineType) {
|
||||
try {
|
||||
parseEngineType(engineType);
|
||||
return true;
|
||||
} catch (const std::invalid_argument&) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
EngineType EngineFactory::parseEngineType(const std::string& engineTypeStr) {
|
||||
auto logger = getFactoryLogger();
|
||||
std::string lowerType = toLowercase(engineTypeStr);
|
||||
|
||||
logger->trace("🔍 Parsing engine type: '{}' -> '{}'", engineTypeStr, lowerType);
|
||||
|
||||
if (lowerType == "debug") {
|
||||
return EngineType::DEBUG;
|
||||
} else if (lowerType == "production") {
|
||||
return EngineType::PRODUCTION;
|
||||
} else if (lowerType == "high_performance" || lowerType == "high-performance" || lowerType == "highperformance") {
|
||||
return EngineType::HIGH_PERFORMANCE;
|
||||
} else {
|
||||
logger->error("❌ Unknown engine type: '{}'", engineTypeStr);
|
||||
auto availableTypes = getAvailableEngineTypes();
|
||||
std::string availableStr = "[";
|
||||
for (size_t i = 0; i < availableTypes.size(); ++i) {
|
||||
availableStr += availableTypes[i];
|
||||
if (i < availableTypes.size() - 1) availableStr += ", ";
|
||||
}
|
||||
availableStr += "]";
|
||||
|
||||
throw std::invalid_argument("Unknown engine type '" + engineTypeStr + "'. Available types: " + availableStr);
|
||||
}
|
||||
}
|
||||
|
||||
std::string EngineFactory::engineTypeToString(EngineType engineType) {
|
||||
switch (engineType) {
|
||||
case EngineType::DEBUG:
|
||||
return "debug";
|
||||
case EngineType::PRODUCTION:
|
||||
return "production";
|
||||
case EngineType::HIGH_PERFORMANCE:
|
||||
return "high_performance";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
// Private helper methods
|
||||
std::shared_ptr<spdlog::logger> EngineFactory::getFactoryLogger() {
|
||||
static std::shared_ptr<spdlog::logger> logger = nullptr;
|
||||
|
||||
if (!logger) {
|
||||
auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
|
||||
console_sink->set_level(spdlog::level::debug);
|
||||
|
||||
logger = std::make_shared<spdlog::logger>("EngineFactory", console_sink);
|
||||
logger->set_level(spdlog::level::debug);
|
||||
logger->flush_on(spdlog::level::debug);
|
||||
|
||||
// Register globally
|
||||
spdlog::register_logger(logger);
|
||||
}
|
||||
|
||||
return logger;
|
||||
}
|
||||
|
||||
std::string EngineFactory::toLowercase(const std::string& str) {
|
||||
std::string result = str;
|
||||
std::transform(result.begin(), result.end(), result.begin(),
|
||||
[](char c) { return std::tolower(c); });
|
||||
return result;
|
||||
}
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,311 +0,0 @@
|
||||
#include <warfactory/IOFactory.h>
|
||||
#include <algorithm>
|
||||
#include <random>
|
||||
#include <functional>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
|
||||
// Include implemented transports
|
||||
#include <warfactory/IntraIO.h>
|
||||
#include <warfactory/IntraIOManager.h>
|
||||
// Forward declarations for future implementations
|
||||
// #include "LocalIO.h"
|
||||
// #include "NetworkIO.h"
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
std::unique_ptr<IIO> IOFactory::create(const std::string& transportType, const std::string& instanceId) {
|
||||
auto logger = getFactoryLogger();
|
||||
logger->info("🌐 IOFactory: Creating transport '{}' with instanceId '{}'", transportType, instanceId);
|
||||
|
||||
IOType type = parseTransport(transportType);
|
||||
return create(type, instanceId);
|
||||
}
|
||||
|
||||
std::unique_ptr<IIO> IOFactory::create(IOType ioType, const std::string& instanceId) {
|
||||
auto logger = getFactoryLogger();
|
||||
std::string typeStr = transportToString(ioType);
|
||||
logger->info("🌐 IOFactory: Creating enum type '{}' with instanceId '{}'", typeStr, instanceId);
|
||||
|
||||
std::unique_ptr<IIO> io;
|
||||
|
||||
switch (ioType) {
|
||||
case IOType::INTRA: {
|
||||
logger->debug("🔧 Creating IntraIO instance");
|
||||
|
||||
// Generate instanceId if not provided
|
||||
std::string actualInstanceId = instanceId;
|
||||
if (actualInstanceId.empty()) {
|
||||
actualInstanceId = "intra-" + std::to_string(std::random_device{}() % 10000);
|
||||
logger->debug("🔧 Generated instanceId: '{}'", actualInstanceId);
|
||||
}
|
||||
|
||||
// TEMPORARY SOLUTION: Create direct IntraIO instance
|
||||
// TODO: Properly integrate with IntraIOManager without type issues
|
||||
io = std::make_unique<IntraIO>(actualInstanceId);
|
||||
|
||||
// Manually register with manager for routing
|
||||
auto& manager = IntraIOManager::getInstance();
|
||||
manager.registerInstance(actualInstanceId,
|
||||
std::static_pointer_cast<IIntraIODelivery>(
|
||||
std::shared_ptr<IntraIO>(static_cast<IntraIO*>(io.get()), [](IntraIO*) {
|
||||
// Don't delete - unique_ptr will handle it
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
logger->info("✅ IntraIO created successfully with instanceId '{}'", actualInstanceId);
|
||||
break;
|
||||
}
|
||||
|
||||
case IOType::LOCAL:
|
||||
logger->debug("🔧 Creating LocalIO instance");
|
||||
// TODO: Implement LocalIO
|
||||
// io = std::make_unique<LocalIO>();
|
||||
logger->error("❌ LocalIO not yet implemented");
|
||||
throw std::invalid_argument("LocalIO not yet implemented");
|
||||
|
||||
case IOType::NETWORK:
|
||||
logger->debug("🔧 Creating NetworkIO instance");
|
||||
// TODO: Implement NetworkIO
|
||||
// io = std::make_unique<NetworkIO>();
|
||||
logger->error("❌ NetworkIO not yet implemented");
|
||||
throw std::invalid_argument("NetworkIO not yet implemented");
|
||||
|
||||
default:
|
||||
logger->error("❌ Unknown IOType enum value: {}", static_cast<int>(ioType));
|
||||
throw std::invalid_argument("Unknown IOType enum value: " + std::to_string(static_cast<int>(ioType)));
|
||||
}
|
||||
|
||||
logger->debug("🎯 IO type verification: created transport reports type '{}'",
|
||||
transportToString(io->getType()));
|
||||
|
||||
return io;
|
||||
}
|
||||
|
||||
std::unique_ptr<IIO> IOFactory::createFromConfig(const json& config, const std::string& instanceId) {
|
||||
auto logger = getFactoryLogger();
|
||||
logger->info("🌐 IOFactory: Creating from config with instanceId '{}'", instanceId);
|
||||
logger->trace("📄 Config: {}", config.dump());
|
||||
|
||||
try {
|
||||
if (!config.contains("type")) {
|
||||
logger->error("❌ Config missing 'type' field");
|
||||
throw std::invalid_argument("IO config missing 'type' field");
|
||||
}
|
||||
|
||||
std::string transportType = config["type"];
|
||||
logger->info("📋 Config specifies transport: '{}'", transportType);
|
||||
|
||||
// Get instanceId from config or parameter
|
||||
std::string actualInstanceId = instanceId;
|
||||
if (actualInstanceId.empty() && config.contains("instance_id")) {
|
||||
actualInstanceId = config["instance_id"];
|
||||
logger->debug("🔧 Using instanceId from config: '{}'", actualInstanceId);
|
||||
}
|
||||
|
||||
// Create base IO transport
|
||||
auto io = create(transportType, actualInstanceId);
|
||||
auto ioType = io->getType();
|
||||
|
||||
// Apply transport-specific configuration
|
||||
if (ioType == IOType::NETWORK) {
|
||||
if (config.contains("host")) {
|
||||
std::string host = config["host"];
|
||||
logger->info("🔧 Network config: host '{}'", host);
|
||||
// TODO: Apply host when NetworkIO is implemented
|
||||
}
|
||||
|
||||
if (config.contains("port")) {
|
||||
int port = config["port"];
|
||||
logger->info("🔧 Network config: port {}", port);
|
||||
// TODO: Apply port when NetworkIO is implemented
|
||||
}
|
||||
|
||||
if (config.contains("protocol")) {
|
||||
std::string protocol = config["protocol"];
|
||||
logger->info("🔧 Network config: protocol '{}'", protocol);
|
||||
// TODO: Apply protocol when NetworkIO is implemented
|
||||
}
|
||||
|
||||
if (config.contains("timeout")) {
|
||||
int timeout = config["timeout"];
|
||||
logger->info("🔧 Network config: timeout {}ms", timeout);
|
||||
// TODO: Apply timeout when NetworkIO is implemented
|
||||
}
|
||||
}
|
||||
|
||||
if (ioType == IOType::LOCAL) {
|
||||
if (config.contains("socket_path")) {
|
||||
std::string socketPath = config["socket_path"];
|
||||
logger->info("🔧 Local config: socket path '{}'", socketPath);
|
||||
// TODO: Apply socket path when LocalIO is implemented
|
||||
}
|
||||
}
|
||||
|
||||
if (config.contains("buffer_size")) {
|
||||
int bufferSize = config["buffer_size"];
|
||||
logger->info("🔧 IO config: buffer size {} bytes", bufferSize);
|
||||
// TODO: Apply buffer size when implementations support it
|
||||
}
|
||||
|
||||
if (config.contains("compression")) {
|
||||
bool compression = config["compression"];
|
||||
logger->info("🔧 IO config: compression {}", compression ? "enabled" : "disabled");
|
||||
// TODO: Apply compression settings when implementations support it
|
||||
}
|
||||
|
||||
logger->info("✅ IO transport created from config successfully");
|
||||
return io;
|
||||
|
||||
} catch (const json::exception& e) {
|
||||
logger->error("❌ JSON parsing error in config: {}", e.what());
|
||||
throw std::invalid_argument("Invalid JSON in IO config: " + std::string(e.what()));
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error creating IO from config: {}", e.what());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> IOFactory::getAvailableTransports() {
|
||||
return {
|
||||
"intra",
|
||||
"local",
|
||||
"network"
|
||||
};
|
||||
}
|
||||
|
||||
bool IOFactory::isTransportSupported(const std::string& transportType) {
|
||||
try {
|
||||
parseTransport(transportType);
|
||||
return true;
|
||||
} catch (const std::invalid_argument&) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
IOType IOFactory::parseTransport(const std::string& transportStr) {
|
||||
auto logger = getFactoryLogger();
|
||||
std::string lowerTransport = toLowercase(transportStr);
|
||||
|
||||
logger->trace("🔍 Parsing transport: '{}' -> '{}'", transportStr, lowerTransport);
|
||||
|
||||
if (lowerTransport == "intra") {
|
||||
return IOType::INTRA;
|
||||
} else if (lowerTransport == "local") {
|
||||
return IOType::LOCAL;
|
||||
} else if (lowerTransport == "network" || lowerTransport == "net" || lowerTransport == "tcp") {
|
||||
return IOType::NETWORK;
|
||||
} else {
|
||||
logger->error("❌ Unknown transport: '{}'", transportStr);
|
||||
auto availableTransports = getAvailableTransports();
|
||||
std::string availableStr = "[";
|
||||
for (size_t i = 0; i < availableTransports.size(); ++i) {
|
||||
availableStr += availableTransports[i];
|
||||
if (i < availableTransports.size() - 1) availableStr += ", ";
|
||||
}
|
||||
availableStr += "]";
|
||||
|
||||
throw std::invalid_argument("Unknown transport '" + transportStr + "'. Available transports: " + availableStr);
|
||||
}
|
||||
}
|
||||
|
||||
std::string IOFactory::transportToString(IOType ioType) {
|
||||
switch (ioType) {
|
||||
case IOType::INTRA:
|
||||
return "intra";
|
||||
case IOType::LOCAL:
|
||||
return "local";
|
||||
case IOType::NETWORK:
|
||||
return "network";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
IOType IOFactory::getRecommendedTransport(int expectedClients, bool distributed, bool development) {
|
||||
auto logger = getFactoryLogger();
|
||||
|
||||
logger->debug("🎯 Recommending transport for: {} clients, distributed={}, dev={}",
|
||||
expectedClients, distributed, development);
|
||||
|
||||
if (development || expectedClients <= 1) {
|
||||
logger->debug("💡 Development/single-user -> INTRA");
|
||||
return IOType::INTRA;
|
||||
} else if (!distributed && expectedClients <= 10) {
|
||||
logger->debug("💡 Local deployment, few clients -> LOCAL");
|
||||
return IOType::LOCAL;
|
||||
} else if (distributed || expectedClients > 10) {
|
||||
logger->debug("💡 Distributed/many clients -> NETWORK");
|
||||
return IOType::NETWORK;
|
||||
} else {
|
||||
logger->debug("💡 Default fallback -> INTRA");
|
||||
return IOType::INTRA;
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<IIO> IOFactory::createWithEndpoint(const std::string& transportType, const std::string& endpoint, const std::string& instanceId) {
|
||||
auto logger = getFactoryLogger();
|
||||
logger->info("🌐 IOFactory: Creating '{}' with endpoint '{}' and instanceId '{}'", transportType, endpoint, instanceId);
|
||||
|
||||
IOType ioType = parseTransport(transportType);
|
||||
auto io = create(ioType, instanceId);
|
||||
|
||||
std::string actualEndpoint = endpoint;
|
||||
if (endpoint.empty()) {
|
||||
actualEndpoint = generateEndpoint(ioType);
|
||||
logger->info("🔧 Auto-generated endpoint: '{}'", actualEndpoint);
|
||||
}
|
||||
|
||||
// TODO: Configure endpoint when implementations support it
|
||||
logger->debug("🚧 TODO: Configure endpoint '{}' on {} transport", actualEndpoint, transportType);
|
||||
|
||||
return io;
|
||||
}
|
||||
|
||||
// Private helper methods
|
||||
std::shared_ptr<spdlog::logger> IOFactory::getFactoryLogger() {
|
||||
static std::shared_ptr<spdlog::logger> logger = nullptr;
|
||||
|
||||
if (!logger) {
|
||||
auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
|
||||
console_sink->set_level(spdlog::level::debug);
|
||||
|
||||
logger = std::make_shared<spdlog::logger>("IOFactory", console_sink);
|
||||
logger->set_level(spdlog::level::debug);
|
||||
logger->flush_on(spdlog::level::debug);
|
||||
|
||||
spdlog::register_logger(logger);
|
||||
}
|
||||
|
||||
return logger;
|
||||
}
|
||||
|
||||
std::string IOFactory::toLowercase(const std::string& str) {
|
||||
std::string result = str;
|
||||
std::transform(result.begin(), result.end(), result.begin(),
|
||||
[](char c) { return std::tolower(c); });
|
||||
return result;
|
||||
}
|
||||
|
||||
std::string IOFactory::generateEndpoint(IOType ioType) {
|
||||
switch (ioType) {
|
||||
case IOType::INTRA:
|
||||
return "intra://localhost";
|
||||
|
||||
case IOType::LOCAL:
|
||||
return "/tmp/warfactory_" + std::to_string(std::random_device{}());
|
||||
|
||||
case IOType::NETWORK: {
|
||||
// Generate random port between 8000-9000
|
||||
std::random_device rd;
|
||||
std::mt19937 gen(rd());
|
||||
std::uniform_int_distribution<> dis(8000, 9000);
|
||||
return "tcp://localhost:" + std::to_string(dis(gen));
|
||||
}
|
||||
|
||||
default:
|
||||
return "unknown://endpoint";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,484 +0,0 @@
|
||||
#include <warfactory/IntraIO.h>
|
||||
#include <warfactory/IntraIOManager.h>
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
#include <thread>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#include <spdlog/sinks/basic_file_sink.h>
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
// Factory function for IntraIOManager to avoid circular include
|
||||
std::shared_ptr<IntraIO> createIntraIOInstance(const std::string& instanceId) {
|
||||
return std::make_shared<IntraIO>(instanceId);
|
||||
}
|
||||
|
||||
IntraIO::IntraIO(const std::string& instanceId) : instanceId(instanceId) {
|
||||
// Create logger with file and console output
|
||||
auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
|
||||
auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>("logs/intra_io.log", true);
|
||||
|
||||
console_sink->set_level(spdlog::level::debug);
|
||||
file_sink->set_level(spdlog::level::trace);
|
||||
|
||||
logger = std::make_shared<spdlog::logger>("IntraIO[" + instanceId + "]",
|
||||
spdlog::sinks_init_list{console_sink, file_sink});
|
||||
logger->set_level(spdlog::level::trace);
|
||||
logger->flush_on(spdlog::level::debug);
|
||||
|
||||
spdlog::register_logger(logger);
|
||||
|
||||
logIOStart();
|
||||
lastHealthCheck = std::chrono::high_resolution_clock::now();
|
||||
}
|
||||
|
||||
IntraIO::~IntraIO() {
|
||||
logger->info("🌐 IntraIO[{}] destructor called", instanceId);
|
||||
|
||||
// Unregister from manager
|
||||
try {
|
||||
IntraIOManager::getInstance().removeInstance(instanceId);
|
||||
} catch (const std::exception& e) {
|
||||
logger->warn("⚠️ Failed to unregister from manager: {}", e.what());
|
||||
}
|
||||
|
||||
auto finalMetrics = getDetailedMetrics();
|
||||
logger->info("📊 Final IntraIO[{}] metrics:", instanceId);
|
||||
logger->info(" Total published: {}", finalMetrics["total_published"]);
|
||||
logger->info(" Total pulled: {}", finalMetrics["total_pulled"]);
|
||||
logger->info(" Total dropped: {}", finalMetrics["total_dropped"]);
|
||||
logger->info(" Final queue size: {}", finalMetrics["queue_size"]);
|
||||
|
||||
logger->trace("🏗️ IntraIO[{}] destroyed", instanceId);
|
||||
}
|
||||
|
||||
void IntraIO::publish(const std::string& topic, const json& message) {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
|
||||
logPublish(topic, message);
|
||||
totalPublished++;
|
||||
|
||||
try {
|
||||
// Route message through manager to all interested instances
|
||||
IntraIOManager::getInstance().routeMessage(instanceId, topic, message);
|
||||
logger->trace("📤 Message routed through manager: '{}'", topic);
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error publishing message to topic '{}': {}", topic, e.what());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
void IntraIO::subscribe(const std::string& topicPattern, const SubscriptionConfig& config) {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
|
||||
logSubscription(topicPattern, false);
|
||||
|
||||
try {
|
||||
// Register with manager for routing
|
||||
IntraIOManager::getInstance().registerSubscription(instanceId, topicPattern, false);
|
||||
|
||||
Subscription sub;
|
||||
sub.pattern = compileTopicPattern(topicPattern);
|
||||
sub.originalPattern = topicPattern;
|
||||
sub.config = config;
|
||||
sub.lastBatch = std::chrono::high_resolution_clock::now();
|
||||
|
||||
highFreqSubscriptions.push_back(std::move(sub));
|
||||
|
||||
logger->info("✅ High-frequency subscription added: '{}'", topicPattern);
|
||||
logger->debug("🔧 Subscription config: replaceable={}, compress={}",
|
||||
config.replaceable, config.compress);
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error creating subscription for pattern '{}': {}", topicPattern, e.what());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
void IntraIO::subscribeLowFreq(const std::string& topicPattern, const SubscriptionConfig& config) {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
|
||||
logSubscription(topicPattern, true);
|
||||
|
||||
try {
|
||||
// Register with manager for routing
|
||||
IntraIOManager::getInstance().registerSubscription(instanceId, topicPattern, true);
|
||||
|
||||
Subscription sub;
|
||||
sub.pattern = compileTopicPattern(topicPattern);
|
||||
sub.originalPattern = topicPattern;
|
||||
sub.config = config;
|
||||
sub.lastBatch = std::chrono::high_resolution_clock::now();
|
||||
|
||||
lowFreqSubscriptions.push_back(std::move(sub));
|
||||
|
||||
logger->info("✅ Low-frequency subscription added: '{}' (interval: {}ms)",
|
||||
topicPattern, config.batchInterval);
|
||||
logger->debug("🔧 LowFreq config: replaceable={}, batchSize={}, interval={}ms",
|
||||
config.replaceable, config.maxBatchSize, config.batchInterval);
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error creating low-freq subscription for pattern '{}': {}", topicPattern, e.what());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
int IntraIO::hasMessages() const {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
|
||||
int totalMessages = messageQueue.size() + lowFreqMessageQueue.size();
|
||||
|
||||
logger->trace("🔍 Messages available: {} (high-freq: {}, low-freq: {})",
|
||||
totalMessages, messageQueue.size(), lowFreqMessageQueue.size());
|
||||
|
||||
return totalMessages;
|
||||
}
|
||||
|
||||
Message IntraIO::pullMessage() {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
|
||||
Message msg;
|
||||
|
||||
// Pull from high-frequency queue first (priority)
|
||||
if (!messageQueue.empty()) {
|
||||
msg = messageQueue.front();
|
||||
messageQueue.pop();
|
||||
logger->trace("📥 Pulled high-frequency message from topic: '{}'", msg.topic);
|
||||
} else if (!lowFreqMessageQueue.empty()) {
|
||||
msg = lowFreqMessageQueue.front();
|
||||
lowFreqMessageQueue.pop();
|
||||
logger->trace("📥 Pulled low-frequency message from topic: '{}'", msg.topic);
|
||||
} else {
|
||||
logger->error("❌ No messages available to pull");
|
||||
throw std::runtime_error("No messages available in IntraIO");
|
||||
}
|
||||
|
||||
totalPulled++;
|
||||
logPull(msg);
|
||||
updateHealthMetrics();
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
IOHealth IntraIO::getHealth() const {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
updateHealthMetrics();
|
||||
|
||||
IOHealth health;
|
||||
health.queueSize = messageQueue.size() + lowFreqMessageQueue.size();
|
||||
health.maxQueueSize = maxQueueSize;
|
||||
health.dropping = health.queueSize >= maxQueueSize;
|
||||
health.averageProcessingRate = averageProcessingRate;
|
||||
health.droppedMessageCount = totalDropped.load();
|
||||
|
||||
logger->trace("🏥 Health check: queue={}/{}, dropping={}, rate={:.1f}msg/s",
|
||||
health.queueSize, health.maxQueueSize, health.dropping, health.averageProcessingRate);
|
||||
|
||||
return health;
|
||||
}
|
||||
|
||||
IOType IntraIO::getType() const {
|
||||
logger->trace("🏷️ IO type requested: INTRA");
|
||||
return IOType::INTRA;
|
||||
}
|
||||
|
||||
void IntraIO::setMaxQueueSize(size_t maxSize) {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
|
||||
logger->info("🔧 Setting max queue size: {} -> {}", maxQueueSize, maxSize);
|
||||
maxQueueSize = maxSize;
|
||||
}
|
||||
|
||||
size_t IntraIO::getMaxQueueSize() const {
|
||||
return maxQueueSize;
|
||||
}
|
||||
|
||||
void IntraIO::clearAllMessages() {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
|
||||
size_t clearedCount = messageQueue.size() + lowFreqMessageQueue.size();
|
||||
|
||||
while (!messageQueue.empty()) messageQueue.pop();
|
||||
while (!lowFreqMessageQueue.empty()) lowFreqMessageQueue.pop();
|
||||
|
||||
logger->info("🧹 Cleared all messages: {} messages removed", clearedCount);
|
||||
}
|
||||
|
||||
void IntraIO::clearAllSubscriptions() {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
|
||||
size_t clearedCount = highFreqSubscriptions.size() + lowFreqSubscriptions.size();
|
||||
|
||||
highFreqSubscriptions.clear();
|
||||
lowFreqSubscriptions.clear();
|
||||
|
||||
logger->info("🧹 Cleared all subscriptions: {} subscriptions removed", clearedCount);
|
||||
}
|
||||
|
||||
json IntraIO::getDetailedMetrics() const {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
|
||||
json metrics = {
|
||||
{"io_type", "intra"},
|
||||
{"queue_size", messageQueue.size() + lowFreqMessageQueue.size()},
|
||||
{"high_freq_queue_size", messageQueue.size()},
|
||||
{"low_freq_queue_size", lowFreqMessageQueue.size()},
|
||||
{"max_queue_size", maxQueueSize},
|
||||
{"total_published", totalPublished.load()},
|
||||
{"total_pulled", totalPulled.load()},
|
||||
{"total_dropped", totalDropped.load()},
|
||||
{"high_freq_subscriptions", highFreqSubscriptions.size()},
|
||||
{"low_freq_subscriptions", lowFreqSubscriptions.size()},
|
||||
{"average_processing_rate", averageProcessingRate}
|
||||
};
|
||||
|
||||
logger->trace("📊 Detailed metrics: {}", metrics.dump());
|
||||
return metrics;
|
||||
}
|
||||
|
||||
void IntraIO::setLogLevel(spdlog::level::level_enum level) {
|
||||
logger->info("🔧 Setting log level to: {}", spdlog::level::to_string_view(level));
|
||||
logger->set_level(level);
|
||||
}
|
||||
|
||||
size_t IntraIO::getSubscriptionCount() const {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
return highFreqSubscriptions.size() + lowFreqSubscriptions.size();
|
||||
}
|
||||
|
||||
std::vector<std::string> IntraIO::getActiveTopics() const {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
|
||||
std::unordered_set<std::string> topicSet;
|
||||
std::queue<Message> tempQueue = messageQueue;
|
||||
|
||||
while (!tempQueue.empty()) {
|
||||
topicSet.insert(tempQueue.front().topic);
|
||||
tempQueue.pop();
|
||||
}
|
||||
|
||||
tempQueue = lowFreqMessageQueue;
|
||||
while (!tempQueue.empty()) {
|
||||
topicSet.insert(tempQueue.front().topic);
|
||||
tempQueue.pop();
|
||||
}
|
||||
|
||||
return std::vector<std::string>(topicSet.begin(), topicSet.end());
|
||||
}
|
||||
|
||||
void IntraIO::simulateHighLoad(int messageCount, const std::string& topicPrefix) {
|
||||
logger->info("🧪 Simulating high load: {} messages with prefix '{}'", messageCount, topicPrefix);
|
||||
|
||||
for (int i = 0; i < messageCount; ++i) {
|
||||
json testMessage = {
|
||||
{"test_id", i},
|
||||
{"payload", "test_data_" + std::to_string(i)},
|
||||
{"timestamp", std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::high_resolution_clock::now().time_since_epoch()).count()}
|
||||
};
|
||||
|
||||
publish(topicPrefix + ":" + std::to_string(i), testMessage);
|
||||
}
|
||||
|
||||
logger->info("✅ High load simulation completed");
|
||||
}
|
||||
|
||||
void IntraIO::forceProcessLowFreqBatches() {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
logger->debug("🔧 Force processing all low-frequency batches");
|
||||
|
||||
for (auto& sub : lowFreqSubscriptions) {
|
||||
flushBatchedMessages(sub);
|
||||
}
|
||||
}
|
||||
|
||||
// Private helper methods
|
||||
void IntraIO::logIOStart() {
|
||||
logger->info("=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=");
|
||||
logger->info("🌐 INTRA-PROCESS IO INITIALIZED");
|
||||
logger->info("=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=");
|
||||
logger->info("🎯 Transport Type: INTRA (Same-process)");
|
||||
logger->info("🔧 Features: Direct function calls, zero latency");
|
||||
logger->info("📊 Performance: ~10-50ns publish, thread-safe");
|
||||
logger->info("🔧 Max queue size: {}", maxQueueSize);
|
||||
logger->trace("🏗️ IntraIO object created at: {}", static_cast<void*>(this));
|
||||
}
|
||||
|
||||
bool IntraIO::matchesPattern(const std::string& topic, const std::regex& pattern) const {
|
||||
return std::regex_match(topic, pattern);
|
||||
}
|
||||
|
||||
std::regex IntraIO::compileTopicPattern(const std::string& pattern) const {
|
||||
// Convert wildcard pattern to regex
|
||||
std::string regexPattern = pattern;
|
||||
|
||||
// Escape special regex characters except our wildcards
|
||||
std::string specialChars = ".^$+()[]{}|\\";
|
||||
for (char c : specialChars) {
|
||||
std::string from = std::string(1, c);
|
||||
std::string to = "\\" + from;
|
||||
|
||||
size_t pos = 0;
|
||||
while ((pos = regexPattern.find(from, pos)) != std::string::npos) {
|
||||
regexPattern.replace(pos, 1, to);
|
||||
pos += 2;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert * to regex equivalent
|
||||
size_t pos2 = 0;
|
||||
while ((pos2 = regexPattern.find("*", pos2)) != std::string::npos) {
|
||||
regexPattern.replace(pos2, 1, ".*");
|
||||
pos2 += 2;
|
||||
}
|
||||
|
||||
logger->trace("🔍 Compiled pattern '{}' -> '{}'", pattern, regexPattern);
|
||||
|
||||
return std::regex(regexPattern);
|
||||
}
|
||||
|
||||
void IntraIO::processLowFreqSubscriptions() {
|
||||
auto currentTime = std::chrono::high_resolution_clock::now();
|
||||
|
||||
for (auto& sub : lowFreqSubscriptions) {
|
||||
auto elapsed = std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
currentTime - sub.lastBatch).count();
|
||||
|
||||
if (elapsed >= sub.config.batchInterval) {
|
||||
logger->trace("⏰ Processing low-freq batch for pattern '{}' ({}ms elapsed)",
|
||||
sub.originalPattern, elapsed);
|
||||
flushBatchedMessages(sub);
|
||||
sub.lastBatch = currentTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void IntraIO::flushBatchedMessages(Subscription& sub) {
|
||||
size_t flushedCount = 0;
|
||||
|
||||
// Flush replaceable messages (latest only)
|
||||
for (auto& [topic, message] : sub.batchedMessages) {
|
||||
lowFreqMessageQueue.push(message);
|
||||
flushedCount++;
|
||||
logger->trace("📤 Flushed replaceable message: topic '{}', data size {}",
|
||||
topic, message.data.dump().size());
|
||||
}
|
||||
sub.batchedMessages.clear();
|
||||
|
||||
// Flush accumulated messages (all)
|
||||
for (const auto& message : sub.accumulatedMessages) {
|
||||
lowFreqMessageQueue.push(message);
|
||||
flushedCount++;
|
||||
logger->trace("📤 Flushed accumulated message: topic '{}', data size {}",
|
||||
message.topic, message.data.dump().size());
|
||||
}
|
||||
sub.accumulatedMessages.clear();
|
||||
|
||||
if (flushedCount > 0) {
|
||||
logger->debug("📦 Flushed {} low-freq messages for pattern '{}'",
|
||||
flushedCount, sub.originalPattern);
|
||||
}
|
||||
}
|
||||
|
||||
void IntraIO::updateHealthMetrics() const {
|
||||
auto currentTime = std::chrono::high_resolution_clock::now();
|
||||
auto elapsed = std::chrono::duration<float>(currentTime - lastHealthCheck).count();
|
||||
|
||||
if (elapsed >= 1.0f) { // Update every second
|
||||
size_t currentPulled = totalPulled.load();
|
||||
static size_t lastPulledCount = 0;
|
||||
|
||||
averageProcessingRate = (currentPulled - lastPulledCount) / elapsed;
|
||||
lastPulledCount = currentPulled;
|
||||
lastHealthCheck = currentTime;
|
||||
|
||||
logger->trace("📊 Health metrics updated: rate={:.1f}msg/s", averageProcessingRate);
|
||||
}
|
||||
}
|
||||
|
||||
void IntraIO::enforceQueueLimits() {
|
||||
size_t totalSize = messageQueue.size() + lowFreqMessageQueue.size();
|
||||
|
||||
if (totalSize >= maxQueueSize) {
|
||||
logger->warn("⚠️ Queue size limit reached: {}/{} - dropping oldest messages", totalSize, maxQueueSize);
|
||||
|
||||
// Drop oldest messages to make room
|
||||
size_t toDrop = totalSize - maxQueueSize + 1;
|
||||
|
||||
for (size_t i = 0; i < toDrop && !messageQueue.empty(); ++i) {
|
||||
messageQueue.pop();
|
||||
totalDropped++;
|
||||
}
|
||||
|
||||
logger->warn("🗑️ Dropped {} messages to enforce queue limit", toDrop);
|
||||
}
|
||||
}
|
||||
|
||||
void IntraIO::logPublish(const std::string& topic, const json& message) const {
|
||||
logger->trace("📡 Publishing to topic '{}', data size: {} bytes",
|
||||
topic, message.dump().size());
|
||||
}
|
||||
|
||||
void IntraIO::logSubscription(const std::string& pattern, bool isLowFreq) const {
|
||||
logger->debug("📨 {} subscription request: pattern '{}'",
|
||||
isLowFreq ? "Low-frequency" : "High-frequency", pattern);
|
||||
}
|
||||
|
||||
void IntraIO::logPull(const Message& message) const {
|
||||
logger->trace("📥 Message pulled: topic '{}', timestamp {}, data size {} bytes",
|
||||
message.topic, message.timestamp, message.data.dump().size());
|
||||
}
|
||||
|
||||
void IntraIO::deliverMessage(const std::string& topic, const json& message, bool isLowFreq) {
|
||||
std::lock_guard<std::mutex> lock(operationMutex);
|
||||
|
||||
auto timestamp = std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
std::chrono::high_resolution_clock::now().time_since_epoch()).count();
|
||||
|
||||
Message msg{topic, message, static_cast<uint64_t>(timestamp)};
|
||||
|
||||
try {
|
||||
if (isLowFreq) {
|
||||
// Handle low-frequency message delivery
|
||||
for (auto& sub : lowFreqSubscriptions) {
|
||||
if (matchesPattern(topic, sub.pattern)) {
|
||||
if (sub.config.replaceable) {
|
||||
sub.batchedMessages[topic] = msg;
|
||||
logger->trace("🔄 Low-freq replaceable message delivered: '{}'", topic);
|
||||
} else {
|
||||
sub.accumulatedMessages.push_back(msg);
|
||||
logger->trace("📚 Low-freq message accumulated: '{}'", topic);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Handle high-frequency message delivery
|
||||
logger->info("🔍 deliverMessage: looking for high-freq subscriptions for '{}', have {} subs", topic, highFreqSubscriptions.size());
|
||||
for (const auto& sub : highFreqSubscriptions) {
|
||||
logger->info("🔍 deliverMessage: testing pattern '{}' vs topic '{}'", sub.originalPattern, topic);
|
||||
if (matchesPattern(topic, sub.pattern)) {
|
||||
messageQueue.push(msg);
|
||||
logger->info("📨 High-freq message delivered to queue: '{}'", topic);
|
||||
break;
|
||||
} else {
|
||||
logger->info("❌ Pattern '{}' did not match topic '{}'", sub.originalPattern, topic);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Enforce queue limits
|
||||
enforceQueueLimits();
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error delivering message to topic '{}': {}", topic, e.what());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
const std::string& IntraIO::getInstanceId() const {
|
||||
return instanceId;
|
||||
}
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,269 +0,0 @@
|
||||
#include <warfactory/IntraIOManager.h>
|
||||
#include <warfactory/IntraIO.h>
|
||||
#include <stdexcept>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#include <spdlog/sinks/basic_file_sink.h>
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
IntraIOManager::IntraIOManager() {
|
||||
// Create logger
|
||||
auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
|
||||
auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>("logs/intra_io_manager.log", true);
|
||||
|
||||
console_sink->set_level(spdlog::level::debug);
|
||||
file_sink->set_level(spdlog::level::trace);
|
||||
|
||||
logger = std::make_shared<spdlog::logger>("IntraIOManager",
|
||||
spdlog::sinks_init_list{console_sink, file_sink});
|
||||
logger->set_level(spdlog::level::trace);
|
||||
logger->flush_on(spdlog::level::debug);
|
||||
|
||||
spdlog::register_logger(logger);
|
||||
|
||||
logger->info("🌐🔗 IntraIOManager created - Central message router initialized");
|
||||
}
|
||||
|
||||
IntraIOManager::~IntraIOManager() {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
|
||||
auto stats = getRoutingStats();
|
||||
logger->info("📊 Final routing stats:");
|
||||
logger->info(" Total routed messages: {}", stats["total_routed_messages"]);
|
||||
logger->info(" Total routes: {}", stats["total_routes"]);
|
||||
logger->info(" Active instances: {}", stats["active_instances"]);
|
||||
|
||||
instances.clear();
|
||||
routingTable.clear();
|
||||
|
||||
logger->info("🌐🔗 IntraIOManager destroyed");
|
||||
}
|
||||
|
||||
std::shared_ptr<IntraIO> IntraIOManager::createInstance(const std::string& instanceId) {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
|
||||
auto it = instances.find(instanceId);
|
||||
if (it != instances.end()) {
|
||||
logger->warn("⚠️ Instance '{}' already exists, returning existing", instanceId);
|
||||
// Need to cast back to IntraIO
|
||||
return std::static_pointer_cast<IntraIO>(it->second);
|
||||
}
|
||||
|
||||
// Create new IntraIO instance via factory function
|
||||
auto instance = createIntraIOInstance(instanceId);
|
||||
instances[instanceId] = instance;
|
||||
|
||||
logger->info("✅ Created IntraIO instance: '{}'", instanceId);
|
||||
logger->debug("📊 Total instances: {}", instances.size());
|
||||
|
||||
return instance;
|
||||
}
|
||||
|
||||
void IntraIOManager::registerInstance(const std::string& instanceId, std::shared_ptr<IIntraIODelivery> instance) {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
instances[instanceId] = instance;
|
||||
logger->info("📋 Registered instance: '{}'", instanceId);
|
||||
}
|
||||
|
||||
void IntraIOManager::removeInstance(const std::string& instanceId) {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
|
||||
auto it = instances.find(instanceId);
|
||||
if (it == instances.end()) {
|
||||
logger->warn("⚠️ Instance '{}' not found for removal", instanceId);
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove all routing entries for this instance
|
||||
routingTable.erase(
|
||||
std::remove_if(routingTable.begin(), routingTable.end(),
|
||||
[&instanceId](const RouteEntry& entry) {
|
||||
return entry.instanceId == instanceId;
|
||||
}),
|
||||
routingTable.end()
|
||||
);
|
||||
|
||||
instances.erase(it);
|
||||
|
||||
logger->info("🗑️ Removed IntraIO instance: '{}'", instanceId);
|
||||
logger->debug("📊 Remaining instances: {}", instances.size());
|
||||
}
|
||||
|
||||
std::shared_ptr<IntraIO> IntraIOManager::getInstance(const std::string& instanceId) const {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
|
||||
auto it = instances.find(instanceId);
|
||||
if (it != instances.end()) {
|
||||
return std::static_pointer_cast<IntraIO>(it->second);
|
||||
}
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
void IntraIOManager::routeMessage(const std::string& sourceId, const std::string& topic, const json& message) {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
|
||||
totalRoutedMessages++;
|
||||
size_t deliveredCount = 0;
|
||||
|
||||
logger->info("📨 Routing message: {} → '{}'", sourceId, topic);
|
||||
|
||||
// Find all matching routes
|
||||
for (const auto& route : routingTable) {
|
||||
// Don't deliver back to sender
|
||||
if (route.instanceId == sourceId) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Check pattern match
|
||||
logger->info(" 🔍 Testing pattern '{}' against topic '{}'", route.originalPattern, topic);
|
||||
if (std::regex_match(topic, route.pattern)) {
|
||||
auto targetInstance = instances.find(route.instanceId);
|
||||
if (targetInstance != instances.end()) {
|
||||
// Direct delivery to target instance's queue
|
||||
targetInstance->second->deliverMessage(topic, message, route.isLowFreq);
|
||||
deliveredCount++;
|
||||
logger->info(" ↪️ Delivered to '{}' ({})",
|
||||
route.instanceId,
|
||||
route.isLowFreq ? "low-freq" : "high-freq");
|
||||
} else {
|
||||
logger->warn("⚠️ Target instance '{}' not found for route", route.instanceId);
|
||||
}
|
||||
} else {
|
||||
logger->info(" ❌ Pattern '{}' did not match topic '{}'", route.originalPattern, topic);
|
||||
}
|
||||
}
|
||||
|
||||
if (deliveredCount > 0) {
|
||||
logger->debug("📤 Message '{}' delivered to {} instances", topic, deliveredCount);
|
||||
} else {
|
||||
logger->trace("📪 No subscribers for topic '{}'", topic);
|
||||
}
|
||||
}
|
||||
|
||||
void IntraIOManager::registerSubscription(const std::string& instanceId, const std::string& pattern, bool isLowFreq) {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
|
||||
try {
|
||||
// Convert topic pattern to regex - use same logic as IntraIO
|
||||
std::string regexPattern = pattern;
|
||||
|
||||
// Escape special regex characters except our wildcards (: is NOT special)
|
||||
std::string specialChars = ".^$+()[]{}|\\";
|
||||
for (char c : specialChars) {
|
||||
std::string from = std::string(1, c);
|
||||
std::string to = "\\" + from;
|
||||
|
||||
size_t pos = 0;
|
||||
while ((pos = regexPattern.find(from, pos)) != std::string::npos) {
|
||||
regexPattern.replace(pos, 1, to);
|
||||
pos += 2;
|
||||
}
|
||||
}
|
||||
|
||||
// Convert * to regex equivalent
|
||||
size_t pos2 = 0;
|
||||
while ((pos2 = regexPattern.find("*", pos2)) != std::string::npos) {
|
||||
regexPattern.replace(pos2, 1, ".*");
|
||||
pos2 += 2;
|
||||
}
|
||||
|
||||
logger->info("🔍 Pattern conversion: '{}' → '{}'", pattern, regexPattern);
|
||||
|
||||
RouteEntry entry;
|
||||
entry.instanceId = instanceId;
|
||||
entry.pattern = std::regex(regexPattern);
|
||||
entry.originalPattern = pattern;
|
||||
entry.isLowFreq = isLowFreq;
|
||||
|
||||
routingTable.push_back(entry);
|
||||
totalRoutes++;
|
||||
|
||||
logger->info("📋 Registered subscription: '{}' → '{}' ({})",
|
||||
instanceId, pattern, isLowFreq ? "low-freq" : "high-freq");
|
||||
logger->debug("📊 Total routes: {}", routingTable.size());
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Failed to register subscription '{}' for '{}': {}",
|
||||
pattern, instanceId, e.what());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
void IntraIOManager::unregisterSubscription(const std::string& instanceId, const std::string& pattern) {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
|
||||
auto oldSize = routingTable.size();
|
||||
routingTable.erase(
|
||||
std::remove_if(routingTable.begin(), routingTable.end(),
|
||||
[&instanceId, &pattern](const RouteEntry& entry) {
|
||||
return entry.instanceId == instanceId && entry.originalPattern == pattern;
|
||||
}),
|
||||
routingTable.end()
|
||||
);
|
||||
|
||||
auto removed = oldSize - routingTable.size();
|
||||
if (removed > 0) {
|
||||
logger->info("🗑️ Unregistered {} subscription(s): '{}' → '{}'", removed, instanceId, pattern);
|
||||
} else {
|
||||
logger->warn("⚠️ Subscription not found for removal: '{}' → '{}'", instanceId, pattern);
|
||||
}
|
||||
}
|
||||
|
||||
void IntraIOManager::clearAllRoutes() {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
|
||||
auto clearedCount = routingTable.size();
|
||||
routingTable.clear();
|
||||
|
||||
logger->info("🧹 Cleared {} routing entries", clearedCount);
|
||||
}
|
||||
|
||||
size_t IntraIOManager::getInstanceCount() const {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
return instances.size();
|
||||
}
|
||||
|
||||
std::vector<std::string> IntraIOManager::getInstanceIds() const {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
|
||||
std::vector<std::string> ids;
|
||||
for (const auto& pair : instances) {
|
||||
ids.push_back(pair.first);
|
||||
}
|
||||
return ids;
|
||||
}
|
||||
|
||||
json IntraIOManager::getRoutingStats() const {
|
||||
std::lock_guard<std::mutex> lock(managerMutex);
|
||||
|
||||
json stats;
|
||||
stats["total_routed_messages"] = totalRoutedMessages.load();
|
||||
stats["total_routes"] = totalRoutes.load();
|
||||
stats["active_instances"] = instances.size();
|
||||
stats["routing_entries"] = routingTable.size();
|
||||
|
||||
// Instance details
|
||||
json instanceDetails = json::object();
|
||||
for (const auto& pair : instances) {
|
||||
instanceDetails[pair.first] = {
|
||||
{"active", true},
|
||||
{"type", "IntraIO"}
|
||||
};
|
||||
}
|
||||
stats["instances"] = instanceDetails;
|
||||
|
||||
return stats;
|
||||
}
|
||||
|
||||
void IntraIOManager::setLogLevel(spdlog::level::level_enum level) {
|
||||
logger->set_level(level);
|
||||
logger->info("📝 Log level set to: {}", spdlog::level::to_string_view(level));
|
||||
}
|
||||
|
||||
// Singleton implementation
|
||||
IntraIOManager& IntraIOManager::getInstance() {
|
||||
static IntraIOManager instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,509 +0,0 @@
|
||||
#include <warfactory/ModuleFactory.h>
|
||||
#include <filesystem>
|
||||
#include <dlfcn.h>
|
||||
#include <algorithm>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#include <spdlog/sinks/basic_file_sink.h>
|
||||
|
||||
namespace fs = std::filesystem;
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
ModuleFactory::ModuleFactory() {
|
||||
// Create logger with file and console output
|
||||
auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
|
||||
auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>("logs/module_factory.log", true);
|
||||
|
||||
console_sink->set_level(spdlog::level::info);
|
||||
file_sink->set_level(spdlog::level::trace);
|
||||
|
||||
logger = std::make_shared<spdlog::logger>("ModuleFactory",
|
||||
spdlog::sinks_init_list{console_sink, file_sink});
|
||||
logger->set_level(spdlog::level::trace);
|
||||
logger->flush_on(spdlog::level::debug);
|
||||
|
||||
spdlog::register_logger(logger);
|
||||
|
||||
logger->info("=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=");
|
||||
logger->info("🏭 MODULE FACTORY INITIALIZED");
|
||||
logger->info("=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=");
|
||||
logger->info("🔧 Dynamic module loading with dlopen/dlsym");
|
||||
logger->info("🔥 Hot-reload support available");
|
||||
logger->info("📁 Default modules directory: ./modules/");
|
||||
|
||||
modulesDirectory = "./modules/";
|
||||
}
|
||||
|
||||
ModuleFactory::~ModuleFactory() {
|
||||
logger->info("🏭 ModuleFactory destructor called");
|
||||
unloadAllModules();
|
||||
logger->trace("🏗️ ModuleFactory destroyed");
|
||||
}
|
||||
|
||||
std::unique_ptr<IModule> ModuleFactory::loadModule(const std::string& modulePath) {
|
||||
logger->info("🏭 Loading module from path: '{}'", modulePath);
|
||||
|
||||
if (!fs::exists(modulePath)) {
|
||||
logger->error("❌ Module file not found: '{}'", modulePath);
|
||||
throw std::runtime_error("Module file not found: " + modulePath);
|
||||
}
|
||||
|
||||
if (!isValidModuleFile(modulePath)) {
|
||||
logger->error("❌ Invalid module file: '{}'", modulePath);
|
||||
throw std::runtime_error("Invalid module file: " + modulePath);
|
||||
}
|
||||
|
||||
ModuleInfo info;
|
||||
info.path = modulePath;
|
||||
|
||||
try {
|
||||
if (!loadSharedLibrary(modulePath, info)) {
|
||||
logger->error("❌ Failed to load shared library: '{}'", modulePath);
|
||||
throw std::runtime_error("Failed to load shared library: " + modulePath);
|
||||
}
|
||||
|
||||
if (!resolveSymbols(info)) {
|
||||
logger->error("❌ Failed to resolve symbols: '{}'", modulePath);
|
||||
unloadSharedLibrary(info);
|
||||
throw std::runtime_error("Failed to resolve symbols: " + modulePath);
|
||||
}
|
||||
|
||||
// Create module instance
|
||||
auto module = std::unique_ptr<IModule>(info.createFunc());
|
||||
if (!module) {
|
||||
logger->error("❌ Module creation function returned nullptr: '{}'", modulePath);
|
||||
unloadSharedLibrary(info);
|
||||
throw std::runtime_error("Module creation failed: " + modulePath);
|
||||
}
|
||||
|
||||
// Verify module type consistency
|
||||
std::string actualType = module->getType();
|
||||
if (actualType != info.type) {
|
||||
logger->warn("⚠️ Module type mismatch: expected '{}', got '{}'", info.type, actualType);
|
||||
}
|
||||
|
||||
// Register loaded module
|
||||
loadedModules[info.type] = info;
|
||||
availableModules[info.type] = modulePath;
|
||||
|
||||
logModuleLoad(info.type, modulePath);
|
||||
logger->info("✅ Module '{}' loaded successfully from '{}'", info.type, modulePath);
|
||||
|
||||
return module;
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logModuleError("load", e.what());
|
||||
unloadSharedLibrary(info);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
std::unique_ptr<IModule> ModuleFactory::createModule(const std::string& moduleType) {
|
||||
logger->info("🏭 Creating module of type: '{}'", moduleType);
|
||||
|
||||
auto it = availableModules.find(moduleType);
|
||||
if (it == availableModules.end()) {
|
||||
logger->error("❌ Module type '{}' not available", moduleType);
|
||||
|
||||
auto available = getAvailableModules();
|
||||
std::string availableStr = "[";
|
||||
for (size_t i = 0; i < available.size(); ++i) {
|
||||
availableStr += available[i];
|
||||
if (i < available.size() - 1) availableStr += ", ";
|
||||
}
|
||||
availableStr += "]";
|
||||
|
||||
throw std::invalid_argument("Module type '" + moduleType + "' not available. Available: " + availableStr);
|
||||
}
|
||||
|
||||
return loadModule(it->second);
|
||||
}
|
||||
|
||||
void ModuleFactory::scanModulesDirectory(const std::string& directory) {
|
||||
logger->info("🔍 Scanning modules directory: '{}'", directory);
|
||||
|
||||
if (!fs::exists(directory) || !fs::is_directory(directory)) {
|
||||
logger->warn("⚠️ Modules directory does not exist: '{}'", directory);
|
||||
return;
|
||||
}
|
||||
|
||||
size_t foundCount = 0;
|
||||
|
||||
for (const auto& entry : fs::directory_iterator(directory)) {
|
||||
if (entry.is_regular_file() && isValidModuleFile(entry.path().string())) {
|
||||
try {
|
||||
registerModule(entry.path().string());
|
||||
foundCount++;
|
||||
} catch (const std::exception& e) {
|
||||
logger->warn("⚠️ Failed to register module '{}': {}", entry.path().string(), e.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
logger->info("✅ Scan complete: {} modules found in '{}'", foundCount, directory);
|
||||
}
|
||||
|
||||
void ModuleFactory::registerModule(const std::string& modulePath) {
|
||||
logger->debug("📝 Registering module: '{}'", modulePath);
|
||||
|
||||
if (!fs::exists(modulePath)) {
|
||||
throw std::runtime_error("Module file not found: " + modulePath);
|
||||
}
|
||||
|
||||
if (!isValidModuleFile(modulePath)) {
|
||||
throw std::runtime_error("Invalid module file: " + modulePath);
|
||||
}
|
||||
|
||||
// Extract module type from the path for registration
|
||||
std::string moduleType = extractModuleTypeFromPath(modulePath);
|
||||
|
||||
// Quick validation - try to load and get type
|
||||
ModuleInfo tempInfo;
|
||||
tempInfo.path = modulePath;
|
||||
|
||||
if (loadSharedLibrary(modulePath, tempInfo)) {
|
||||
if (resolveSymbols(tempInfo)) {
|
||||
// Get the actual type from the module
|
||||
typedef const char* (*GetTypeFunc)();
|
||||
auto getTypeFunc = (GetTypeFunc)dlsym(tempInfo.handle, "get_module_type");
|
||||
if (getTypeFunc) {
|
||||
moduleType = getTypeFunc();
|
||||
}
|
||||
}
|
||||
unloadSharedLibrary(tempInfo);
|
||||
}
|
||||
|
||||
availableModules[moduleType] = modulePath;
|
||||
logger->debug("✅ Module '{}' registered from '{}'", moduleType, modulePath);
|
||||
}
|
||||
|
||||
void ModuleFactory::unloadModule(const std::string& moduleType) {
|
||||
logger->info("🗑️ Unloading module: '{}'", moduleType);
|
||||
|
||||
auto it = loadedModules.find(moduleType);
|
||||
if (it == loadedModules.end()) {
|
||||
logger->warn("⚠️ Module '{}' is not loaded", moduleType);
|
||||
return;
|
||||
}
|
||||
|
||||
unloadSharedLibrary(it->second);
|
||||
loadedModules.erase(it);
|
||||
|
||||
logModuleUnload(moduleType);
|
||||
logger->info("✅ Module '{}' unloaded successfully", moduleType);
|
||||
}
|
||||
|
||||
void ModuleFactory::unloadAllModules() {
|
||||
logger->info("🗑️ Unloading all modules ({} loaded)", loadedModules.size());
|
||||
|
||||
for (auto& [type, info] : loadedModules) {
|
||||
logger->debug("🗑️ Unloading module: '{}'", type);
|
||||
unloadSharedLibrary(info);
|
||||
}
|
||||
|
||||
loadedModules.clear();
|
||||
logger->info("✅ All modules unloaded");
|
||||
}
|
||||
|
||||
std::vector<std::string> ModuleFactory::getAvailableModules() const {
|
||||
std::vector<std::string> modules;
|
||||
modules.reserve(availableModules.size());
|
||||
|
||||
for (const auto& [type, path] : availableModules) {
|
||||
modules.push_back(type);
|
||||
}
|
||||
|
||||
std::sort(modules.begin(), modules.end());
|
||||
return modules;
|
||||
}
|
||||
|
||||
std::vector<std::string> ModuleFactory::getLoadedModules() const {
|
||||
std::vector<std::string> modules;
|
||||
modules.reserve(loadedModules.size());
|
||||
|
||||
for (const auto& [type, info] : loadedModules) {
|
||||
modules.push_back(type);
|
||||
}
|
||||
|
||||
std::sort(modules.begin(), modules.end());
|
||||
return modules;
|
||||
}
|
||||
|
||||
ModuleFactory::ModuleInfo ModuleFactory::getModuleInfo(const std::string& moduleType) const {
|
||||
auto it = loadedModules.find(moduleType);
|
||||
if (it != loadedModules.end()) {
|
||||
return it->second;
|
||||
}
|
||||
|
||||
// Return empty info if not loaded
|
||||
return ModuleInfo{};
|
||||
}
|
||||
|
||||
bool ModuleFactory::isModuleLoaded(const std::string& moduleType) const {
|
||||
return loadedModules.find(moduleType) != loadedModules.end();
|
||||
}
|
||||
|
||||
bool ModuleFactory::isModuleAvailable(const std::string& moduleType) const {
|
||||
return availableModules.find(moduleType) != availableModules.end();
|
||||
}
|
||||
|
||||
void ModuleFactory::setModulesDirectory(const std::string& directory) {
|
||||
logger->info("📁 Setting modules directory: '{}'", directory);
|
||||
modulesDirectory = directory;
|
||||
|
||||
// Auto-scan new directory
|
||||
if (fs::exists(directory)) {
|
||||
scanModulesDirectory(directory);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ModuleFactory::getModulesDirectory() const {
|
||||
return modulesDirectory;
|
||||
}
|
||||
|
||||
bool ModuleFactory::reloadModule(const std::string& moduleType) {
|
||||
logger->info("🔄 Reloading module: '{}'", moduleType);
|
||||
|
||||
if (!hotReloadEnabled) {
|
||||
logger->warn("⚠️ Hot-reload is disabled");
|
||||
return false;
|
||||
}
|
||||
|
||||
auto it = loadedModules.find(moduleType);
|
||||
if (it == loadedModules.end()) {
|
||||
logger->warn("⚠️ Module '{}' is not loaded, cannot reload", moduleType);
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string modulePath = it->second.path;
|
||||
|
||||
try {
|
||||
unloadModule(moduleType);
|
||||
auto reloadedModule = loadModule(modulePath);
|
||||
|
||||
logger->info("✅ Module '{}' reloaded successfully", moduleType);
|
||||
return true;
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Failed to reload module '{}': {}", moduleType, e.what());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void ModuleFactory::enableHotReload(bool enable) {
|
||||
logger->info("🔧 Hot-reload {}", enable ? "enabled" : "disabled");
|
||||
hotReloadEnabled = enable;
|
||||
}
|
||||
|
||||
bool ModuleFactory::isHotReloadEnabled() const {
|
||||
return hotReloadEnabled;
|
||||
}
|
||||
|
||||
json ModuleFactory::getDetailedStatus() const {
|
||||
json status = {
|
||||
{"modules_directory", modulesDirectory},
|
||||
{"hot_reload_enabled", hotReloadEnabled},
|
||||
{"available_modules_count", availableModules.size()},
|
||||
{"loaded_modules_count", loadedModules.size()}
|
||||
};
|
||||
|
||||
json availableList = json::array();
|
||||
for (const auto& [type, path] : availableModules) {
|
||||
availableList.push_back({
|
||||
{"type", type},
|
||||
{"path", path}
|
||||
});
|
||||
}
|
||||
status["available_modules"] = availableList;
|
||||
|
||||
json loadedList = json::array();
|
||||
for (const auto& [type, info] : loadedModules) {
|
||||
loadedList.push_back({
|
||||
{"type", type},
|
||||
{"path", info.path},
|
||||
{"version", info.version},
|
||||
{"handle", reinterpret_cast<uintptr_t>(info.handle)}
|
||||
});
|
||||
}
|
||||
status["loaded_modules"] = loadedList;
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
void ModuleFactory::validateModule(const std::string& modulePath) {
|
||||
logger->info("🔍 Validating module: '{}'", modulePath);
|
||||
|
||||
if (!fs::exists(modulePath)) {
|
||||
throw std::runtime_error("Module file not found: " + modulePath);
|
||||
}
|
||||
|
||||
if (!isValidModuleFile(modulePath)) {
|
||||
throw std::runtime_error("Invalid module file extension: " + modulePath);
|
||||
}
|
||||
|
||||
ModuleInfo tempInfo;
|
||||
tempInfo.path = modulePath;
|
||||
|
||||
if (!loadSharedLibrary(modulePath, tempInfo)) {
|
||||
throw std::runtime_error("Failed to load shared library: " + modulePath);
|
||||
}
|
||||
|
||||
if (!resolveSymbols(tempInfo)) {
|
||||
unloadSharedLibrary(tempInfo);
|
||||
throw std::runtime_error("Failed to resolve required symbols: " + modulePath);
|
||||
}
|
||||
|
||||
// Test module creation
|
||||
auto testModule = std::unique_ptr<IModule>(tempInfo.createFunc());
|
||||
if (!testModule) {
|
||||
unloadSharedLibrary(tempInfo);
|
||||
throw std::runtime_error("Module creation function returned nullptr");
|
||||
}
|
||||
|
||||
// Test module type
|
||||
std::string moduleType = testModule->getType();
|
||||
if (moduleType.empty()) {
|
||||
tempInfo.destroyFunc(testModule.release());
|
||||
unloadSharedLibrary(tempInfo);
|
||||
throw std::runtime_error("Module getType() returned empty string");
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
tempInfo.destroyFunc(testModule.release());
|
||||
unloadSharedLibrary(tempInfo);
|
||||
|
||||
logger->info("✅ Module validation passed: '{}' (type: '{}')", modulePath, moduleType);
|
||||
}
|
||||
|
||||
void ModuleFactory::setLogLevel(spdlog::level::level_enum level) {
|
||||
logger->info("🔧 Setting log level to: {}", spdlog::level::to_string_view(level));
|
||||
logger->set_level(level);
|
||||
}
|
||||
|
||||
// Private helper methods
|
||||
std::shared_ptr<spdlog::logger> ModuleFactory::getFactoryLogger() {
|
||||
return logger;
|
||||
}
|
||||
|
||||
bool ModuleFactory::loadSharedLibrary(const std::string& path, ModuleInfo& info) {
|
||||
logger->trace("📚 Loading shared library: '{}'", path);
|
||||
|
||||
// Clear any existing error
|
||||
dlerror();
|
||||
|
||||
// Load the shared library
|
||||
info.handle = dlopen(path.c_str(), RTLD_LAZY | RTLD_LOCAL);
|
||||
if (!info.handle) {
|
||||
const char* error = dlerror();
|
||||
logger->error("❌ dlopen failed for '{}': {}", path, error ? error : "unknown error");
|
||||
return false;
|
||||
}
|
||||
|
||||
logger->trace("✅ Shared library loaded: '{}'", path);
|
||||
return true;
|
||||
}
|
||||
|
||||
void ModuleFactory::unloadSharedLibrary(ModuleInfo& info) {
|
||||
if (info.handle) {
|
||||
logger->trace("🗑️ Unloading shared library: '{}'", info.path);
|
||||
|
||||
int result = dlclose(info.handle);
|
||||
if (result != 0) {
|
||||
const char* error = dlerror();
|
||||
logger->warn("⚠️ dlclose warning for '{}': {}", info.path, error ? error : "unknown error");
|
||||
}
|
||||
|
||||
info.handle = nullptr;
|
||||
info.createFunc = nullptr;
|
||||
info.destroyFunc = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
bool ModuleFactory::resolveSymbols(ModuleInfo& info) {
|
||||
logger->trace("🔍 Resolving symbols for: '{}'", info.path);
|
||||
|
||||
// Clear any existing error
|
||||
dlerror();
|
||||
|
||||
// Resolve create_module function
|
||||
typedef IModule* (*CreateFunc)();
|
||||
auto createFunc = (CreateFunc)dlsym(info.handle, "create_module");
|
||||
const char* error = dlerror();
|
||||
if (error || !createFunc) {
|
||||
logger->error("❌ Failed to resolve 'create_module': {}", error ? error : "symbol not found");
|
||||
return false;
|
||||
}
|
||||
info.createFunc = createFunc;
|
||||
|
||||
// Resolve destroy_module function
|
||||
typedef void (*DestroyFunc)(IModule*);
|
||||
auto destroyFunc = (DestroyFunc)dlsym(info.handle, "destroy_module");
|
||||
error = dlerror();
|
||||
if (error || !destroyFunc) {
|
||||
logger->error("❌ Failed to resolve 'destroy_module': {}", error ? error : "symbol not found");
|
||||
return false;
|
||||
}
|
||||
info.destroyFunc = destroyFunc;
|
||||
|
||||
// Resolve get_module_type function
|
||||
typedef const char* (*GetTypeFunc)();
|
||||
auto getTypeFunc = (GetTypeFunc)dlsym(info.handle, "get_module_type");
|
||||
error = dlerror();
|
||||
if (error || !getTypeFunc) {
|
||||
logger->error("❌ Failed to resolve 'get_module_type': {}", error ? error : "symbol not found");
|
||||
return false;
|
||||
}
|
||||
info.type = getTypeFunc();
|
||||
|
||||
// Resolve get_module_version function
|
||||
typedef const char* (*GetVersionFunc)();
|
||||
auto getVersionFunc = (GetVersionFunc)dlsym(info.handle, "get_module_version");
|
||||
error = dlerror();
|
||||
if (error || !getVersionFunc) {
|
||||
logger->warn("⚠️ Failed to resolve 'get_module_version': {}", error ? error : "symbol not found");
|
||||
info.version = "unknown";
|
||||
} else {
|
||||
info.version = getVersionFunc();
|
||||
}
|
||||
|
||||
logger->trace("✅ All symbols resolved for '{}' (type: '{}', version: '{}')",
|
||||
info.path, info.type, info.version);
|
||||
return true;
|
||||
}
|
||||
|
||||
std::string ModuleFactory::extractModuleTypeFromPath(const std::string& path) const {
|
||||
fs::path p(path);
|
||||
std::string filename = p.stem().string(); // Remove extension
|
||||
|
||||
// Remove common prefixes
|
||||
if (filename.find("lib") == 0) {
|
||||
filename = filename.substr(3);
|
||||
}
|
||||
if (filename.find("warfactory-") == 0) {
|
||||
filename = filename.substr(11);
|
||||
}
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
bool ModuleFactory::isValidModuleFile(const std::string& path) const {
|
||||
fs::path p(path);
|
||||
std::string extension = p.extension().string();
|
||||
|
||||
// Check for valid shared library extensions
|
||||
return extension == ".so" || extension == ".dylib" || extension == ".dll";
|
||||
}
|
||||
|
||||
void ModuleFactory::logModuleLoad(const std::string& type, const std::string& path) const {
|
||||
logger->debug("📦 Module loaded: type='{}', path='{}'", type, path);
|
||||
}
|
||||
|
||||
void ModuleFactory::logModuleUnload(const std::string& type) const {
|
||||
logger->debug("📤 Module unloaded: type='{}'", type);
|
||||
}
|
||||
|
||||
void ModuleFactory::logModuleError(const std::string& operation, const std::string& details) const {
|
||||
logger->error("❌ Module {} error: {}", operation, details);
|
||||
}
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,239 +0,0 @@
|
||||
#include <warfactory/ModuleSystemFactory.h>
|
||||
#include <algorithm>
|
||||
#include <thread>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
|
||||
// Include implemented systems
|
||||
#include <warfactory/SequentialModuleSystem.h>
|
||||
// Forward declarations for future implementations
|
||||
// #include "ThreadedModuleSystem.h"
|
||||
// #include "ThreadPoolModuleSystem.h"
|
||||
// #include "ClusterModuleSystem.h"
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
std::unique_ptr<IModuleSystem> ModuleSystemFactory::create(const std::string& strategy) {
|
||||
auto logger = getFactoryLogger();
|
||||
logger->info("⚙️ ModuleSystemFactory: Creating strategy '{}'", strategy);
|
||||
|
||||
ModuleSystemType type = parseStrategy(strategy);
|
||||
return create(type);
|
||||
}
|
||||
|
||||
std::unique_ptr<IModuleSystem> ModuleSystemFactory::create(ModuleSystemType systemType) {
|
||||
auto logger = getFactoryLogger();
|
||||
std::string typeStr = strategyToString(systemType);
|
||||
logger->info("⚙️ ModuleSystemFactory: Creating enum type '{}'", typeStr);
|
||||
|
||||
std::unique_ptr<IModuleSystem> moduleSystem;
|
||||
|
||||
switch (systemType) {
|
||||
case ModuleSystemType::SEQUENTIAL:
|
||||
logger->debug("🔧 Creating SequentialModuleSystem instance");
|
||||
moduleSystem = std::make_unique<SequentialModuleSystem>();
|
||||
logger->info("✅ SequentialModuleSystem created successfully");
|
||||
break;
|
||||
|
||||
case ModuleSystemType::THREADED:
|
||||
logger->debug("🔧 Creating ThreadedModuleSystem instance");
|
||||
// TODO: Implement ThreadedModuleSystem
|
||||
// moduleSystem = std::make_unique<ThreadedModuleSystem>();
|
||||
logger->error("❌ ThreadedModuleSystem not yet implemented");
|
||||
throw std::invalid_argument("ThreadedModuleSystem not yet implemented");
|
||||
|
||||
case ModuleSystemType::THREAD_POOL:
|
||||
logger->debug("🔧 Creating ThreadPoolModuleSystem instance");
|
||||
// TODO: Implement ThreadPoolModuleSystem
|
||||
// moduleSystem = std::make_unique<ThreadPoolModuleSystem>();
|
||||
logger->error("❌ ThreadPoolModuleSystem not yet implemented");
|
||||
throw std::invalid_argument("ThreadPoolModuleSystem not yet implemented");
|
||||
|
||||
case ModuleSystemType::CLUSTER:
|
||||
logger->debug("🔧 Creating ClusterModuleSystem instance");
|
||||
// TODO: Implement ClusterModuleSystem
|
||||
// moduleSystem = std::make_unique<ClusterModuleSystem>();
|
||||
logger->error("❌ ClusterModuleSystem not yet implemented");
|
||||
throw std::invalid_argument("ClusterModuleSystem not yet implemented");
|
||||
|
||||
default:
|
||||
logger->error("❌ Unknown ModuleSystemType enum value: {}", static_cast<int>(systemType));
|
||||
throw std::invalid_argument("Unknown ModuleSystemType enum value: " + std::to_string(static_cast<int>(systemType)));
|
||||
}
|
||||
|
||||
logger->debug("🎯 ModuleSystem type verification: created system reports type '{}'",
|
||||
strategyToString(moduleSystem->getType()));
|
||||
|
||||
return moduleSystem;
|
||||
}
|
||||
|
||||
std::unique_ptr<IModuleSystem> ModuleSystemFactory::createFromConfig(const json& config) {
|
||||
auto logger = getFactoryLogger();
|
||||
logger->info("⚙️ ModuleSystemFactory: Creating from config");
|
||||
logger->trace("📄 Config: {}", config.dump());
|
||||
|
||||
try {
|
||||
if (!config.contains("strategy")) {
|
||||
logger->error("❌ Config missing 'strategy' field");
|
||||
throw std::invalid_argument("ModuleSystem config missing 'strategy' field");
|
||||
}
|
||||
|
||||
std::string strategy = config["strategy"];
|
||||
logger->info("📋 Config specifies strategy: '{}'", strategy);
|
||||
|
||||
// Create base ModuleSystem
|
||||
auto moduleSystem = create(strategy);
|
||||
|
||||
// Apply additional configuration based on strategy type
|
||||
auto systemType = moduleSystem->getType();
|
||||
|
||||
if (systemType == ModuleSystemType::THREAD_POOL) {
|
||||
if (config.contains("thread_count")) {
|
||||
int threadCount = config["thread_count"];
|
||||
logger->info("🔧 Thread pool config: {} threads", threadCount);
|
||||
// TODO: Apply thread count when ThreadPoolModuleSystem is implemented
|
||||
}
|
||||
|
||||
if (config.contains("queue_size")) {
|
||||
int queueSize = config["queue_size"];
|
||||
logger->info("🔧 Thread pool config: queue size {}", queueSize);
|
||||
// TODO: Apply queue size when ThreadPoolModuleSystem is implemented
|
||||
}
|
||||
}
|
||||
|
||||
if (config.contains("priority")) {
|
||||
std::string priority = config["priority"];
|
||||
logger->info("🔧 ModuleSystem priority: {}", priority);
|
||||
// TODO: Apply priority settings when implementations support it
|
||||
}
|
||||
|
||||
logger->info("✅ ModuleSystem created from config successfully");
|
||||
return moduleSystem;
|
||||
|
||||
} catch (const json::exception& e) {
|
||||
logger->error("❌ JSON parsing error in config: {}", e.what());
|
||||
throw std::invalid_argument("Invalid JSON in ModuleSystem config: " + std::string(e.what()));
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error creating ModuleSystem from config: {}", e.what());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<std::string> ModuleSystemFactory::getAvailableStrategies() {
|
||||
return {
|
||||
"sequential",
|
||||
"threaded",
|
||||
"thread_pool",
|
||||
"cluster"
|
||||
};
|
||||
}
|
||||
|
||||
bool ModuleSystemFactory::isStrategySupported(const std::string& strategy) {
|
||||
try {
|
||||
parseStrategy(strategy);
|
||||
return true;
|
||||
} catch (const std::invalid_argument&) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
ModuleSystemType ModuleSystemFactory::parseStrategy(const std::string& strategyStr) {
|
||||
auto logger = getFactoryLogger();
|
||||
std::string lowerStrategy = toLowercase(strategyStr);
|
||||
|
||||
logger->trace("🔍 Parsing strategy: '{}' -> '{}'", strategyStr, lowerStrategy);
|
||||
|
||||
if (lowerStrategy == "sequential") {
|
||||
return ModuleSystemType::SEQUENTIAL;
|
||||
} else if (lowerStrategy == "threaded") {
|
||||
return ModuleSystemType::THREADED;
|
||||
} else if (lowerStrategy == "thread_pool" || lowerStrategy == "threadpool" || lowerStrategy == "thread-pool") {
|
||||
return ModuleSystemType::THREAD_POOL;
|
||||
} else if (lowerStrategy == "cluster") {
|
||||
return ModuleSystemType::CLUSTER;
|
||||
} else {
|
||||
logger->error("❌ Unknown strategy: '{}'", strategyStr);
|
||||
auto availableStrategies = getAvailableStrategies();
|
||||
std::string availableStr = "[";
|
||||
for (size_t i = 0; i < availableStrategies.size(); ++i) {
|
||||
availableStr += availableStrategies[i];
|
||||
if (i < availableStrategies.size() - 1) availableStr += ", ";
|
||||
}
|
||||
availableStr += "]";
|
||||
|
||||
throw std::invalid_argument("Unknown strategy '" + strategyStr + "'. Available strategies: " + availableStr);
|
||||
}
|
||||
}
|
||||
|
||||
std::string ModuleSystemFactory::strategyToString(ModuleSystemType systemType) {
|
||||
switch (systemType) {
|
||||
case ModuleSystemType::SEQUENTIAL:
|
||||
return "sequential";
|
||||
case ModuleSystemType::THREADED:
|
||||
return "threaded";
|
||||
case ModuleSystemType::THREAD_POOL:
|
||||
return "thread_pool";
|
||||
case ModuleSystemType::CLUSTER:
|
||||
return "cluster";
|
||||
default:
|
||||
return "unknown";
|
||||
}
|
||||
}
|
||||
|
||||
ModuleSystemType ModuleSystemFactory::getRecommendedStrategy(int targetFPS, int moduleCount, int cpuCores) {
|
||||
auto logger = getFactoryLogger();
|
||||
|
||||
if (cpuCores == 0) {
|
||||
cpuCores = detectCpuCores();
|
||||
}
|
||||
|
||||
logger->debug("🎯 Recommending strategy for: {}fps, {} modules, {} cores",
|
||||
targetFPS, moduleCount, cpuCores);
|
||||
|
||||
// Simple recommendation logic
|
||||
if (moduleCount <= 1) {
|
||||
logger->debug("💡 Single module -> SEQUENTIAL");
|
||||
return ModuleSystemType::SEQUENTIAL;
|
||||
} else if (moduleCount <= cpuCores && targetFPS <= 30) {
|
||||
logger->debug("💡 Few modules, low FPS -> THREADED");
|
||||
return ModuleSystemType::THREADED;
|
||||
} else if (targetFPS > 30 || moduleCount > cpuCores) {
|
||||
logger->debug("💡 High performance needs -> THREAD_POOL");
|
||||
return ModuleSystemType::THREAD_POOL;
|
||||
} else {
|
||||
logger->debug("💡 Default fallback -> SEQUENTIAL");
|
||||
return ModuleSystemType::SEQUENTIAL;
|
||||
}
|
||||
}
|
||||
|
||||
// Private helper methods
|
||||
std::shared_ptr<spdlog::logger> ModuleSystemFactory::getFactoryLogger() {
|
||||
static std::shared_ptr<spdlog::logger> logger = nullptr;
|
||||
|
||||
if (!logger) {
|
||||
auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
|
||||
console_sink->set_level(spdlog::level::debug);
|
||||
|
||||
logger = std::make_shared<spdlog::logger>("ModuleSystemFactory", console_sink);
|
||||
logger->set_level(spdlog::level::debug);
|
||||
logger->flush_on(spdlog::level::debug);
|
||||
|
||||
spdlog::register_logger(logger);
|
||||
}
|
||||
|
||||
return logger;
|
||||
}
|
||||
|
||||
std::string ModuleSystemFactory::toLowercase(const std::string& str) {
|
||||
std::string result = str;
|
||||
std::transform(result.begin(), result.end(), result.begin(),
|
||||
[](char c) { return std::tolower(c); });
|
||||
return result;
|
||||
}
|
||||
|
||||
int ModuleSystemFactory::detectCpuCores() {
|
||||
int cores = std::thread::hardware_concurrency();
|
||||
if (cores == 0) cores = 4; // Fallback
|
||||
return cores;
|
||||
}
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,276 +0,0 @@
|
||||
#include <warfactory/SequentialModuleSystem.h>
|
||||
#include <stdexcept>
|
||||
#include <spdlog/sinks/stdout_color_sinks.h>
|
||||
#include <spdlog/sinks/basic_file_sink.h>
|
||||
|
||||
namespace warfactory {
|
||||
|
||||
SequentialModuleSystem::SequentialModuleSystem() {
|
||||
// Create logger with file and console output
|
||||
auto console_sink = std::make_shared<spdlog::sinks::stdout_color_sink_mt>();
|
||||
auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>("logs/sequential_system.log", true);
|
||||
|
||||
console_sink->set_level(spdlog::level::debug);
|
||||
file_sink->set_level(spdlog::level::trace);
|
||||
|
||||
logger = std::make_shared<spdlog::logger>("SequentialModuleSystem",
|
||||
spdlog::sinks_init_list{console_sink, file_sink});
|
||||
logger->set_level(spdlog::level::trace);
|
||||
logger->flush_on(spdlog::level::debug);
|
||||
|
||||
spdlog::register_logger(logger);
|
||||
|
||||
logSystemStart();
|
||||
lastProcessTime = std::chrono::high_resolution_clock::now();
|
||||
}
|
||||
|
||||
SequentialModuleSystem::~SequentialModuleSystem() {
|
||||
logger->info("🔧 SequentialModuleSystem destructor called");
|
||||
|
||||
if (module) {
|
||||
logger->info("📊 Final performance metrics:");
|
||||
logger->info(" Total process calls: {}", processCallCount);
|
||||
logger->info(" Total process time: {:.2f}ms", totalProcessTime);
|
||||
logger->info(" Average process time: {:.3f}ms", getAverageProcessTime());
|
||||
logger->info(" Total task executions: {}", taskExecutionCount);
|
||||
}
|
||||
|
||||
logger->trace("🏗️ SequentialModuleSystem destroyed");
|
||||
}
|
||||
|
||||
void SequentialModuleSystem::setModule(std::unique_ptr<IModule> newModule) {
|
||||
logger->info("🔧 Setting module in SequentialModuleSystem");
|
||||
|
||||
if (module) {
|
||||
logger->warn("⚠️ Replacing existing module '{}' with new module", moduleName);
|
||||
try {
|
||||
module->shutdown();
|
||||
logger->debug("✅ Previous module shut down successfully");
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error shutting down previous module: {}", e.what());
|
||||
}
|
||||
}
|
||||
|
||||
if (!newModule) {
|
||||
logger->error("❌ Cannot set null module");
|
||||
throw std::invalid_argument("Cannot set null module");
|
||||
}
|
||||
|
||||
module = std::move(newModule);
|
||||
|
||||
// Get module type for better logging
|
||||
try {
|
||||
moduleName = module->getType();
|
||||
logger->info("✅ Module set successfully: type '{}'", moduleName);
|
||||
} catch (const std::exception& e) {
|
||||
logger->warn("⚠️ Could not get module type: {} - using 'unknown'", e.what());
|
||||
moduleName = "unknown";
|
||||
}
|
||||
|
||||
// Reset performance metrics for new module
|
||||
resetPerformanceMetrics();
|
||||
logger->debug("📊 Performance metrics reset for new module");
|
||||
}
|
||||
|
||||
IModule* SequentialModuleSystem::getModule() const {
|
||||
logger->trace("🔍 Module pointer requested");
|
||||
return module.get();
|
||||
}
|
||||
|
||||
int SequentialModuleSystem::processModule(float deltaTime) {
|
||||
logProcessStart(deltaTime);
|
||||
|
||||
auto processStartTime = std::chrono::high_resolution_clock::now();
|
||||
|
||||
try {
|
||||
validateModule();
|
||||
|
||||
// Create input JSON for module
|
||||
json moduleInput = {
|
||||
{"deltaTime", deltaTime},
|
||||
{"frameCount", processCallCount},
|
||||
{"system", "sequential"},
|
||||
{"timestamp", std::chrono::duration_cast<std::chrono::milliseconds>(
|
||||
processStartTime.time_since_epoch()).count()}
|
||||
};
|
||||
|
||||
logger->trace("📥 Calling module process() with input: {}", moduleInput.dump());
|
||||
|
||||
// Process the module
|
||||
module->process(moduleInput);
|
||||
|
||||
processCallCount++;
|
||||
|
||||
auto processEndTime = std::chrono::high_resolution_clock::now();
|
||||
lastProcessDuration = std::chrono::duration<float, std::milli>(processEndTime - processStartTime).count();
|
||||
totalProcessTime += lastProcessDuration;
|
||||
|
||||
logProcessEnd(lastProcessDuration);
|
||||
|
||||
// Check for performance warnings
|
||||
if (lastProcessDuration > 16.67f) { // More than 60fps budget
|
||||
logger->warn("🐌 Slow module processing: {:.2f}ms (target: <16.67ms for 60fps)", lastProcessDuration);
|
||||
}
|
||||
|
||||
logger->trace("✅ Module processing completed successfully");
|
||||
return 0; // Success
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error processing module '{}': {}", moduleName, e.what());
|
||||
logger->error("🔍 Error occurred at frame {}, deltaTime: {:.3f}ms", processCallCount, deltaTime * 1000);
|
||||
|
||||
auto processEndTime = std::chrono::high_resolution_clock::now();
|
||||
lastProcessDuration = std::chrono::duration<float, std::milli>(processEndTime - processStartTime).count();
|
||||
|
||||
logProcessEnd(lastProcessDuration);
|
||||
|
||||
return 1; // Error
|
||||
}
|
||||
}
|
||||
|
||||
ModuleSystemType SequentialModuleSystem::getType() const {
|
||||
logger->trace("🏷️ ModuleSystem type requested: SEQUENTIAL");
|
||||
return ModuleSystemType::SEQUENTIAL;
|
||||
}
|
||||
|
||||
void SequentialModuleSystem::scheduleTask(const std::string& taskType, const json& taskData) {
|
||||
logger->debug("⚙️ Task scheduled for immediate execution: '{}'", taskType);
|
||||
logTaskExecution(taskType, taskData);
|
||||
|
||||
try {
|
||||
// In sequential system, tasks execute immediately
|
||||
// This is just a placeholder - real task execution would happen here
|
||||
logger->trace("🔧 Executing task '{}' immediately", taskType);
|
||||
|
||||
// TODO: Implement actual task execution
|
||||
// For now, we just log and count
|
||||
taskExecutionCount++;
|
||||
|
||||
logger->debug("✅ Task '{}' completed immediately", taskType);
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
logger->error("❌ Error executing task '{}': {}", taskType, e.what());
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
int SequentialModuleSystem::hasCompletedTasks() const {
|
||||
// Sequential system executes tasks immediately, so no completed tasks queue
|
||||
logger->trace("🔍 Completed tasks count requested: 0 (sequential execution)");
|
||||
return 0;
|
||||
}
|
||||
|
||||
json SequentialModuleSystem::getCompletedTask() {
|
||||
logger->warn("⚠️ getCompletedTask() called on sequential system - no queued tasks");
|
||||
throw std::runtime_error("SequentialModuleSystem executes tasks immediately - no completed tasks queue");
|
||||
}
|
||||
|
||||
json SequentialModuleSystem::getPerformanceMetrics() const {
|
||||
logger->debug("📊 Performance metrics requested");
|
||||
|
||||
json metrics = {
|
||||
{"system_type", "sequential"},
|
||||
{"module_name", moduleName},
|
||||
{"process_calls", processCallCount},
|
||||
{"total_process_time_ms", totalProcessTime},
|
||||
{"average_process_time_ms", getAverageProcessTime()},
|
||||
{"last_process_time_ms", lastProcessDuration},
|
||||
{"task_executions", taskExecutionCount}
|
||||
};
|
||||
|
||||
if (processCallCount > 0) {
|
||||
auto currentTime = std::chrono::high_resolution_clock::now();
|
||||
auto totalRunTime = std::chrono::duration<float>(currentTime - lastProcessTime).count();
|
||||
metrics["total_runtime_seconds"] = totalRunTime;
|
||||
metrics["average_fps"] = totalRunTime > 0 ? processCallCount / totalRunTime : 0.0f;
|
||||
}
|
||||
|
||||
logger->trace("📄 Metrics JSON: {}", metrics.dump());
|
||||
return metrics;
|
||||
}
|
||||
|
||||
void SequentialModuleSystem::resetPerformanceMetrics() {
|
||||
logger->debug("📊 Resetting performance metrics");
|
||||
|
||||
processCallCount = 0;
|
||||
totalProcessTime = 0.0f;
|
||||
lastProcessDuration = 0.0f;
|
||||
taskExecutionCount = 0;
|
||||
lastProcessTime = std::chrono::high_resolution_clock::now();
|
||||
|
||||
logger->trace("✅ Performance metrics reset");
|
||||
}
|
||||
|
||||
float SequentialModuleSystem::getAverageProcessTime() const {
|
||||
if (processCallCount == 0) return 0.0f;
|
||||
return totalProcessTime / processCallCount;
|
||||
}
|
||||
|
||||
size_t SequentialModuleSystem::getProcessCallCount() const {
|
||||
return processCallCount;
|
||||
}
|
||||
|
||||
size_t SequentialModuleSystem::getTaskExecutionCount() const {
|
||||
return taskExecutionCount;
|
||||
}
|
||||
|
||||
void SequentialModuleSystem::setLogLevel(spdlog::level::level_enum level) {
|
||||
logger->info("🔧 Setting log level to: {}", spdlog::level::to_string_view(level));
|
||||
logger->set_level(level);
|
||||
}
|
||||
|
||||
// Private helper methods
|
||||
void SequentialModuleSystem::logSystemStart() {
|
||||
logger->info("=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=");
|
||||
logger->info("⚙️ SEQUENTIAL MODULE SYSTEM INITIALIZED");
|
||||
logger->info("=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=" "=");
|
||||
logger->info("🎯 System Type: SEQUENTIAL (Debug/Test mode)");
|
||||
logger->info("🔧 Features: Immediate execution, comprehensive logging");
|
||||
logger->info("📊 Performance: Single-threaded, deterministic");
|
||||
logger->trace("🏗️ SequentialModuleSystem object created at: {}", static_cast<void*>(this));
|
||||
}
|
||||
|
||||
void SequentialModuleSystem::logProcessStart(float deltaTime) {
|
||||
logger->trace("🎬 Process call {} START - deltaTime: {:.3f}ms, module: '{}'",
|
||||
processCallCount, deltaTime * 1000, moduleName);
|
||||
}
|
||||
|
||||
void SequentialModuleSystem::logProcessEnd(float processTime) {
|
||||
logger->trace("🏁 Process call {} END - processTime: {:.3f}ms", processCallCount, processTime);
|
||||
|
||||
// Log performance summary every 60 calls
|
||||
if (processCallCount > 0 && processCallCount % 60 == 0) {
|
||||
logger->debug("📊 Performance summary (frame {}): Avg: {:.3f}ms, Total: {:.1f}ms",
|
||||
processCallCount, getAverageProcessTime(), totalProcessTime);
|
||||
}
|
||||
}
|
||||
|
||||
void SequentialModuleSystem::logTaskExecution(const std::string& taskType, const json& taskData) {
|
||||
logger->trace("⚙️ Task execution {} - type: '{}', data size: {} bytes",
|
||||
taskExecutionCount + 1, taskType, taskData.dump().size());
|
||||
logger->trace("📄 Task data: {}", taskData.dump());
|
||||
}
|
||||
|
||||
std::unique_ptr<IModule> SequentialModuleSystem::extractModule() {
|
||||
logger->info("🔓 Extracting module from system");
|
||||
|
||||
if (!module) {
|
||||
logger->warn("⚠️ No module to extract");
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto extractedModule = std::move(module);
|
||||
moduleName = "unknown";
|
||||
|
||||
logger->info("✅ Module extracted successfully");
|
||||
return extractedModule;
|
||||
}
|
||||
|
||||
void SequentialModuleSystem::validateModule() const {
|
||||
if (!module) {
|
||||
logger->error("❌ No module set - cannot process");
|
||||
throw std::runtime_error("No module set in SequentialModuleSystem");
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace warfactory
|
||||
@ -1,261 +0,0 @@
|
||||
#include <warfactory/IModule.h>
|
||||
#include <warfactory/IIO.h>
|
||||
#include <dlfcn.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include <vector>
|
||||
#include <thread>
|
||||
#include <algorithm>
|
||||
|
||||
using json = nlohmann::json;
|
||||
using namespace warfactory;
|
||||
|
||||
// Lightweight test implementations
|
||||
class LightTestIO : public IIO {
|
||||
std::vector<Message> messageQueue;
|
||||
size_t publishCount = 0;
|
||||
|
||||
public:
|
||||
void publish(const std::string& topic, const json& message) override {
|
||||
publishCount++;
|
||||
Message msg{topic, message, static_cast<uint64_t>(
|
||||
std::chrono::high_resolution_clock::now().time_since_epoch().count())};
|
||||
messageQueue.push_back(msg);
|
||||
std::cout << "📤 [" << publishCount << "] " << topic << std::endl;
|
||||
}
|
||||
|
||||
void subscribe(const std::string& topicPattern, const SubscriptionConfig& config = {}) override {
|
||||
std::cout << "📨 Subscribed: " << topicPattern << std::endl;
|
||||
}
|
||||
|
||||
void subscribeLowFreq(const std::string& topicPattern, const SubscriptionConfig& config = {}) override {
|
||||
std::cout << "📨 LowFreq: " << topicPattern << std::endl;
|
||||
}
|
||||
|
||||
int hasMessages() const override {
|
||||
return static_cast<int>(messageQueue.size());
|
||||
}
|
||||
|
||||
Message pullMessage() override {
|
||||
if (messageQueue.empty()) {
|
||||
throw std::runtime_error("No messages");
|
||||
}
|
||||
Message msg = messageQueue.front();
|
||||
messageQueue.erase(messageQueue.begin());
|
||||
return msg;
|
||||
}
|
||||
|
||||
IOHealth getHealth() const override {
|
||||
return IOHealth{static_cast<int>(messageQueue.size()), 1000, false, 0.0f, 0};
|
||||
}
|
||||
|
||||
IOType getType() const override { return IOType::INTRA; }
|
||||
|
||||
size_t getPublishCount() const { return publishCount; }
|
||||
};
|
||||
|
||||
class LightTestScheduler : public ITaskScheduler {
|
||||
size_t taskCount = 0;
|
||||
|
||||
public:
|
||||
void scheduleTask(const std::string& taskType, const json& taskData) override {
|
||||
taskCount++;
|
||||
std::cout << "⚡ [" << taskCount << "] " << taskType << std::endl;
|
||||
}
|
||||
|
||||
int hasCompletedTasks() const override { return 0; }
|
||||
json getCompletedTask() override { throw std::runtime_error("No tasks"); }
|
||||
size_t getTaskCount() const { return taskCount; }
|
||||
};
|
||||
|
||||
struct ModuleHandle {
|
||||
void* dlHandle = nullptr;
|
||||
std::unique_ptr<IModule> module;
|
||||
std::function<IModule*()> create;
|
||||
std::function<void(IModule*)> destroy;
|
||||
std::string type;
|
||||
std::string path;
|
||||
|
||||
~ModuleHandle() {
|
||||
if (module) {
|
||||
destroy(module.release());
|
||||
}
|
||||
if (dlHandle) {
|
||||
dlclose(dlHandle);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
std::unique_ptr<ModuleHandle> loadModule(const std::string& path) {
|
||||
auto handle = std::make_unique<ModuleHandle>();
|
||||
handle->path = path;
|
||||
|
||||
// Load library
|
||||
handle->dlHandle = dlopen(path.c_str(), RTLD_LAZY);
|
||||
if (!handle->dlHandle) {
|
||||
throw std::runtime_error("dlopen failed: " + std::string(dlerror()));
|
||||
}
|
||||
|
||||
// Get entry points
|
||||
typedef IModule* (*CreateFunc)();
|
||||
typedef void (*DestroyFunc)(IModule*);
|
||||
typedef const char* (*GetTypeFunc)();
|
||||
|
||||
handle->create = (CreateFunc)dlsym(handle->dlHandle, "create_module");
|
||||
handle->destroy = (DestroyFunc)dlsym(handle->dlHandle, "destroy_module");
|
||||
auto getType = (GetTypeFunc)dlsym(handle->dlHandle, "get_module_type");
|
||||
|
||||
if (!handle->create || !handle->destroy || !getType) {
|
||||
throw std::runtime_error("Symbol resolution failed");
|
||||
}
|
||||
|
||||
handle->type = getType();
|
||||
handle->module = std::unique_ptr<IModule>(handle->create());
|
||||
|
||||
return handle;
|
||||
}
|
||||
|
||||
int main() {
|
||||
std::cout << "🔥 FOCUSED HOT-RELOAD PERFORMANCE TEST" << std::endl;
|
||||
std::cout << "=======================================" << std::endl;
|
||||
|
||||
const std::string modulePath = "../modules/debug-world-gen/debug-world-gen-light.so";
|
||||
|
||||
try {
|
||||
// Test services
|
||||
LightTestIO testIO;
|
||||
LightTestScheduler testScheduler;
|
||||
|
||||
json config = {{"seed", 123}, {"size", 150}, {"chunk_size", 24}};
|
||||
|
||||
// Performance test: Multiple hot-reload cycles
|
||||
std::cout << "\n🧪 PERFORMANCE TEST: Multiple hot-reload cycles" << std::endl;
|
||||
std::cout << "================================================" << std::endl;
|
||||
|
||||
const int cycles = 5;
|
||||
std::vector<float> reloadTimes;
|
||||
|
||||
for (int cycle = 1; cycle <= cycles; ++cycle) {
|
||||
std::cout << "\n--- Cycle " << cycle << "/" << cycles << " ---" << std::endl;
|
||||
|
||||
auto cycleStart = std::chrono::high_resolution_clock::now();
|
||||
|
||||
// Load module
|
||||
auto handle = loadModule(modulePath);
|
||||
std::cout << "📦 Module loaded: " << handle->type << std::endl;
|
||||
|
||||
// Initialize
|
||||
handle->module->initialize(config, &testIO, &testScheduler);
|
||||
std::cout << "🚀 Module initialized" << std::endl;
|
||||
|
||||
// Do some work
|
||||
json chunkRequest = {{"chunk_x", cycle}, {"chunk_y", cycle * 2}};
|
||||
testIO.publish("world:request:chunk", chunkRequest);
|
||||
|
||||
handle->module->process({});
|
||||
std::cout << "⚙️ Module processed work" << std::endl;
|
||||
|
||||
// Get state
|
||||
json state = handle->module->getState();
|
||||
int chunks = state.value("chunks_generated", 0);
|
||||
std::cout << "📊 Chunks generated: " << chunks << std::endl;
|
||||
|
||||
// Shutdown and measure complete cycle
|
||||
handle->module->shutdown();
|
||||
handle.reset(); // Cleanup
|
||||
|
||||
auto cycleEnd = std::chrono::high_resolution_clock::now();
|
||||
float cycleDuration = std::chrono::duration<float, std::milli>(cycleEnd - cycleStart).count();
|
||||
reloadTimes.push_back(cycleDuration);
|
||||
|
||||
std::cout << "⚡ Complete cycle time: " << cycleDuration << "ms" << std::endl;
|
||||
|
||||
// Brief pause
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
}
|
||||
|
||||
// Performance analysis
|
||||
std::cout << "\n📊 PERFORMANCE ANALYSIS" << std::endl;
|
||||
std::cout << "=======================" << std::endl;
|
||||
|
||||
float totalTime = 0.0f;
|
||||
float minTime = reloadTimes[0];
|
||||
float maxTime = reloadTimes[0];
|
||||
|
||||
for (float time : reloadTimes) {
|
||||
totalTime += time;
|
||||
minTime = std::min(minTime, time);
|
||||
maxTime = std::max(maxTime, time);
|
||||
}
|
||||
|
||||
float avgTime = totalTime / reloadTimes.size();
|
||||
|
||||
std::cout << "⚡ Average reload time: " << avgTime << "ms" << std::endl;
|
||||
std::cout << "🚀 Best time: " << minTime << "ms" << std::endl;
|
||||
std::cout << "🐌 Worst time: " << maxTime << "ms" << std::endl;
|
||||
std::cout << "📊 Total test time: " << totalTime << "ms" << std::endl;
|
||||
|
||||
// Test state persistence across reloads
|
||||
std::cout << "\n🧪 STATE PERSISTENCE TEST" << std::endl;
|
||||
std::cout << "=========================" << std::endl;
|
||||
|
||||
auto handle1 = loadModule(modulePath);
|
||||
handle1->module->initialize(config, &testIO, &testScheduler);
|
||||
|
||||
// Generate some work
|
||||
for (int i = 0; i < 3; ++i) {
|
||||
testIO.publish("world:request:chunk", {{"chunk_x", i}, {"chunk_y", i}});
|
||||
handle1->module->process({});
|
||||
}
|
||||
|
||||
json savedState = handle1->module->getState();
|
||||
int savedChunks = savedState.value("chunks_generated", 0);
|
||||
std::cout << "💾 State saved: " << savedChunks << " chunks" << std::endl;
|
||||
|
||||
handle1->module->shutdown();
|
||||
handle1.reset();
|
||||
|
||||
// Reload and restore
|
||||
auto handle2 = loadModule(modulePath);
|
||||
handle2->module->setState(savedState);
|
||||
handle2->module->initialize(config, &testIO, &testScheduler);
|
||||
|
||||
json restoredState = handle2->module->getState();
|
||||
int restoredChunks = restoredState.value("chunks_generated", 0);
|
||||
std::cout << "🔄 State restored: " << restoredChunks << " chunks" << std::endl;
|
||||
|
||||
if (savedChunks == restoredChunks) {
|
||||
std::cout << "✅ STATE PERSISTENCE: PERFECT!" << std::endl;
|
||||
} else {
|
||||
std::cout << "❌ STATE PERSISTENCE: FAILED!" << std::endl;
|
||||
}
|
||||
|
||||
// Final summary
|
||||
std::cout << "\n🎯 SUMMARY" << std::endl;
|
||||
std::cout << "=========" << std::endl;
|
||||
std::cout << "📈 IO Messages published: " << testIO.getPublishCount() << std::endl;
|
||||
std::cout << "⚡ Tasks scheduled: " << testScheduler.getTaskCount() << std::endl;
|
||||
|
||||
if (avgTime < 20) {
|
||||
std::cout << "🚀 BLAZING: Sub-20ms average reload!" << std::endl;
|
||||
} else if (avgTime < 50) {
|
||||
std::cout << "⚡ EXCELLENT: Sub-50ms average reload!" << std::endl;
|
||||
} else if (avgTime < 100) {
|
||||
std::cout << "✅ GOOD: Sub-100ms average reload" << std::endl;
|
||||
} else {
|
||||
std::cout << "⚠️ SLOW: Over 100ms average reload" << std::endl;
|
||||
}
|
||||
|
||||
handle2.reset();
|
||||
|
||||
std::cout << "\n🎉 HOT-RELOAD TEST COMPLETED!" << std::endl;
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "❌ Test failed: " << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1,177 +0,0 @@
|
||||
#include <warfactory/DebugEngine.h>
|
||||
#include <warfactory/EngineFactory.h>
|
||||
#include <warfactory/ModuleSystemFactory.h>
|
||||
#include <warfactory/ModuleFactory.h>
|
||||
#include <warfactory/IOFactory.h>
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
using namespace warfactory;
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main() {
|
||||
std::cout << "🔥 HOT-RELOAD INTEGRATION TEST" << std::endl;
|
||||
std::cout << "==============================" << std::endl;
|
||||
|
||||
try {
|
||||
// Create complete system
|
||||
std::cout << "🏗️ Creating complete system..." << std::endl;
|
||||
|
||||
auto engine = EngineFactory::create("debug");
|
||||
auto moduleSystem = ModuleSystemFactory::create("sequential");
|
||||
auto io = IOFactory::create("intra", "hot-reload-test");
|
||||
ModuleFactory moduleFactory;
|
||||
|
||||
std::cout << "✅ All components created" << std::endl;
|
||||
|
||||
// Setup module discovery
|
||||
moduleFactory.setModulesDirectory("../modules");
|
||||
moduleFactory.enableHotReload(true);
|
||||
|
||||
// Test 1: Load module initially
|
||||
std::cout << "\n🧪 TEST 1: Initial module loading" << std::endl;
|
||||
std::cout << "=================================" << std::endl;
|
||||
|
||||
auto module = moduleFactory.loadModule("../modules/debug-world-gen/debug-world-gen.so");
|
||||
std::cout << "📦 Module loaded: " << module->getType() << std::endl;
|
||||
|
||||
// Initialize module with test config
|
||||
json testConfig = {
|
||||
{"world_size", 100},
|
||||
{"seed", 42},
|
||||
{"chunk_size", 16}
|
||||
};
|
||||
|
||||
// Create minimal task scheduler for test
|
||||
class TestTaskScheduler : public ITaskScheduler {
|
||||
public:
|
||||
void scheduleTask(const std::string& taskType, const json& taskData) override {
|
||||
std::cout << "⚡ Task: " << taskType << std::endl;
|
||||
}
|
||||
int hasCompletedTasks() const override { return 0; }
|
||||
json getCompletedTask() override { throw std::runtime_error("No tasks"); }
|
||||
} scheduler;
|
||||
|
||||
module->initialize(testConfig, io.get(), &scheduler);
|
||||
|
||||
// Get initial state
|
||||
json initialState = module->getState();
|
||||
std::cout << "💾 Initial state captured" << std::endl;
|
||||
|
||||
// Test 2: Process some work
|
||||
std::cout << "\n🧪 TEST 2: Processing work" << std::endl;
|
||||
std::cout << "==========================" << std::endl;
|
||||
|
||||
// Simulate chunk requests via pub/sub
|
||||
json chunkRequest = {{"chunk_x", 0}, {"chunk_y", 0}};
|
||||
io->publish("world:request:chunk", chunkRequest);
|
||||
|
||||
// Process messages
|
||||
module->process({});
|
||||
|
||||
json stateAfterWork = module->getState();
|
||||
std::cout << "📊 Work completed, state updated" << std::endl;
|
||||
|
||||
// Test 3: Hot-reload simulation
|
||||
std::cout << "\n🔥 TEST 3: HOT-RELOAD SIMULATION" << std::endl;
|
||||
std::cout << "=================================" << std::endl;
|
||||
|
||||
// Save current state
|
||||
json savedState = module->getState();
|
||||
std::cout << "💾 State saved for hot-reload" << std::endl;
|
||||
|
||||
// Shutdown current module
|
||||
module->shutdown();
|
||||
std::cout << "🛑 Module shut down" << std::endl;
|
||||
|
||||
// Simulate "recompilation" delay
|
||||
std::cout << "⏳ Simulating recompilation (1s)..." << std::endl;
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1000));
|
||||
|
||||
// Reload module
|
||||
std::cout << "🔄 Reloading module..." << std::endl;
|
||||
auto reloadedModule = moduleFactory.loadModule("../modules/debug-world-gen/debug-world-gen.so");
|
||||
|
||||
// Restore state
|
||||
reloadedModule->setState(savedState);
|
||||
reloadedModule->initialize(testConfig, io.get(), &scheduler);
|
||||
|
||||
json restoredState = reloadedModule->getState();
|
||||
std::cout << "✅ Module reloaded with state preserved" << std::endl;
|
||||
|
||||
// Test 4: Verify state preservation
|
||||
std::cout << "\n🧪 TEST 4: State preservation verification" << std::endl;
|
||||
std::cout << "==========================================" << std::endl;
|
||||
|
||||
if (savedState["generated_chunks"] == restoredState["generated_chunks"]) {
|
||||
std::cout << "✅ Chunk count preserved" << std::endl;
|
||||
} else {
|
||||
std::cout << "❌ Chunk count lost" << std::endl;
|
||||
}
|
||||
|
||||
if (savedState["config"] == restoredState["config"]) {
|
||||
std::cout << "✅ Configuration preserved" << std::endl;
|
||||
} else {
|
||||
std::cout << "❌ Configuration lost" << std::endl;
|
||||
}
|
||||
|
||||
// Test 5: Config hot-swap
|
||||
std::cout << "\n🧪 TEST 5: Configuration hot-swap" << std::endl;
|
||||
std::cout << "===================================" << std::endl;
|
||||
|
||||
json newConfig = {
|
||||
{"world_size", 200}, // Changed
|
||||
{"seed", 999}, // Changed
|
||||
{"chunk_size", 32} // Changed
|
||||
};
|
||||
|
||||
io->publish("world:config:update", newConfig);
|
||||
reloadedModule->process({});
|
||||
|
||||
json finalState = reloadedModule->getState();
|
||||
if (finalState["config"]["seed"] == 999) {
|
||||
std::cout << "✅ Configuration hot-swapped successfully" << std::endl;
|
||||
} else {
|
||||
std::cout << "❌ Configuration hot-swap failed" << std::endl;
|
||||
}
|
||||
|
||||
// Test 6: Performance metrics
|
||||
std::cout << "\n📊 PERFORMANCE METRICS" << std::endl;
|
||||
std::cout << "=======================" << std::endl;
|
||||
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
|
||||
// Simulate hot-reload cycle
|
||||
json preReloadState = reloadedModule->getState();
|
||||
reloadedModule->shutdown();
|
||||
auto newModule = moduleFactory.loadModule("../modules/debug-world-gen/debug-world-gen.so");
|
||||
newModule->setState(preReloadState);
|
||||
newModule->initialize(testConfig, io.get(), &scheduler);
|
||||
|
||||
auto end = std::chrono::high_resolution_clock::now();
|
||||
auto duration = std::chrono::duration<float, std::milli>(end - start).count();
|
||||
|
||||
std::cout << "⚡ Hot-reload cycle time: " << duration << "ms" << std::endl;
|
||||
|
||||
if (duration < 100) {
|
||||
std::cout << "🚀 EXCELLENT: Sub-100ms hot-reload!" << std::endl;
|
||||
} else if (duration < 500) {
|
||||
std::cout << "✅ GOOD: Sub-500ms hot-reload" << std::endl;
|
||||
} else {
|
||||
std::cout << "⚠️ SLOW: Hot-reload over 500ms" << std::endl;
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
newModule->shutdown();
|
||||
|
||||
std::cout << "\n🎉 ALL HOT-RELOAD TESTS COMPLETED!" << std::endl;
|
||||
std::cout << "===================================" << std::endl;
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "❌ Hot-reload test failed: " << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <warfactory/EngineFactory.h>
|
||||
|
||||
using namespace warfactory;
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
std::cout << "🏭 Warfactory Modular Engine Starting..." << std::endl;
|
||||
|
||||
try {
|
||||
// Determine engine type from command line or default to debug
|
||||
std::string engineType = "debug";
|
||||
|
||||
if (argc > 1) {
|
||||
engineType = argv[1];
|
||||
std::cout << "🎯 Engine type specified: " << engineType << std::endl;
|
||||
} else {
|
||||
std::cout << "🔧 Using default engine type: " << engineType << std::endl;
|
||||
}
|
||||
|
||||
// Create engine using factory
|
||||
std::cout << "🏭 Creating engine via EngineFactory..." << std::endl;
|
||||
auto engine = EngineFactory::createEngine(engineType);
|
||||
|
||||
std::cout << "✅ Engine created successfully!" << std::endl;
|
||||
std::cout << "🎯 Engine type: " << EngineFactory::engineTypeToString(engine->getType()) << std::endl;
|
||||
|
||||
// Initialize engine
|
||||
std::cout << "🚀 Initializing engine..." << std::endl;
|
||||
engine->initialize();
|
||||
|
||||
std::cout << "⚠️ Engine initialized but no modules loaded yet" << std::endl;
|
||||
std::cout << "📋 Next steps:" << std::endl;
|
||||
std::cout << " 1. ✅ DebugEngine implemented" << std::endl;
|
||||
std::cout << " 2. ✅ EngineFactory implemented" << std::endl;
|
||||
std::cout << " 3. ⭕ Implement SequentialModuleSystem" << std::endl;
|
||||
std::cout << " 4. ⭕ Implement IntraIO" << std::endl;
|
||||
std::cout << " 5. ⭕ Create first test module" << std::endl;
|
||||
|
||||
// For now, just initialize and shutdown
|
||||
std::cout << "🛑 Shutting down engine (no main loop yet)" << std::endl;
|
||||
engine->shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
catch (const std::exception& e) {
|
||||
std::cerr << "❌ Engine failed: " << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -1,174 +0,0 @@
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <dlfcn.h>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
#include <warfactory/IModule.h>
|
||||
#include <warfactory/IIO.h>
|
||||
|
||||
using json = nlohmann::json;
|
||||
using namespace warfactory;
|
||||
|
||||
// PROPER test implementations that actually inherit from interfaces
|
||||
class TestIO : public IIO {
|
||||
public:
|
||||
void publish(const std::string& topic, const json& message) override {
|
||||
std::cout << "📤 " << topic << ": " << message.dump() << std::endl;
|
||||
}
|
||||
|
||||
void subscribe(const std::string& topicPattern, const SubscriptionConfig& config = {}) override {
|
||||
std::cout << "📨 Subscribed: " << topicPattern << std::endl;
|
||||
}
|
||||
|
||||
void subscribeLowFreq(const std::string& topicPattern, const SubscriptionConfig& config = {}) override {
|
||||
std::cout << "📨 LowFreq subscribed: " << topicPattern << std::endl;
|
||||
}
|
||||
|
||||
int hasMessages() const override {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Message pullMessage() override {
|
||||
throw std::runtime_error("No messages in test");
|
||||
}
|
||||
|
||||
IOHealth getHealth() const override {
|
||||
return IOHealth{0, 1000, false, 0.0f, 0};
|
||||
}
|
||||
|
||||
IOType getType() const override {
|
||||
return IOType::INTRA;
|
||||
}
|
||||
};
|
||||
|
||||
class TestTaskScheduler : public ITaskScheduler {
|
||||
public:
|
||||
void scheduleTask(const std::string& taskType, const json& taskData) override {
|
||||
std::cout << "⚡ Task: " << taskType << " -> " << taskData.dump() << std::endl;
|
||||
}
|
||||
|
||||
int hasCompletedTasks() const override {
|
||||
return 0;
|
||||
}
|
||||
|
||||
json getCompletedTask() override {
|
||||
throw std::runtime_error("No completed tasks in test");
|
||||
}
|
||||
};
|
||||
|
||||
int main() {
|
||||
std::cout << "🔥 MINIMAL HOT-RELOAD TEST" << std::endl;
|
||||
std::cout << "==========================" << std::endl;
|
||||
|
||||
const char* modulePath = "../modules/debug-world-gen/debug-world-gen-light.so";
|
||||
|
||||
try {
|
||||
// Test 1: Load module manually
|
||||
std::cout << "\n🧪 TEST 1: Manual dlopen/dlsym" << std::endl;
|
||||
|
||||
void* handle = dlopen(modulePath, RTLD_LAZY);
|
||||
if (!handle) {
|
||||
std::cerr << "❌ Failed to load: " << dlerror() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Get entry points
|
||||
typedef IModule* (*CreateFunc)();
|
||||
typedef void (*DestroyFunc)(IModule*);
|
||||
typedef const char* (*GetTypeFunc)();
|
||||
|
||||
CreateFunc create = (CreateFunc)dlsym(handle, "create_module");
|
||||
DestroyFunc destroy = (DestroyFunc)dlsym(handle, "destroy_module");
|
||||
GetTypeFunc getType = (GetTypeFunc)dlsym(handle, "get_module_type");
|
||||
|
||||
if (!create || !destroy || !getType) {
|
||||
std::cerr << "❌ Symbol resolution failed" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
std::cout << "✅ Module type: " << getType() << std::endl;
|
||||
|
||||
// Test 2: Create and use module
|
||||
std::cout << "\n🧪 TEST 2: Module lifecycle" << std::endl;
|
||||
|
||||
auto module = std::unique_ptr<IModule>(create());
|
||||
std::cout << "📦 Module created: " << module->getType() << std::endl;
|
||||
|
||||
// PROPER services that inherit from interfaces
|
||||
TestIO testIO;
|
||||
TestTaskScheduler testScheduler;
|
||||
|
||||
json config = {{"seed", 42}, {"size", 100}};
|
||||
|
||||
// Initialize with proper inheritance - should work!
|
||||
try {
|
||||
module->initialize(config, &testIO, &testScheduler);
|
||||
std::cout << "✅ Module initialized successfully!" << std::endl;
|
||||
} catch (const std::exception& e) {
|
||||
std::cout << "❌ Initialize failed: " << e.what() << std::endl;
|
||||
}
|
||||
|
||||
// Test state management
|
||||
json state;
|
||||
try {
|
||||
state = module->getState();
|
||||
std::cout << "📊 State: " << state.dump() << std::endl;
|
||||
} catch (...) {
|
||||
std::cout << "⚠️ getState crashed" << std::endl;
|
||||
}
|
||||
|
||||
// Test 3: Hot-reload simulation
|
||||
std::cout << "\n🔥 TEST 3: Hot-reload cycle" << std::endl;
|
||||
|
||||
auto start = std::chrono::high_resolution_clock::now();
|
||||
|
||||
// Destroy current instance
|
||||
destroy(module.release());
|
||||
std::cout << "🗑️ Module destroyed" << std::endl;
|
||||
|
||||
// Unload library
|
||||
dlclose(handle);
|
||||
std::cout << "📤 Library unloaded" << std::endl;
|
||||
|
||||
// Simulate recompilation delay
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(10));
|
||||
|
||||
// Reload
|
||||
handle = dlopen(modulePath, RTLD_LAZY);
|
||||
if (!handle) {
|
||||
std::cerr << "❌ Reload failed: " << dlerror() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
create = (CreateFunc)dlsym(handle, "create_module");
|
||||
destroy = (DestroyFunc)dlsym(handle, "destroy_module");
|
||||
|
||||
auto newModule = std::unique_ptr<IModule>(create());
|
||||
|
||||
auto end = std::chrono::high_resolution_clock::now();
|
||||
auto duration = std::chrono::duration<float, std::milli>(end - start).count();
|
||||
|
||||
std::cout << "⚡ Hot-reload time: " << duration << "ms" << std::endl;
|
||||
|
||||
if (duration < 10) {
|
||||
std::cout << "🚀 BLAZING FAST: Sub-10ms reload!" << std::endl;
|
||||
} else if (duration < 100) {
|
||||
std::cout << "✅ EXCELLENT: Sub-100ms reload!" << std::endl;
|
||||
} else {
|
||||
std::cout << "⚠️ SLOW: Over 100ms reload" << std::endl;
|
||||
}
|
||||
|
||||
// Cleanup
|
||||
destroy(newModule.release());
|
||||
dlclose(handle);
|
||||
|
||||
std::cout << "\n🎉 MINIMAL HOT-RELOAD TESTS COMPLETED!" << std::endl;
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "❌ Test failed: " << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1,190 +0,0 @@
|
||||
// Skip heavy implementations for now - test avec les minimales
|
||||
#include <warfactory/IModule.h>
|
||||
#include <warfactory/IIO.h>
|
||||
#include <dlfcn.h>
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
using namespace warfactory;
|
||||
using json = nlohmann::json;
|
||||
|
||||
int main() {
|
||||
std::cout << "🔥 FOCUSED HOT-RELOAD INTEGRATION TEST" << std::endl;
|
||||
std::cout << "======================================" << std::endl;
|
||||
|
||||
try {
|
||||
// Test the core hot-reload capability with real .so loading
|
||||
std::cout << "\n🧪 TEST: Real module hot-reload cycle" << std::endl;
|
||||
std::cout << "=====================================" << std::endl;
|
||||
|
||||
// Setup module factory
|
||||
moduleFactory->enableHotReload(true);
|
||||
std::cout << "🔥 Hot-reload enabled" << std::endl;
|
||||
|
||||
// Test 1: Load module with real system
|
||||
std::cout << "\n🧪 TEST 1: Load module with real implementations" << std::endl;
|
||||
std::cout << "=================================================" << std::endl;
|
||||
|
||||
const std::string modulePath = "../modules/debug-world-gen/debug-world-gen-light.so";
|
||||
|
||||
auto module = moduleFactory->loadModule(modulePath);
|
||||
std::cout << "📦 Module loaded: " << module->getType() << std::endl;
|
||||
|
||||
// Connect module to system
|
||||
moduleSystem->setModule(std::move(module));
|
||||
std::cout << "🔗 Module connected to SequentialModuleSystem" << std::endl;
|
||||
|
||||
// Test 2: Initialize module with real IntraIO
|
||||
std::cout << "\n🧪 TEST 2: Initialize with real IntraIO" << std::endl;
|
||||
std::cout << "========================================" << std::endl;
|
||||
|
||||
json config = {
|
||||
{"seed", 12345},
|
||||
{"size", 200},
|
||||
{"chunk_size", 32},
|
||||
{"debug_mode", true}
|
||||
};
|
||||
|
||||
// Get module back to initialize it
|
||||
IModule* modulePtr = moduleSystem->getModule();
|
||||
if (!modulePtr) {
|
||||
throw std::runtime_error("Module not found in system");
|
||||
}
|
||||
|
||||
modulePtr->initialize(config, io.get(), moduleSystem.get());
|
||||
std::cout << "✅ Module initialized with REAL IntraIO and TaskScheduler" << std::endl;
|
||||
|
||||
// Test 3: Process some real work with pub/sub
|
||||
std::cout << "\n🧪 TEST 3: Process real work with pub/sub" << std::endl;
|
||||
std::cout << "==========================================" << std::endl;
|
||||
|
||||
// Publish some chunk requests
|
||||
json chunkRequest1 = {{"chunk_x", 0}, {"chunk_y", 0}};
|
||||
json chunkRequest2 = {{"chunk_x", 1}, {"chunk_y", 1}};
|
||||
|
||||
io->publish("world:request:chunk", chunkRequest1);
|
||||
io->publish("world:request:chunk", chunkRequest2);
|
||||
|
||||
std::cout << "📤 Published 2 chunk requests" << std::endl;
|
||||
std::cout << "📊 Messages available: " << io->hasMessages() << std::endl;
|
||||
|
||||
// Process through module system
|
||||
int processResult = moduleSystem->processModule(16.67f); // ~60fps
|
||||
std::cout << "⚙️ Module processed, result code: " << processResult << std::endl;
|
||||
|
||||
// Check for generated responses
|
||||
std::cout << "📊 Messages after processing: " << io->hasMessages() << std::endl;
|
||||
|
||||
// Test 4: State management and persistence
|
||||
std::cout << "\n🧪 TEST 4: State management" << std::endl;
|
||||
std::cout << "============================" << std::endl;
|
||||
|
||||
json currentState = modulePtr->getState();
|
||||
std::cout << "📊 Current state: " << currentState.dump(2) << std::endl;
|
||||
|
||||
// Verify chunks were processed
|
||||
int chunksGenerated = currentState.value("chunks_generated", 0);
|
||||
if (chunksGenerated > 0) {
|
||||
std::cout << "✅ Module processed work: " << chunksGenerated << " chunks generated" << std::endl;
|
||||
} else {
|
||||
std::cout << "⚠️ No chunks generated (might be normal if no messages processed)" << std::endl;
|
||||
}
|
||||
|
||||
// Test 5: REAL Hot-reload with full system
|
||||
std::cout << "\n🔥 TEST 5: FULL SYSTEM HOT-RELOAD" << std::endl;
|
||||
std::cout << "==================================" << std::endl;
|
||||
|
||||
auto startReload = std::chrono::high_resolution_clock::now();
|
||||
|
||||
// Save full state
|
||||
json savedState = modulePtr->getState();
|
||||
std::cout << "💾 State saved for hot-reload" << std::endl;
|
||||
|
||||
// Remove module from system
|
||||
auto extractedModule = moduleSystem->extractModule();
|
||||
std::cout << "🔓 Module extracted from system" << std::endl;
|
||||
|
||||
// Shutdown old module
|
||||
extractedModule->shutdown();
|
||||
std::cout << "🛑 Old module shut down" << std::endl;
|
||||
|
||||
// Hot-reload via factory
|
||||
std::cout << "🔄 Hot-reloading module..." << std::endl;
|
||||
auto reloadedModule = moduleFactory->reloadModule("debug-world-gen-light");
|
||||
if (!reloadedModule) {
|
||||
// Fallback to manual reload
|
||||
reloadedModule = moduleFactory->loadModule(modulePath);
|
||||
}
|
||||
|
||||
// Restore state
|
||||
reloadedModule->setState(savedState);
|
||||
reloadedModule->initialize(config, io.get(), moduleSystem.get());
|
||||
|
||||
// Reconnect to system
|
||||
moduleSystem->setModule(std::move(reloadedModule));
|
||||
|
||||
auto endReload = std::chrono::high_resolution_clock::now();
|
||||
auto reloadDuration = std::chrono::duration<float, std::milli>(endReload - startReload).count();
|
||||
|
||||
std::cout << "⚡ COMPLETE HOT-RELOAD TIME: " << reloadDuration << "ms" << std::endl;
|
||||
|
||||
// Verify state preservation
|
||||
IModule* reloadedPtr = moduleSystem->getModule();
|
||||
json restoredState = reloadedPtr->getState();
|
||||
|
||||
if (savedState["chunks_generated"] == restoredState["chunks_generated"]) {
|
||||
std::cout << "✅ State perfectly preserved across hot-reload!" << std::endl;
|
||||
} else {
|
||||
std::cout << "❌ State lost during hot-reload" << std::endl;
|
||||
}
|
||||
|
||||
// Test 6: Continue working after hot-reload
|
||||
std::cout << "\n🧪 TEST 6: Post hot-reload functionality" << std::endl;
|
||||
std::cout << "=========================================" << std::endl;
|
||||
|
||||
// Send more work
|
||||
json chunkRequest3 = {{"chunk_x", 2}, {"chunk_y", 2}};
|
||||
io->publish("world:request:chunk", chunkRequest3);
|
||||
|
||||
processResult = moduleSystem->processModule(16.67f);
|
||||
std::cout << "⚙️ Post-reload processing result: " << processResult << std::endl;
|
||||
|
||||
json finalState = reloadedPtr->getState();
|
||||
int finalChunks = finalState.value("chunks_generated", 0);
|
||||
std::cout << "📊 Final chunks generated: " << finalChunks << std::endl;
|
||||
|
||||
// Performance summary
|
||||
std::cout << "\n📊 PERFORMANCE SUMMARY" << std::endl;
|
||||
std::cout << "======================" << std::endl;
|
||||
std::cout << "🔥 Hot-reload time: " << reloadDuration << "ms" << std::endl;
|
||||
|
||||
if (reloadDuration < 50) {
|
||||
std::cout << "🚀 BLAZING FAST: Sub-50ms complete system hot-reload!" << std::endl;
|
||||
} else if (reloadDuration < 200) {
|
||||
std::cout << "✅ EXCELLENT: Sub-200ms hot-reload!" << std::endl;
|
||||
} else if (reloadDuration < 500) {
|
||||
std::cout << "👍 GOOD: Sub-500ms hot-reload" << std::endl;
|
||||
} else {
|
||||
std::cout << "⚠️ SLOW: Hot-reload over 500ms" << std::endl;
|
||||
}
|
||||
|
||||
// Health check
|
||||
auto ioHealth = io->getHealth();
|
||||
std::cout << "📊 IO Health: queue=" << ioHealth.queueSize << "/" << ioHealth.maxQueueSize;
|
||||
std::cout << ", rate=" << ioHealth.averageProcessingRate << "msg/s" << std::endl;
|
||||
|
||||
// Cleanup
|
||||
reloadedPtr->shutdown();
|
||||
std::cout << "\n✅ System shutdown complete" << std::endl;
|
||||
|
||||
std::cout << "\n🎉 REAL HOT-RELOAD INTEGRATION TEST COMPLETED!" << std::endl;
|
||||
std::cout << "===============================================" << std::endl;
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "❌ Integration test failed: " << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1,84 +0,0 @@
|
||||
#include <warfactory/IntraIOManager.h>
|
||||
#include <warfactory/IntraIO.h>
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
using namespace warfactory;
|
||||
|
||||
int main() {
|
||||
std::cout << "🧪 Testing IntraIO routing system..." << std::endl;
|
||||
|
||||
try {
|
||||
// Create manager (singleton, auto-initialized)
|
||||
auto& manager = IntraIOManager::getInstance();
|
||||
manager.setLogLevel(spdlog::level::trace);
|
||||
|
||||
// Create two module instances through manager
|
||||
auto moduleA = manager.createInstance("module-a");
|
||||
auto moduleB = manager.createInstance("module-b");
|
||||
|
||||
// Module A subscribes to "test:*"
|
||||
moduleA->subscribe("test:*");
|
||||
std::cout << "✅ Module A subscribed to 'test:*'" << std::endl;
|
||||
|
||||
// Module B subscribes to "test:data"
|
||||
moduleB->subscribe("test:data");
|
||||
std::cout << "✅ Module B subscribed to 'test:data'" << std::endl;
|
||||
|
||||
// Wait a bit for subscriptions to register
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(100));
|
||||
|
||||
// Module A publishes a message
|
||||
nlohmann::json testData = {{"value", 42}, {"source", "module-a"}};
|
||||
moduleA->publish("test:data", testData);
|
||||
std::cout << "📤 Module A published message to 'test:data'" << std::endl;
|
||||
|
||||
// Wait for routing
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
|
||||
// Check if modules received messages
|
||||
std::cout << "\n📊 Checking message reception:" << std::endl;
|
||||
std::cout << "Module A has " << moduleA->hasMessages() << " messages" << std::endl;
|
||||
std::cout << "Module B has " << moduleB->hasMessages() << " messages" << std::endl;
|
||||
|
||||
// Module B should have received the message
|
||||
if (moduleB->hasMessages() > 0) {
|
||||
auto msg = moduleB->pullMessage();
|
||||
std::cout << "✅ Module B received: " << msg.topic << " -> " << msg.data.dump() << std::endl;
|
||||
} else {
|
||||
std::cout << "❌ Module B did not receive message" << std::endl;
|
||||
}
|
||||
|
||||
// Test another direction - Module B publishes to Module A
|
||||
nlohmann::json responseData = {{"response", "ok"}, {"source", "module-b"}};
|
||||
moduleB->publish("test:response", responseData);
|
||||
std::cout << "\n📤 Module B published message to 'test:response'" << std::endl;
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
|
||||
// Module A should receive it (subscribed to test:*)
|
||||
std::cout << "Module A has " << moduleA->hasMessages() << " messages" << std::endl;
|
||||
if (moduleA->hasMessages() > 0) {
|
||||
auto msg = moduleA->pullMessage();
|
||||
std::cout << "✅ Module A received: " << msg.topic << " -> " << msg.data.dump() << std::endl;
|
||||
} else {
|
||||
std::cout << "❌ Module A did not receive message" << std::endl;
|
||||
std::cout << "🔍 Debug: Pattern 'test:*' should match 'test:response'" << std::endl;
|
||||
}
|
||||
|
||||
// Show routing stats
|
||||
auto stats = manager.getRoutingStats();
|
||||
std::cout << "\n📊 Final routing statistics:" << std::endl;
|
||||
std::cout << " Routed messages: " << stats["total_routed_messages"] << std::endl;
|
||||
std::cout << " Total routes: " << stats["total_routes"] << std::endl;
|
||||
std::cout << " Active instances: " << stats["active_instances"] << std::endl;
|
||||
|
||||
std::cout << "\n🎉 Test completed successfully!" << std::endl;
|
||||
return 0;
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "❌ Test failed: " << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@ -1,75 +0,0 @@
|
||||
#include <warfactory/IOFactory.h>
|
||||
#include <warfactory/IntraIOManager.h>
|
||||
#include <iostream>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
using namespace warfactory;
|
||||
|
||||
int main() {
|
||||
std::cout << "🧪 Testing unified IOFactory with IntraIO routing..." << std::endl;
|
||||
|
||||
try {
|
||||
// Create two instances via IOFactory (like modules would)
|
||||
auto moduleIO1 = IOFactory::create("intra", "module-factory-test-1");
|
||||
auto moduleIO2 = IOFactory::create("intra", "module-factory-test-2");
|
||||
|
||||
std::cout << "✅ Created 2 IO instances via IOFactory" << std::endl;
|
||||
|
||||
// Test subscriptions
|
||||
moduleIO1->subscribe("test:*");
|
||||
moduleIO2->subscribe("test:data");
|
||||
|
||||
std::cout << "✅ Set up subscriptions" << std::endl;
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
|
||||
// Test messaging between factory-created instances
|
||||
nlohmann::json testData = {{"message", "from factory test"}, {"source", "module1"}};
|
||||
moduleIO1->publish("test:data", testData);
|
||||
|
||||
std::cout << "📤 Module 1 published message" << std::endl;
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
|
||||
// Check if module 2 received it
|
||||
if (moduleIO2->hasMessages() > 0) {
|
||||
auto msg = moduleIO2->pullMessage();
|
||||
std::cout << "✅ Module 2 received: " << msg.topic << " -> " << msg.data.dump() << std::endl;
|
||||
} else {
|
||||
std::cout << "❌ Module 2 did not receive message" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Test the reverse direction
|
||||
nlohmann::json responseData = {{"response", "ok"}, {"source", "module2"}};
|
||||
moduleIO2->publish("test:response", responseData);
|
||||
|
||||
std::cout << "📤 Module 2 published response" << std::endl;
|
||||
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(50));
|
||||
|
||||
// Module 1 should receive it (subscribed to test:*)
|
||||
if (moduleIO1->hasMessages() > 0) {
|
||||
auto msg = moduleIO1->pullMessage();
|
||||
std::cout << "✅ Module 1 received: " << msg.topic << " -> " << msg.data.dump() << std::endl;
|
||||
} else {
|
||||
std::cout << "❌ Module 1 did not receive response" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
// Show manager stats
|
||||
auto& manager = IntraIOManager::getInstance();
|
||||
auto stats = manager.getRoutingStats();
|
||||
std::cout << "\n📊 Manager statistics:" << std::endl;
|
||||
std::cout << " Routed messages: " << stats["total_routed_messages"] << std::endl;
|
||||
std::cout << " Active instances: " << stats["active_instances"] << std::endl;
|
||||
|
||||
std::cout << "\n🎉 Unified system test PASSED!" << std::endl;
|
||||
return 0;
|
||||
|
||||
} catch (const std::exception& e) {
|
||||
std::cerr << "❌ Test failed: " << e.what() << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
166
docs/02-systems/SIZE_CONSTRAINTS_GUIDE.md
Normal file
@ -0,0 +1,166 @@
|
||||
# 📏 Size Constraints Guide
|
||||
|
||||
## Overview
|
||||
|
||||
Le système IUI supporte maintenant les **contraintes de taille en pixels** pour tous les types de fenêtres et docks.
|
||||
|
||||
## ⚙️ Types de contraintes
|
||||
|
||||
### **min_size** - Taille minimum
|
||||
```json
|
||||
{
|
||||
"min_size": {"width": 200, "height": 150}
|
||||
}
|
||||
```
|
||||
- Empêche l'utilisateur de rendre la fenêtre trop petite
|
||||
- Garantit que le contenu reste utilisable
|
||||
- **Obligatoire** pour les fenêtres critiques (console, alerts)
|
||||
|
||||
### **max_size** - Taille maximum
|
||||
```json
|
||||
{
|
||||
"max_size": {"width": 800, "height": 600}
|
||||
}
|
||||
```
|
||||
- Empêche les fenêtres de dominer l'écran
|
||||
- Maintient la cohérence de l'interface
|
||||
- Utile pour les popups et dialogs
|
||||
|
||||
### **size** - Taille initiale
|
||||
```json
|
||||
{
|
||||
"size": {"width": 400, "height": 300}
|
||||
}
|
||||
```
|
||||
- Taille au moment de la création
|
||||
- Sera **clampée** entre min_size et max_size
|
||||
- Si hors limites, ajustée automatiquement
|
||||
|
||||
## 🏗️ Usage par type de fenêtre
|
||||
|
||||
### **Docks**
|
||||
```cpp
|
||||
ui->createDock("sidebar", DockType::TABBED, DockPosition::LEFT, {
|
||||
{"size", {{"width", 300}}},
|
||||
{"min_size", {{"width", 200}, {"height", 300}}},
|
||||
{"max_size", {{"width", 500}, {"height", 1000}}},
|
||||
{"resizable", true}
|
||||
});
|
||||
```
|
||||
|
||||
### **Splits**
|
||||
```cpp
|
||||
ui->createSplit("main_split", Orientation::HORIZONTAL, {
|
||||
{"min_panel_size", 80}, // Chaque panel min 80px
|
||||
{"min_size", {{"width", 600}, {"height", 400}}}, // Split total min 600x400
|
||||
{"split_ratio", 0.6} // 60% / 40%
|
||||
});
|
||||
```
|
||||
|
||||
### **Content Windows**
|
||||
```cpp
|
||||
ui->showData(DataType::ECONOMY, {
|
||||
{"content", {...}},
|
||||
{"window", {
|
||||
{"id", "economy_dash"},
|
||||
{"size", {{"width", 350}, {"height", 250}}},
|
||||
{"min_size", {{"width", 300}, {"height", 200}}}, // Lisibilité
|
||||
{"max_size", {{"width", 600}, {"height", 400}}}, // Pas trop invasif
|
||||
{"resizable", true}
|
||||
}}
|
||||
});
|
||||
```
|
||||
|
||||
### **Floating Windows**
|
||||
```cpp
|
||||
ui->showData(DataType::ALERTS, {
|
||||
{"content", {...}},
|
||||
{"window", {
|
||||
{"floating", true},
|
||||
{"size", {{"width", 400}, {"height", 200}}},
|
||||
{"min_size", {{"width", 320}, {"height", 150}}}, // Alert lisible
|
||||
{"max_size", {{"width", 600}, {"height", 300}}}, // Pas trop grosse
|
||||
{"closeable", true}
|
||||
}}
|
||||
});
|
||||
```
|
||||
|
||||
## 📋 Recommandations par usage
|
||||
|
||||
### **Console/Log windows**
|
||||
- **min_size**: `{"width": 400, "height": 100}` (au moins 3-4 lignes)
|
||||
- **max_size**: `{"width": 2000, "height": 300}` (pas trop haute)
|
||||
|
||||
### **Economy/Data tables**
|
||||
- **min_size**: `{"width": 250, "height": 200}` (colonnes lisibles)
|
||||
- **max_size**: `{"width": 500, "height": 600}` (pas trop large)
|
||||
|
||||
### **Maps/Graphics**
|
||||
- **min_size**: `{"width": 300, "height": 300}` (détails visibles)
|
||||
- **max_size**: `{"width": 1200, "height": 1200}` (performance)
|
||||
|
||||
### **Inventory grids**
|
||||
- **min_size**: `{"width": 200, "height": 150}` (grid 2x2 minimum)
|
||||
- **max_size**: `{"width": 400, "height": 500}` (pas trop de scroll)
|
||||
|
||||
### **Settings/Dialogs**
|
||||
- **min_size**: `{"width": 320, "height": 240}` (tous contrôles visibles)
|
||||
- **max_size**: `{"width": 500, "height": 400}` (taille raisonnable)
|
||||
|
||||
### **Alert popups**
|
||||
- **min_size**: `{"width": 300, "height": 120}` (texte lisible)
|
||||
- **max_size**: `{"width": 500, "height": 250}` (pas invasif)
|
||||
|
||||
## 🔄 Comportement automatique
|
||||
|
||||
### **Clamping**
|
||||
Si `size` est hors des limites :
|
||||
```cpp
|
||||
// Taille demandée : 100x50
|
||||
// min_size : 200x150
|
||||
// max_size : 800x600
|
||||
// → Résultat : 200x150 (clampée au minimum)
|
||||
```
|
||||
|
||||
### **Resize interactif**
|
||||
- L'utilisateur ne peut **jamais** redimensionner en dessous de `min_size`
|
||||
- L'utilisateur ne peut **jamais** redimensionner au-dessus de `max_size`
|
||||
- Les **cursors de resize** changent quand les limites sont atteintes
|
||||
|
||||
### **Split constraints**
|
||||
```cpp
|
||||
{
|
||||
"min_panel_size": 80, // Chaque panel minimum 80px
|
||||
"split_ratio": 0.7 // Mais peut être ajusté si ça viole min_panel_size
|
||||
}
|
||||
```
|
||||
|
||||
## ⚡ Performance
|
||||
|
||||
- **Enums** pour types communs = comparaisons int rapides
|
||||
- **JSON** pour config flexible = parse une fois à la création
|
||||
- **Pixel constraints** appliquées côté implémentation (ImGui, HTML, etc.)
|
||||
- **Zero overhead** si pas de contraintes spécifiées
|
||||
|
||||
## 🎯 Exemple complet
|
||||
|
||||
```cpp
|
||||
// Créer layout avec contraintes
|
||||
ui->createDock("main_sidebar", DockType::TABBED, DockPosition::LEFT, {
|
||||
{"min_size", {{"width", 250}, {"height", 400}}},
|
||||
{"max_size", {{"width", 500}, {"height", 1000}}}
|
||||
});
|
||||
|
||||
// Ajouter contenu avec contraintes
|
||||
ui->showData(DataType::ECONOMY, {
|
||||
{"content", {{"prices", {...}}}},
|
||||
{"window", {
|
||||
{"parent", "main_sidebar"},
|
||||
{"dock", "tab"},
|
||||
{"min_size", {{"width", 240}, {"height", 200}}},
|
||||
{"max_size", {{"width", 450}, {"height", 600}}}
|
||||
}}
|
||||
});
|
||||
```
|
||||
|
||||
**Résultat** : Interface qui reste **utilisable** à toutes les tailles ! 🚀
|
||||
173
docs/Sources Documentaires/SMP.md
Normal file
@ -0,0 +1,173 @@
|
||||
Sociétés Militaires Privées : Analyse Stratégique et Étude de Cas d'Executive Outcomes
|
||||
|
||||
Synthèse Exécutive
|
||||
|
||||
Ce document de synthèse analyse le phénomène croissant des Sociétés Militaires Privées (SMP), des entités qui opèrent dans des secteurs traditionnellement réservés aux forces armées étatiques. Poussé par des logiques économiques post-Guerre Froide, des impératifs de discrétion politique et la volonté de contourner les contraintes légales, le recours aux SMP s'est intensifié depuis les années 1980.
|
||||
|
||||
Le secteur se caractérise par une grande diversité de modèles. Le modèle américain privilégie le soutien logistique aux armées régulières, tandis que le modèle chinois, en pleine expansion, est dédié à la protection des intérêts économiques de l'État. Le modèle russe, incarné par le groupe Wagner, est une forme hybride, agissant à la fois en soutien de l'armée et de manière autonome pour des objectifs géopolitiques et économiques.
|
||||
|
||||
L'archétype du modèle sud-africain est Executive Outcomes (EO), une SMP qui a démontré une efficacité redoutable dans les années 1990. Son étude de cas révèle un modèle d'affaires sophistiqué, intégrant verticalement les opérations militaires, l'exploitation de ressources naturelles (pétrole, diamants) et une structure corporative complexe conçue pour maximiser les profits tout en naviguant dans les zones grises du droit international. Fondée par d'anciens membres des forces spéciales sud-africaines de l'ère de l'apartheid, EO a mené des campagnes militaires autonomes en Angola et en Sierra Leone, liant directement ses succès militaires à l'obtention de concessions minières et pétrolières.
|
||||
|
||||
Cependant, l'emploi des SMP soulève de graves questions éthiques et stratégiques : violations des droits humains (massacre de la place Nissour, torture à Abou Ghraib), guerres par procuration entre puissances, perte de compétences pour les armées nationales et manque de transparence. L'avenir du secteur est appelé à se développer, notamment avec l'émergence d'un vaste contingent de combattants expérimentés issus de la guerre en Ukraine, promettant une nouvelle ère de complexité dans les conflits mondiaux.
|
||||
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
|
||||
1. Le Phénomène des Sociétés Militaires Privées (SMP)
|
||||
|
||||
1.1. Définition et Spectre d'Activités
|
||||
|
||||
Une Société Militaire Privée (SMP) est une entreprise privée qui fournit des services et des compétences de nature militaire ou opérant dans un contexte militarisé. Leurs activités couvrent un large spectre :
|
||||
|
||||
* Soutien logistique aux armées régulières.
|
||||
* Conseil et formation de forces armées étrangères.
|
||||
* Protection de personnes (VIP), de biens et de convois.
|
||||
* Gardiennage d'infrastructures critiques (champs pétroliers, mines).
|
||||
* Participation directe aux combats et opérations offensives.
|
||||
|
||||
1.2. Distinction avec le Mercenariat Traditionnel
|
||||
|
||||
Le statut juridique des SMP est ambigu, leur permettant souvent d'échapper à la définition stricte du mercenariat.
|
||||
|
||||
* Article 47 du protocole additionnel de 1977 aux Conventions de Genève : Définit un mercenaire comme un combattant recruté spécifiquement pour un conflit, qui n'est pas ressortissant d'une des parties au conflit, et dont la rémunération est nettement supérieure à celle d'un militaire de rang similaire.
|
||||
* Conventions Internationales : La Convention de l'Organisation de l'Unité Africaine de 1977 et la Convention de l'ONU de 2001 tentent d'encadrer le mercenariat, mais cette dernière n'a été ratifiée que par huit États et a peu d'impact.
|
||||
|
||||
En pratique, les grandes SMP structurent leurs activités pour ne pas être considérées légalement comme du mercenariat, bien que la distinction sur le terrain soit souvent ténue.
|
||||
|
||||
1.3. Aperçu Historique
|
||||
|
||||
L'emploi d'acteurs militaires privés par des États n'est pas nouveau et remonte à plusieurs décennies avant l'ère contemporaine.
|
||||
|
||||
* Seconde Guerre mondiale (1940) : L'entreprise américaine Central Aircraft Manufacturing Company (CAMC) monte l'escadrille des "Flying Tigers" pour soutenir la Chine contre le Japon.
|
||||
* Guerre du Vietnam : L'entreprise Civil Air Transport ("Air America"), héritière de la CAMC, collabore avec la CIA pour des opérations au Vietnam.
|
||||
* Années 1960-70 :
|
||||
* Watchgard International Limited (1966) : Créée par David Sterling, fondateur des SAS britanniques, elle propose des formations et participe à des combats en Amérique du Sud, en Afrique et au Moyen-Orient.
|
||||
* Kini Mini Services (1975) : Cette SMP britannique forme les moudjahidines afghans pour combattre l'URSS.
|
||||
|
||||
2. Modèles Opérationnels des SMP à l'Échelle Mondiale
|
||||
|
||||
2.1. Le Modèle Sud-Africain
|
||||
|
||||
Représenté par Executive Outcomes, ce modèle est le plus proche du mercenariat traditionnel.
|
||||
|
||||
* Caractéristiques : Mène des campagnes militaires autonomes, souvent pour le compte d'États en difficulté.
|
||||
* Financement : Se finance via les contrats étatiques ou directement par l'exploitation des ressources naturelles (ex: mines de diamants en Sierra Leone) qu'elle est chargée de protéger.
|
||||
* Motivation : Principalement lucrative, mais des variantes idéologiques existent, comme Malhama Tactical, une SMP djihadiste offrant ses services à des groupes islamistes en Syrie.
|
||||
|
||||
2.2. Le Modèle Américain
|
||||
|
||||
Ce modèle se concentre sur le soutien aux forces armées régulières, principalement celles des États-Unis.
|
||||
|
||||
* Rôle : Fournir des services annexes (logistique, gardiennage, protection de VIP, transport) pour permettre à l'armée de se concentrer sur le combat.
|
||||
* Exemple emblématique : La société Blackwater (devenue Academi), massivement employée en Irak et en Afghanistan. Elle a également été utilisée pour des actions offensives en collaboration avec la CIA et les forces spéciales.
|
||||
|
||||
2.3. Le Modèle Russe
|
||||
|
||||
Incarné par le groupe Wagner, il s'agit d'un modèle hybride combinant les approches américaine et sud-africaine.
|
||||
|
||||
* Dualité : Peut intervenir en soutien de l'armée régulière russe (comme en Ukraine) ou mener des opérations autonomes pour promouvoir les intérêts géopolitiques de la Russie, notamment en Afrique.
|
||||
* Activités diversifiées : Combat de haute intensité, protection de ressources, propagande, renseignement, et lutte anti-guérilla.
|
||||
* Structure Corporative : Wagner fait partie d'un écosystème d'entreprises avec des intérêts dans le secteur minier. D'autres entités russes, comme le géant gazier Gazprom, possèdent également leur propre SMP.
|
||||
* Statut Légal : Bien que les SMP soient officiellement interdites par la loi russe, elles sont tolérées et utilisées par le pouvoir.
|
||||
|
||||
2.4. Le Modèle Chinois
|
||||
|
||||
Ce modèle, en pleine expansion, est entièrement au service des intérêts économiques et stratégiques de l'État chinois.
|
||||
|
||||
* Cadre Légal : Les SMP sont légalisées depuis 2011 mais doivent obtenir une licence du gouvernement.
|
||||
* Mission Principale : Protéger les infrastructures et le personnel chinois le long des "Nouvelles Routes de la Soie", ainsi que les navires contre la piraterie.
|
||||
* Exemples d'entreprises :
|
||||
* Huaing Chong An Security Service : Fournit la sécurité pour la première compagnie maritime chinoise, China Ocean Shipping Company.
|
||||
* Beijing Dayway Security Services Company : Intervient en Afrique (ex: Kenya) pour sécuriser des projets financés par la Chine, et protège des clients comme la China National Petroleum et le réseau d'ambassades.
|
||||
* Forces et Faiblesses :
|
||||
* Avantage : Coût très compétitif (un contracteur chinois coûte jusqu'à 12 fois moins cher qu'un occidental).
|
||||
* Faiblesses : Manque d'expérience de terrain et mauvaise maîtrise des langues étrangères.
|
||||
|
||||
3. Motivations et Avantages du Recours aux SMP
|
||||
|
||||
3.1. Facteurs Économiques
|
||||
|
||||
La fin de la Guerre Froide a entraîné une réduction des budgets militaires (jusqu'à 30 % en France et aux États-Unis), rendant chaque soldat "plus rare et plus cher". Une idéologie libérale de désengagement de l'État a favorisé l'externalisation des fonctions de sécurité. Cette tendance est illustrée par l'évolution du ratio contracteurs/militaires dans les déploiements américains :
|
||||
|
||||
* Guerre du Golfe (1991) : 1 contracteur pour 100 militaires.
|
||||
* Début de la guerre d'Irak (2003) : 1 contracteur pour 10 militaires.
|
||||
* Irak (2008) : 1 contracteur pour 1 militaire.
|
||||
|
||||
3.2. Impératifs Politiques et Stratégiques
|
||||
|
||||
* Plausible Déniabilité : Les SMP permettent de mener des opérations sensibles ("sale besogne") comme la déstabilisation d'États ou des assassinats. En cas d'échec ou de scandale, l'État mandataire peut nier toute implication. Exemple : les Émirats Arabes Unis ont employé la SMP américaine Spear Operations Group pour des assassinats au Yémen.
|
||||
* Gestion de l'Opinion Publique : La mort d'un contracteur a un impact médiatique et public bien moindre que celle d'un soldat de l'armée régulière. Cela permet de minimiser le coût politique des interventions militaires. Exemple : en 2016 en Syrie, la Russie a déploré officiellement une trentaine de morts militaires contre 500 à 600 personnels de Wagner tués.
|
||||
* Contournement des Limites : Les SMP permettent de dépasser les limites capacitaires ou légales imposées à une armée. Exemple : durant la guerre de Bosnie, le Congrès américain ayant limité le déploiement à 20 000 soldats, cette limite a été contournée par l'envoi de contracteurs.
|
||||
|
||||
4. Controverses, Dérives et Enjeux
|
||||
|
||||
4.1. Violations des Droits Humains et Crimes de Guerre
|
||||
|
||||
* Incident de la Place Nissour (16 septembre 2007) : Des contracteurs de Blackwater ont ouvert le feu sur des civils à Bagdad, tuant 17 personnes et en blessant 20 autres.
|
||||
* Prison d'Abou Ghraib : Les SMP CACI Group et Titan Corporation sont impliquées dans des actes de torture sur des prisonniers irakiens.
|
||||
|
||||
4.2. Maltraitance des Contractuels
|
||||
|
||||
Les contracteurs eux-mêmes peuvent être victimes d'abus. La SMP émiratie Blackshield a recruté 611 Soudanais sous prétexte d'un emploi dans la sécurité privée aux Émirats, avant de les envoyer de force combattre en Libye pour le Maréchal Haftar. L'opération a été annulée suite à un scandale déclenché lorsque les recrues ont pu contacter leurs familles.
|
||||
|
||||
4.3. Guerres par Procuration et Prolifération
|
||||
|
||||
Les SMP peuvent être les instruments de conflits par procuration. En Libye, la SMP turque SADAT a envoyé des combattants (parfois d'anciens djihadistes) pour lutter contre le Maréchal Haftar, tandis que les Émirats Arabes Unis envoyaient des combattants via Blackshield pour le soutenir.
|
||||
|
||||
4.4. Usage Domestique et Répression Interne
|
||||
|
||||
Les SMP peuvent être utilisées par un gouvernement contre sa propre population. La société turque SADAT a été impliquée dans la répression qui a suivi la tentative de coup d'État de 2016 contre le président Erdoğan.
|
||||
|
||||
4.5. Perte de Compétences pour les Armées Régulières
|
||||
|
||||
Les SMP recrutent massivement d'anciens militaires, mais aussi des militaires d'active, en particulier des unités d'élite, attirés par des salaires bien plus élevés. Ce "drain des cerveaux" affaiblit les armées régulières. Pour contrer ce phénomène, le Royaume-Uni a expérimenté un programme permettant à ses militaires de travailler pour une SMP pendant 1 ou 2 ans avant de réintégrer l'armée.
|
||||
|
||||
5. Étude de Cas Approfondie : Executive Outcomes (EO)
|
||||
|
||||
5.1. Genèse et Contexte
|
||||
|
||||
Executive Outcomes, fondée en 1989 par Eeben Barlow, est née des cendres du système de sécurité de l'Afrique du Sud de l'apartheid.
|
||||
|
||||
* Origines du Personnel : Barlow et ses recrues étaient issus d'unités d'élite et secrètes comme le Bataillon 32 (une unité de contre-insurrection composée d'Angolais et d'officiers blancs sud-africains) et le Civil Cooperation Bureau (CCB), une cellule clandestine chargée d'assassiner des opposants au régime.
|
||||
* Premier Contrat Majeur (1993) : Engagée en Angola pour reprendre des installations pétrolières à l'UNITA. Ironiquement, les mêmes hommes qui, au sein du Bataillon 32, soutenaient l'UNITA contre le MPLA (soutenu par les communistes), se sont retrouvés à combattre l'UNITA pour le compte du gouvernement MPLA, démontrant que les intérêts financiers priment sur l'idéologie.
|
||||
|
||||
5.2. Le Modèle d'Affaires : Intégration Militaro-Industrielle
|
||||
|
||||
Le succès d'EO reposait sur une synergie parfaite entre la force militaire et l'exploitation économique.
|
||||
|
||||
* Angola (1994) : EO repousse une offensive de l'UNITA sur la capitale Luanda. En paiement, la société reçoit 40 millions de dollars par an ainsi que des concessions pétrolières et diamantaires.
|
||||
* Sierra Leone (1996) : Le gouvernement engage EO pour repousser les rebelles du RUF. En échange, des sociétés liées à EO obtiennent d'importantes concessions sur les mines de diamants que les mercenaires sécurisent.
|
||||
|
||||
5.3. Une Galaxie d'Entreprises : Structure et Acteurs Clés
|
||||
|
||||
EO n'était que la partie visible d'un vaste conglomérat de plus de 30 sociétés.
|
||||
|
||||
Entité Rôle et Description Personnages Clés
|
||||
Executive Outcomes (EO) Branche militaire opérationnelle. Fournissait les hommes, le matériel et l'expertise. Eeben Barlow, Lafras Luitingh
|
||||
Strategic Resources Corp. (SRC) Holding sud-africaine créée en 1995 pour chapeauter les activités africaines. Eeben Barlow
|
||||
Sandline International SMP britannique utilisée comme "vitrine" pour signer des contrats et gérer les relations publiques. Sous-traitait les opérations à EO. Tim Spicer, Simon Mann
|
||||
Heritage Oil and Gas Compagnie pétrolière dirigée par le contact britannique qui a fourni à EO son premier contrat. Anthony Buckingham
|
||||
Branch Energy Branche minière du groupe, détenant des concessions en Angola, Sierra Leone, etc. Anthony Buckingham
|
||||
Diamond Works Limited Née en 1996 de la fusion des actifs de Branch Energy et d'une société canadienne, pour exploiter les concessions de diamants. Anthony Buckingham, Eeben Barlow, Tim Spicer
|
||||
|
||||
5.4. Le Déclin et la Reconversion
|
||||
|
||||
La fin des années 1990 marque le déclin officiel d'EO.
|
||||
|
||||
* Affaire de Papouasie-Nouvelle-Guinée (1997) : Un contrat signé par Sandline (sous-traitant EO) est révélé par la presse, provoquant un scandale politique majeur, une mutinerie et la démission du Premier ministre.
|
||||
* Législation Sud-Africaine (1997) : Une nouvelle loi bannissant le mercenariat contraint EO à cesser officiellement ses activités en 1998.
|
||||
|
||||
Cependant, les fondateurs ont poursuivi leurs carrières dans le secteur :
|
||||
|
||||
* Eeben Barlow : Après une période de consulting, il fonde STTEP en 2006, qui combat Boko Haram au Nigéria (2015) et des djihadistes au Mozambique (2020). En 2020, il annonce la relance d'Executive Outcomes, la positionnant comme une solution "africaine pour les Africains".
|
||||
* Tim Spicer : Fonde Aegis Defence Services en 2002.
|
||||
* Simon Mann : Est arrêté au Zimbabwe en 2004 pour une tentative présumée de coup d'État en Guinée Équatoriale. Il est libéré en 2009 et meurt en mai 2025.
|
||||
* Lafras Luitingh : Crée d'autres SMP comme Sarasen et Sterling Corporate, actives dans le secteur minier et la lutte anti-piraterie.
|
||||
|
||||
6. Perspectives et Avenir du Secteur
|
||||
|
||||
Le secteur des SMP est en constante évolution et devrait connaître une nouvelle phase d'expansion.
|
||||
|
||||
* Impact de la Guerre en Ukraine : Le conflit a créé un immense vivier de combattants (estimé entre 250 000 et 300 000 Ukrainiens) dotés d'une expérience de combat de haute intensité, maîtrisant à la fois les technologies modernes (drones) et les équipements plus anciens.
|
||||
* Demande Croissante : Les Ukrainiens figurent déjà dans le top 5 des nationalités les plus employées par les SMP. Ces vétérans très expérimentés pourront "se vendre cher" sur le marché mondial de la sécurité privée, complexifiant davantage les dynamiques des futurs conflits.
|
||||
1
external/imgui
vendored
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit d6cb3c923d28dcebb2d8d9605ccc7229ccef19eb
|
||||
24765
external/nlohmann/json.hpp
vendored
Normal file
23
external/windows_deps/glfw-3.3.8.bin.WIN64/LICENSE.md
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
Copyright (c) 2002-2006 Marcus Geelnard
|
||||
|
||||
Copyright (c) 2006-2019 Camilla Löwy
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would
|
||||
be appreciated but is not required.
|
||||
|
||||
2. Altered source versions must be plainly marked as such, and must not
|
||||
be misrepresented as being the original software.
|
||||
|
||||
3. This notice may not be removed or altered from any source
|
||||
distribution.
|
||||
|
||||
69
external/windows_deps/glfw-3.3.8.bin.WIN64/README.md
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
# GLFW binaries for 64-bit Windows
|
||||
|
||||
This archive contains documentation, headers, pre-compiled static libraries,
|
||||
import libraries and DLLs for GLFW 3.3.8.
|
||||
|
||||
Binaries for the following compilers are included
|
||||
|
||||
- Visual C++ 2022 (built with 17.3.0 preview 4.0)
|
||||
- Visual C++ 2019 (built with 16.11.17)
|
||||
- Visual C++ 2017 (built with 15.9.49)
|
||||
- Visual C++ 2015 (built with 14.0.25431.01)
|
||||
- Visual C++ 2013 (built with 12.0.40629.00)
|
||||
- Visual C++ 2012 (built with 11.0.61219.00)
|
||||
- MinGW-w64 (built with GCC 8.1.0)
|
||||
|
||||
|
||||
## Binaries for Visual C++
|
||||
|
||||
All binaries for Visual C++ 2017 and earlier are compatible with Windows XP, but
|
||||
this is not supported by Visual C++ 2019.
|
||||
|
||||
### GLFW as a DLL
|
||||
|
||||
To use GLFW as a DLL, link against the `glfw3dll.lib` file for your
|
||||
environment. This will add a load time dependency on `glfw3.dll`. The
|
||||
remaining files in the same directory are not needed.
|
||||
|
||||
This DLL is built in release mode for the Multithreaded DLL runtime library.
|
||||
|
||||
There is also a GLFW DLL and import library pair in the `lib-static-ucrt`
|
||||
directory. These are built with Visual C++ 2019 and the static Multithreaded
|
||||
runtime library.
|
||||
|
||||
### GLFW as a static library
|
||||
|
||||
To use GLFW as a static library, link against `glfw3.lib` if your application
|
||||
is using the Multithreaded DLL runtime library, or `glfw3_mt.lib` if it is
|
||||
using the static Multithreaded runtime library. The remaining files in the same
|
||||
directory are not needed.
|
||||
|
||||
The static libraries are built in release mode and do not contain debug
|
||||
information but can still be linked with the debug versions of the runtime
|
||||
library.
|
||||
|
||||
|
||||
## Binaries for MinGW-w64
|
||||
|
||||
### GLFW as a DLL
|
||||
|
||||
To use GLFW as a DLL, link against the `libglfw3dll.a` file for your
|
||||
environment. This will add a load time dependency on `glfw3.dll`. The
|
||||
remaining files in the same directory are not needed.
|
||||
|
||||
The DLLs are built in release mode.
|
||||
|
||||
The DLLs depend on the `msvcrt.dll` C runtime library. There is also a GLFW
|
||||
DLL and import library in the `lib-static-ucrt` directory that is built with
|
||||
Visual C++ 2019 and statically linked against the UCRT.
|
||||
|
||||
All DLLs in this archive provide the same ABI and can be used as drop-in
|
||||
replacements for one another, as long as the C runtime library they depend on is
|
||||
available.
|
||||
|
||||
### GLFW as a static library
|
||||
|
||||
To use GLFW as a static library, link against the `libglfw3.a` file for your
|
||||
environment. The other files in the same directory are not needed.
|
||||
|
||||
The library is built in release mode and do not contain debug information.
|
||||
BIN
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/bc_s.png
vendored
Normal file
|
After Width: | Height: | Size: 676 B |
BIN
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/bdwn.png
vendored
Normal file
|
After Width: | Height: | Size: 147 B |
74
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/build_8dox.html
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: build.dox File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">build.dox File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
192
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/build_guide.html
vendored
Normal file
@ -0,0 +1,192 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Building applications</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Building applications </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="toc"><h3>Table of Contents</h3>
|
||||
<ul><li class="level1"><a href="#build_include">Including the GLFW header file</a><ul><li class="level2"><a href="#build_macros">GLFW header option macros</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level1"><a href="#build_link">Link with the right libraries</a><ul><li class="level2"><a href="#build_link_win32">With MinGW or Visual C++ on Windows</a></li>
|
||||
<li class="level2"><a href="#build_link_cmake_source">With CMake and GLFW source</a></li>
|
||||
<li class="level2"><a href="#build_link_cmake_package">With CMake and installed GLFW binaries</a></li>
|
||||
<li class="level2"><a href="#build_link_pkgconfig">With makefiles and pkg-config on Unix</a></li>
|
||||
<li class="level2"><a href="#build_link_xcode">With Xcode on macOS</a></li>
|
||||
<li class="level2"><a href="#build_link_osx">With command-line on macOS</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="textblock"><p >This is about compiling and linking applications that use GLFW. For information on how to write such applications, start with the <a class="el" href="quick_guide.html">introductory tutorial</a>. For information on how to compile the GLFW library itself, see <a class="el" href="compile_guide.html">Compiling GLFW</a>.</p>
|
||||
<p >This is not a tutorial on compilation or linking. It assumes basic understanding of how to compile and link a C program as well as how to use the specific compiler of your chosen development environment. The compilation and linking process should be explained in your C programming material and in the documentation for your development environment.</p>
|
||||
<h1><a class="anchor" id="build_include"></a>
|
||||
Including the GLFW header file</h1>
|
||||
<p >You should include the GLFW header in the source files where you use OpenGL or GLFW.</p>
|
||||
<div class="fragment"><div class="line"><span class="preprocessor">#include <<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>></span></div>
|
||||
<div class="ttc" id="aglfw3_8h_html"><div class="ttname"><a href="glfw3_8h.html">glfw3.h</a></div><div class="ttdoc">The header of the GLFW 3 API.</div></div>
|
||||
</div><!-- fragment --><p >This header defines all the constants and declares all the types and function prototypes of the GLFW API. By default it also includes the OpenGL header from your development environment. See <a class="el" href="build_guide.html#build_macros">option macros</a> below for how to select OpenGL ES headers and more.</p>
|
||||
<p >The GLFW header also defines any platform-specific macros needed by your OpenGL header, so that it can be included without needing any window system headers.</p>
|
||||
<p >It does this only when needed, so if window system headers are included, the GLFW header does not try to redefine those symbols. The reverse is not true, i.e. <code>windows.h</code> cannot cope if any Win32 symbols have already been defined.</p>
|
||||
<p >In other words:</p>
|
||||
<ul>
|
||||
<li>Use the GLFW header to include OpenGL or OpenGL ES headers portably</li>
|
||||
<li>Do not include window system headers unless you will use those APIs directly</li>
|
||||
<li>If you do need such headers, include them before the GLFW header</li>
|
||||
</ul>
|
||||
<p >If you are using an OpenGL extension loading library such as <a href="https://github.com/Dav1dde/glad">glad</a>, the extension loader header should be included before the GLFW one. GLFW attempts to detect any OpenGL or OpenGL ES header or extension loader header included before it and will then disable the inclusion of the default OpenGL header. Most extension loaders also define macros that disable similar headers below it.</p>
|
||||
<div class="fragment"><div class="line"><span class="preprocessor">#include <glad/gl.h></span></div>
|
||||
<div class="line"><span class="preprocessor">#include <<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>></span></div>
|
||||
</div><!-- fragment --><p >Both of these mechanisms depend on the extension loader header defining a known macro. If yours doesn't or you don't know which one your users will pick, the <a class="el" href="build_guide.html#GLFW_INCLUDE_NONE">GLFW_INCLUDE_NONE</a> macro will explicitly prevent the GLFW header from including the OpenGL header. This will also allow you to include the two headers in any order.</p>
|
||||
<div class="fragment"><div class="line"><span class="preprocessor">#define GLFW_INCLUDE_NONE</span></div>
|
||||
<div class="line"><span class="preprocessor">#include <<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>></span></div>
|
||||
<div class="line"><span class="preprocessor">#include <glad/gl.h></span></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="build_macros"></a>
|
||||
GLFW header option macros</h2>
|
||||
<p >These macros may be defined before the inclusion of the GLFW header and affect its behavior.</p>
|
||||
<p ><a class="anchor" id="GLFW_DLL"></a><b>GLFW_DLL</b> is required on Windows when using the GLFW DLL, to tell the compiler that the GLFW functions are defined in a DLL.</p>
|
||||
<p >The following macros control which OpenGL or OpenGL ES API header is included. Only one of these may be defined at a time.</p>
|
||||
<dl class="section note"><dt>Note</dt><dd>GLFW does not provide any of the API headers mentioned below. They are provided by your development environment or your OpenGL, OpenGL ES or Vulkan SDK, and most of them can be downloaded from the <a href="https://www.khronos.org/registry/">Khronos Registry</a>.</dd></dl>
|
||||
<p><a class="anchor" id="GLFW_INCLUDE_GLCOREARB"></a><b>GLFW_INCLUDE_GLCOREARB</b> makes the GLFW header include the modern <code>GL/glcorearb.h</code> header (<code>OpenGL/gl3.h</code> on macOS) instead of the regular OpenGL header.</p>
|
||||
<p ><a class="anchor" id="GLFW_INCLUDE_ES1"></a><b>GLFW_INCLUDE_ES1</b> makes the GLFW header include the OpenGL ES 1.x <code>GLES/gl.h</code> header instead of the regular OpenGL header.</p>
|
||||
<p ><a class="anchor" id="GLFW_INCLUDE_ES2"></a><b>GLFW_INCLUDE_ES2</b> makes the GLFW header include the OpenGL ES 2.0 <code>GLES2/gl2.h</code> header instead of the regular OpenGL header.</p>
|
||||
<p ><a class="anchor" id="GLFW_INCLUDE_ES3"></a><b>GLFW_INCLUDE_ES3</b> makes the GLFW header include the OpenGL ES 3.0 <code>GLES3/gl3.h</code> header instead of the regular OpenGL header.</p>
|
||||
<p ><a class="anchor" id="GLFW_INCLUDE_ES31"></a><b>GLFW_INCLUDE_ES31</b> makes the GLFW header include the OpenGL ES 3.1 <code>GLES3/gl31.h</code> header instead of the regular OpenGL header.</p>
|
||||
<p ><a class="anchor" id="GLFW_INCLUDE_ES32"></a><b>GLFW_INCLUDE_ES32</b> makes the GLFW header include the OpenGL ES 3.2 <code>GLES3/gl32.h</code> header instead of the regular OpenGL header.</p>
|
||||
<p ><a class="anchor" id="GLFW_INCLUDE_NONE"></a><b>GLFW_INCLUDE_NONE</b> makes the GLFW header not include any OpenGL or OpenGL ES API header. This is useful in combination with an extension loading library.</p>
|
||||
<p >If none of the above inclusion macros are defined, the standard OpenGL <code>GL/gl.h</code> header (<code>OpenGL/gl.h</code> on macOS) is included, unless GLFW detects the inclusion guards of any OpenGL, OpenGL ES or extension loader header it knows about.</p>
|
||||
<p >The following macros control the inclusion of additional API headers. Any number of these may be defined simultaneously, and/or together with one of the above macros.</p>
|
||||
<p ><a class="anchor" id="GLFW_INCLUDE_VULKAN"></a><b>GLFW_INCLUDE_VULKAN</b> makes the GLFW header include the Vulkan <code>vulkan/vulkan.h</code> header in addition to any selected OpenGL or OpenGL ES header.</p>
|
||||
<p ><a class="anchor" id="GLFW_INCLUDE_GLEXT"></a><b>GLFW_INCLUDE_GLEXT</b> makes the GLFW header include the appropriate extension header for the OpenGL or OpenGL ES header selected above after and in addition to that header.</p>
|
||||
<p ><a class="anchor" id="GLFW_INCLUDE_GLU"></a><b>GLFW_INCLUDE_GLU</b> makes the header include the GLU header in addition to the header selected above. This should only be used with the standard OpenGL header and only for compatibility with legacy code. GLU has been deprecated and should not be used in new code.</p>
|
||||
<dl class="section note"><dt>Note</dt><dd>None of these macros may be defined during the compilation of GLFW itself. If your build includes GLFW and you define any these in your build files, make sure they are not applied to the GLFW sources.</dd></dl>
|
||||
<h1><a class="anchor" id="build_link"></a>
|
||||
Link with the right libraries</h1>
|
||||
<p >GLFW is essentially a wrapper of various platform-specific APIs and therefore needs to link against many different system libraries. If you are using GLFW as a shared library / dynamic library / DLL then it takes care of these links. However, if you are using GLFW as a static library then your executable will need to link against these libraries.</p>
|
||||
<p >On Windows and macOS, the list of system libraries is static and can be hard-coded into your build environment. See the section for your development environment below. On Linux and other Unix-like operating systems, the list varies but can be retrieved in various ways as described below.</p>
|
||||
<p >A good general introduction to linking is <a href="https://www.lurklurk.org/linkers/linkers.html">Beginner's Guide to Linkers</a> by David Drysdale.</p>
|
||||
<h2><a class="anchor" id="build_link_win32"></a>
|
||||
With MinGW or Visual C++ on Windows</h2>
|
||||
<p >The static version of the GLFW library is named <code>glfw3</code>. When using this version, it is also necessary to link with some libraries that GLFW uses.</p>
|
||||
<p >When using MinGW to link an application with the static version of GLFW, you must also explicitly link with <code>gdi32</code>. Other toolchains including MinGW-w64 include it in the set of default libraries along with other dependencies like <code>user32</code> and <code>kernel32</code>.</p>
|
||||
<p >The link library for the GLFW DLL is named <code>glfw3dll</code>. When compiling an application that uses the DLL version of GLFW, you need to define the <a class="el" href="build_guide.html#GLFW_DLL">GLFW_DLL</a> macro <em>before</em> any inclusion of the GLFW header. This can be done either with a compiler switch or by defining it in your source code.</p>
|
||||
<h2><a class="anchor" id="build_link_cmake_source"></a>
|
||||
With CMake and GLFW source</h2>
|
||||
<p >This section is about using CMake to compile and link GLFW along with your application. If you want to use an installed binary instead, see <a class="el" href="build_guide.html#build_link_cmake_package">With CMake and installed GLFW binaries</a>.</p>
|
||||
<p >With a few changes to your <code>CMakeLists.txt</code> you can have the GLFW source tree built along with your application.</p>
|
||||
<p >When including GLFW as part of your build, you probably don't want to build the GLFW tests, examples and documentation. To disable these, set the corresponding cache variables before adding the GLFW source tree.</p>
|
||||
<div class="fragment"><div class="line">set(GLFW_BUILD_DOCS OFF CACHE BOOL <span class="stringliteral">""</span> FORCE)</div>
|
||||
<div class="line">set(GLFW_BUILD_TESTS OFF CACHE BOOL <span class="stringliteral">""</span> FORCE)</div>
|
||||
<div class="line">set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL <span class="stringliteral">""</span> FORCE)</div>
|
||||
</div><!-- fragment --><p >Add the root directory of the GLFW source tree to your project. This will add the <code>glfw</code> target to your project.</p>
|
||||
<div class="fragment"><div class="line">add_subdirectory(path/to/glfw)</div>
|
||||
</div><!-- fragment --><p >Once GLFW has been added, link your application against the <code>glfw</code> target. This adds the GLFW library and its link-time dependencies as it is currently configured, the include directory for the GLFW header and, when applicable, the <a class="el" href="build_guide.html#GLFW_DLL">GLFW_DLL</a> macro.</p>
|
||||
<div class="fragment"><div class="line">target_link_libraries(myapp glfw)</div>
|
||||
</div><!-- fragment --><p >Note that the <code>glfw</code> target does not depend on OpenGL, as GLFW loads any OpenGL, OpenGL ES or Vulkan libraries it needs at runtime. If your application calls OpenGL directly, instead of using a modern <a class="el" href="context_guide.html#context_glext_auto">extension loader library</a>, use the OpenGL CMake package.</p>
|
||||
<div class="fragment"><div class="line">find_package(OpenGL REQUIRED)</div>
|
||||
</div><!-- fragment --><p >If OpenGL is found, the <code>OpenGL::GL</code> target is added to your project, containing library and include directory paths. Link against this like any other library.</p>
|
||||
<div class="fragment"><div class="line">target_link_libraries(myapp OpenGL::GL)</div>
|
||||
</div><!-- fragment --><p >For a minimal example of a program and GLFW sources built with CMake, see the <a href="https://github.com/juliettef/GLFW-CMake-starter">GLFW CMake Starter</a> on GitHub.</p>
|
||||
<h2><a class="anchor" id="build_link_cmake_package"></a>
|
||||
With CMake and installed GLFW binaries</h2>
|
||||
<p >This section is about using CMake to link GLFW after it has been built and installed. If you want to build it along with your application instead, see <a class="el" href="build_guide.html#build_link_cmake_source">With CMake and GLFW source</a>.</p>
|
||||
<p >With a few changes to your <code>CMakeLists.txt</code> you can locate the package and target files generated when GLFW is installed.</p>
|
||||
<div class="fragment"><div class="line">find_package(glfw3 3.3 REQUIRED)</div>
|
||||
</div><!-- fragment --><p >Once GLFW has been added to the project, link against it with the <code>glfw</code> target. This adds the GLFW library and its link-time dependencies, the include directory for the GLFW header and, when applicable, the <a class="el" href="build_guide.html#GLFW_DLL">GLFW_DLL</a> macro.</p>
|
||||
<div class="fragment"><div class="line">target_link_libraries(myapp glfw)</div>
|
||||
</div><!-- fragment --><p >Note that the <code>glfw</code> target does not depend on OpenGL, as GLFW loads any OpenGL, OpenGL ES or Vulkan libraries it needs at runtime. If your application calls OpenGL directly, instead of using a modern <a class="el" href="context_guide.html#context_glext_auto">extension loader library</a>, use the OpenGL CMake package.</p>
|
||||
<div class="fragment"><div class="line">find_package(OpenGL REQUIRED)</div>
|
||||
</div><!-- fragment --><p >If OpenGL is found, the <code>OpenGL::GL</code> target is added to your project, containing library and include directory paths. Link against this like any other library.</p>
|
||||
<div class="fragment"><div class="line">target_link_libraries(myapp OpenGL::GL)</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="build_link_pkgconfig"></a>
|
||||
With makefiles and pkg-config on Unix</h2>
|
||||
<p >GLFW supports <a href="https://www.freedesktop.org/wiki/Software/pkg-config/">pkg-config</a>, and the <code>glfw3.pc</code> pkg-config file is generated when the GLFW library is built and is installed along with it. A pkg-config file describes all necessary compile-time and link-time flags and dependencies needed to use a library. When they are updated or if they differ between systems, you will get the correct ones automatically.</p>
|
||||
<p >A typical compile and link command-line when using the static version of the GLFW library may look like this:</p>
|
||||
<div class="fragment"><div class="line">cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --static --libs glfw3)</div>
|
||||
</div><!-- fragment --><p >If you are using the shared version of the GLFW library, omit the <code>--static</code> flag.</p>
|
||||
<div class="fragment"><div class="line">cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)</div>
|
||||
</div><!-- fragment --><p >You can also use the <code>glfw3.pc</code> file without installing it first, by using the <code>PKG_CONFIG_PATH</code> environment variable.</p>
|
||||
<div class="fragment"><div class="line">env PKG_CONFIG_PATH=path/to/glfw/src cc $(pkg-config --cflags glfw3) -o myprog myprog.c $(pkg-config --libs glfw3)</div>
|
||||
</div><!-- fragment --><p >The dependencies do not include OpenGL, as GLFW loads any OpenGL, OpenGL ES or Vulkan libraries it needs at runtime. If your application calls OpenGL directly, instead of using a modern <a class="el" href="context_guide.html#context_glext_auto">extension loader library</a>, you should add the <code>gl</code> pkg-config package.</p>
|
||||
<div class="fragment"><div class="line">cc $(pkg-config --cflags glfw3 gl) -o myprog myprog.c $(pkg-config --libs glfw3 gl)</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="build_link_xcode"></a>
|
||||
With Xcode on macOS</h2>
|
||||
<p >If you are using the dynamic library version of GLFW, add it to the project dependencies.</p>
|
||||
<p >If you are using the static library version of GLFW, add it and the Cocoa, OpenGL and IOKit frameworks to the project as dependencies. They can all be found in <code>/System/Library/Frameworks</code>.</p>
|
||||
<h2><a class="anchor" id="build_link_osx"></a>
|
||||
With command-line on macOS</h2>
|
||||
<p >It is recommended that you use <a class="el" href="build_guide.html#build_link_pkgconfig">pkg-config</a> when building from the command line on macOS. That way you will get any new dependencies added automatically. If you still wish to build manually, you need to add the required frameworks and libraries to your command-line yourself using the <code>-l</code> and <code>-framework</code> switches.</p>
|
||||
<p >If you are using the dynamic GLFW library, which is named <code>libglfw.3.dylib</code>, do:</p>
|
||||
<div class="fragment"><div class="line">cc -o myprog myprog.c -lglfw -framework Cocoa -framework OpenGL -framework IOKit</div>
|
||||
</div><!-- fragment --><p >If you are using the static library, named <code>libglfw3.a</code>, substitute <code>-lglfw3</code> for <code>-lglfw</code>.</p>
|
||||
<p >Note that you do not add the <code>.framework</code> extension to a framework when linking against it from the command-line.</p>
|
||||
<dl class="section note"><dt>Note</dt><dd>Your machine may have <code>libGL.*.dylib</code> style OpenGL library, but that is for the X Window System and will not work with the macOS native version of GLFW. </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/closed.png
vendored
Normal file
|
After Width: | Height: | Size: 132 B |
74
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/compat_8dox.html
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: compat.dox File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">compat.dox File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
145
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/compat_guide.html
vendored
Normal file
@ -0,0 +1,145 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Standards conformance</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Standards conformance </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="toc"><h3>Table of Contents</h3>
|
||||
<ul><li class="level1"><a href="#compat_x11">X11 extensions, protocols and IPC standards</a></li>
|
||||
<li class="level1"><a href="#compat_wayland">Wayland protocols and IPC standards</a></li>
|
||||
<li class="level1"><a href="#compat_glx">GLX extensions</a></li>
|
||||
<li class="level1"><a href="#compat_wgl">WGL extensions</a></li>
|
||||
<li class="level1"><a href="#compat_osx">OpenGL on macOS</a></li>
|
||||
<li class="level1"><a href="#compat_vulkan">Vulkan loader and API</a></li>
|
||||
<li class="level1"><a href="#compat_wsi">Vulkan WSI extensions</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="textblock"><p >This guide describes the various API extensions used by this version of GLFW. It lists what are essentially implementation details, but which are nonetheless vital knowledge for developers intending to deploy their applications on a wide range of machines.</p>
|
||||
<p >The information in this guide is not a part of GLFW API, but merely preconditions for some parts of the library to function on a given machine. Any part of this information may change in future versions of GLFW and that will not be considered a breaking API change.</p>
|
||||
<h1><a class="anchor" id="compat_x11"></a>
|
||||
X11 extensions, protocols and IPC standards</h1>
|
||||
<p >As GLFW uses Xlib directly, without any intervening toolkit library, it has sole responsibility for interacting well with the many and varied window managers in use on Unix-like systems. In order for applications and window managers to work well together, a number of standards and conventions have been developed that regulate behavior outside the scope of the X11 API; most importantly the <a href="https://www.tronche.com/gui/x/icccm/">Inter-Client Communication Conventions Manual</a> (ICCCM) and <a href="https://standards.freedesktop.org/wm-spec/wm-spec-latest.html">Extended Window Manager Hints</a> (EWMH) standards.</p>
|
||||
<p >GLFW uses the <code>_MOTIF_WM_HINTS</code> window property to support borderless windows. If the running window manager does not support this property, the <code>GLFW_DECORATED</code> hint will have no effect.</p>
|
||||
<p >GLFW uses the ICCCM <code>WM_DELETE_WINDOW</code> protocol to intercept the user attempting to close the GLFW window. If the running window manager does not support this protocol, the close callback will never be called.</p>
|
||||
<p >GLFW uses the EWMH <code>_NET_WM_PING</code> protocol, allowing the window manager notify the user when the application has stopped responding, i.e. when it has ceased to process events. If the running window manager does not support this protocol, the user will not be notified if the application locks up.</p>
|
||||
<p >GLFW uses the EWMH <code>_NET_WM_STATE_FULLSCREEN</code> window state to tell the window manager to make the GLFW window full screen. If the running window manager does not support this state, full screen windows may not work properly. GLFW has a fallback code path in case this state is unavailable, but every window manager behaves slightly differently in this regard.</p>
|
||||
<p >GLFW uses the EWMH <code>_NET_WM_BYPASS_COMPOSITOR</code> window property to tell a compositing window manager to un-redirect full screen GLFW windows. If the running window manager uses compositing but does not support this property then additional copying may be performed for each buffer swap of full screen windows.</p>
|
||||
<p >GLFW uses the <a href="https://www.freedesktop.org/wiki/ClipboardManager/">clipboard manager protocol</a> to push a clipboard string (i.e. selection) owned by a GLFW window about to be destroyed to the clipboard manager. If there is no running clipboard manager, the clipboard string will be unavailable once the window has been destroyed.</p>
|
||||
<p >GLFW uses the <a href="https://www.freedesktop.org/wiki/Specifications/XDND/">X drag-and-drop protocol</a> to provide file drop events. If the application originating the drag does not support this protocol, drag and drop will not work.</p>
|
||||
<p >GLFW uses the XRandR 1.3 extension to provide multi-monitor support. If the running X server does not support this version of this extension, multi-monitor support will not function and only a single, desktop-spanning monitor will be reported.</p>
|
||||
<p >GLFW uses the XRandR 1.3 and Xf86vidmode extensions to provide gamma ramp support. If the running X server does not support either or both of these extensions, gamma ramp support will not function.</p>
|
||||
<p >GLFW uses the Xkb extension and detectable auto-repeat to provide keyboard input. If the running X server does not support this extension, a non-Xkb fallback path is used.</p>
|
||||
<p >GLFW uses the XInput2 extension to provide raw, non-accelerated mouse motion when the cursor is disabled. If the running X server does not support this extension, regular accelerated mouse motion will be used.</p>
|
||||
<p >GLFW uses both the XRender extension and the compositing manager to support transparent window framebuffers. If the running X server does not support this extension or there is no running compositing manager, the <code>GLFW_TRANSPARENT_FRAMEBUFFER</code> framebuffer hint will have no effect.</p>
|
||||
<h1><a class="anchor" id="compat_wayland"></a>
|
||||
Wayland protocols and IPC standards</h1>
|
||||
<p >As GLFW uses libwayland directly, without any intervening toolkit library, it has sole responsibility for interacting well with every compositor in use on Unix-like systems. Most of the features are provided by the core protocol, while cursor support is provided by the libwayland-cursor helper library, EGL integration by libwayland-egl, and keyboard handling by <a href="https://xkbcommon.org/">libxkbcommon</a>. In addition, GLFW uses some protocols from wayland-protocols to provide additional features if the compositor supports them.</p>
|
||||
<p >GLFW uses xkbcommon 0.5.0 to provide compose key support. When it has been built against an older xkbcommon, the compose key will be disabled even if it has been configured in the compositor.</p>
|
||||
<p >GLFW uses the <a href="https://cgit.freedesktop.org/wayland/wayland-protocols/tree/stable/xdg-shell/xdg-shell.xml">xdg-shell protocol</a> to provide better window management. This protocol is part of wayland-protocols 1.12, and mandatory at build time.</p>
|
||||
<p >GLFW uses the <a href="https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/relative-pointer/relative-pointer-unstable-v1.xml">relative pointer protocol</a> alongside the <a href="https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/pointer-constraints/pointer-constraints-unstable-v1.xml">pointer constraints protocol</a> to implement disabled cursor. These two protocols are part of wayland-protocols 1.1, and mandatory at build time. If the running compositor does not support both of these protocols, disabling the cursor will have no effect.</p>
|
||||
<p >GLFW uses the <a href="https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/idle-inhibit/idle-inhibit-unstable-v1.xml">idle inhibit protocol</a> to prohibit the screensaver from starting. This protocol is part of wayland-protocols 1.6, and mandatory at build time. If the running compositor does not support this protocol, the screensaver may start even for full screen windows.</p>
|
||||
<p >GLFW uses the <a href="https://cgit.freedesktop.org/wayland/wayland-protocols/tree/unstable/xdg-decoration/xdg-decoration-unstable-v1.xml">xdg-decoration protocol</a> to request decorations to be drawn around its windows. This protocol is part of wayland-protocols 1.15, and mandatory at build time. If the running compositor does not support this protocol, a very simple frame will be drawn by GLFW itself, using the <a href="https://cgit.freedesktop.org/wayland/wayland-protocols/tree/stable/viewporter/viewporter.xml">viewporter protocol</a> alongside <a href="https://cgit.freedesktop.org/wayland/wayland/tree/protocol/wayland.xml#n2598">subsurfaces</a>. This protocol is part of wayland-protocols 1.4, and mandatory at build time. If the running compositor does not support this protocol either, no decorations will be drawn around windows.</p>
|
||||
<h1><a class="anchor" id="compat_glx"></a>
|
||||
GLX extensions</h1>
|
||||
<p >The GLX API is the default API used to create OpenGL contexts on Unix-like systems using the X Window System.</p>
|
||||
<p >GLFW uses the GLX 1.3 <code>GLXFBConfig</code> functions to enumerate and select framebuffer pixel formats. If GLX 1.3 is not supported, <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> will fail.</p>
|
||||
<p >GLFW uses the <code>GLX_MESA_swap_control,</code> <code>GLX_EXT_swap_control</code> and <code>GLX_SGI_swap_control</code> extensions to provide vertical retrace synchronization (or <em>vsync</em>), in that order of preference. Where none of these extension are available, calling <a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a> will have no effect.</p>
|
||||
<p >GLFW uses the <code>GLX_ARB_multisample</code> extension to create contexts with multisampling anti-aliasing. Where this extension is unavailable, the <code>GLFW_SAMPLES</code> hint will have no effect.</p>
|
||||
<p >GLFW uses the <code>GLX_ARB_create_context</code> extension when available, even when creating OpenGL contexts of version 2.1 and below. Where this extension is unavailable, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will only be partially supported, the <code>GLFW_OPENGL_DEBUG_CONTEXT</code> hint will have no effect, and setting the <code>GLFW_OPENGL_PROFILE</code> or <code>GLFW_OPENGL_FORWARD_COMPAT</code> hints to <code>GLFW_TRUE</code> will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail.</p>
|
||||
<p >GLFW uses the <code>GLX_ARB_create_context_profile</code> extension to provide support for context profiles. Where this extension is unavailable, setting the <code>GLFW_OPENGL_PROFILE</code> hint to anything but <code>GLFW_OPENGL_ANY_PROFILE</code>, or setting <code>GLFW_CLIENT_API</code> to anything but <code>GLFW_OPENGL_API</code> or <code>GLFW_NO_API</code> will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail.</p>
|
||||
<p >GLFW uses the <code>GLX_ARB_context_flush_control</code> extension to provide control over whether a context is flushed when it is released (made non-current). Where this extension is unavailable, the <code>GLFW_CONTEXT_RELEASE_BEHAVIOR</code> hint will have no effect and the context will always be flushed when released.</p>
|
||||
<p >GLFW uses the <code>GLX_ARB_framebuffer_sRGB</code> and <code>GLX_EXT_framebuffer_sRGB</code> extensions to provide support for sRGB framebuffers. Where both of these extensions are unavailable, the <code>GLFW_SRGB_CAPABLE</code> hint will have no effect.</p>
|
||||
<h1><a class="anchor" id="compat_wgl"></a>
|
||||
WGL extensions</h1>
|
||||
<p >The WGL API is used to create OpenGL contexts on Microsoft Windows and other implementations of the Win32 API, such as Wine.</p>
|
||||
<p >GLFW uses either the <code>WGL_EXT_extension_string</code> or the <code>WGL_ARB_extension_string</code> extension to check for the presence of all other WGL extensions listed below. If both are available, the EXT one is preferred. If neither is available, no other extensions are used and many GLFW features related to context creation will have no effect or cause errors when used.</p>
|
||||
<p >GLFW uses the <code>WGL_EXT_swap_control</code> extension to provide vertical retrace synchronization (or <em>vsync</em>). Where this extension is unavailable, calling <a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a> will have no effect.</p>
|
||||
<p >GLFW uses the <code>WGL_ARB_pixel_format</code> and <code>WGL_ARB_multisample</code> extensions to create contexts with multisampling anti-aliasing. Where these extensions are unavailable, the <code>GLFW_SAMPLES</code> hint will have no effect.</p>
|
||||
<p >GLFW uses the <code>WGL_ARB_create_context</code> extension when available, even when creating OpenGL contexts of version 2.1 and below. Where this extension is unavailable, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will only be partially supported, the <code>GLFW_OPENGL_DEBUG_CONTEXT</code> hint will have no effect, and setting the <code>GLFW_OPENGL_PROFILE</code> or <code>GLFW_OPENGL_FORWARD_COMPAT</code> hints to <code>GLFW_TRUE</code> will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail.</p>
|
||||
<p >GLFW uses the <code>WGL_ARB_create_context_profile</code> extension to provide support for context profiles. Where this extension is unavailable, setting the <code>GLFW_OPENGL_PROFILE</code> hint to anything but <code>GLFW_OPENGL_ANY_PROFILE</code> will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail.</p>
|
||||
<p >GLFW uses the <code>WGL_ARB_context_flush_control</code> extension to provide control over whether a context is flushed when it is released (made non-current). Where this extension is unavailable, the <code>GLFW_CONTEXT_RELEASE_BEHAVIOR</code> hint will have no effect and the context will always be flushed when released.</p>
|
||||
<p >GLFW uses the <code>WGL_ARB_framebuffer_sRGB</code> and <code>WGL_EXT_framebuffer_sRGB</code> extensions to provide support for sRGB framebuffers. Where both of these extension are unavailable, the <code>GLFW_SRGB_CAPABLE</code> hint will have no effect.</p>
|
||||
<h1><a class="anchor" id="compat_osx"></a>
|
||||
OpenGL on macOS</h1>
|
||||
<p >Support for OpenGL 3.2 and above was introduced with OS X 10.7 and even then only forward-compatible, core profile contexts are supported. Support for OpenGL 4.1 was introduced with OS X 10.9, also limited to forward-compatible, core profile contexts. There is also still no mechanism for requesting debug contexts or no-error contexts. Versions of Mac OS X earlier than 10.7 support at most OpenGL version 2.1.</p>
|
||||
<p >Because of this, on OS X 10.7 and later, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail if given version 3.0 or 3.1. The <code>GLFW_OPENGL_FORWARD_COMPAT</code> hint must be set to <code>GLFW_TRUE</code> and the <code>GLFW_OPENGL_PROFILE</code> hint must be set to <code>GLFW_OPENGL_CORE_PROFILE</code> when creating OpenGL 3.2 and later contexts. The <code>GLFW_OPENGL_DEBUG_CONTEXT</code> and <code>GLFW_CONTEXT_NO_ERROR</code> hints are ignored.</p>
|
||||
<p >Also, on Mac OS X 10.6 and below, the <code>GLFW_CONTEXT_VERSION_MAJOR</code> and <code>GLFW_CONTEXT_VERSION_MINOR</code> hints will fail if given a version above 2.1, setting the <code>GLFW_OPENGL_PROFILE</code> or <code>GLFW_OPENGL_FORWARD_COMPAT</code> hints to a non-default value will cause <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> to fail and the <code>GLFW_OPENGL_DEBUG_CONTEXT</code> hint is ignored.</p>
|
||||
<h1><a class="anchor" id="compat_vulkan"></a>
|
||||
Vulkan loader and API</h1>
|
||||
<p >By default, GLFW uses the standard system-wide Vulkan loader to access the Vulkan API on all platforms except macOS. This is installed by both graphics drivers and Vulkan SDKs. If either the loader or at least one minimally functional ICD is missing, <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> will return <code>GLFW_FALSE</code> and all other Vulkan-related functions will fail with an <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error.</p>
|
||||
<h1><a class="anchor" id="compat_wsi"></a>
|
||||
Vulkan WSI extensions</h1>
|
||||
<p >The Vulkan WSI extensions are used to create Vulkan surfaces for GLFW windows on all supported platforms.</p>
|
||||
<p >GLFW uses the <code>VK_KHR_surface</code> and <code>VK_KHR_win32_surface</code> extensions to create surfaces on Microsoft Windows. If any of these extensions are not available, <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail.</p>
|
||||
<p >GLFW uses the <code>VK_KHR_surface</code> and either the <code>VK_MVK_macos_surface</code> or <code>VK_EXT_metal_surface</code> extensions to create surfaces on macOS. If any of these extensions are not available, <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail.</p>
|
||||
<p >GLFW uses the <code>VK_KHR_surface</code> and either the <code>VK_KHR_xlib_surface</code> or <code>VK_KHR_xcb_surface</code> extensions to create surfaces on X11. If <code>VK_KHR_surface</code> or both <code>VK_KHR_xlib_surface</code> and <code>VK_KHR_xcb_surface</code> are not available, <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail.</p>
|
||||
<p >GLFW uses the <code>VK_KHR_surface</code> and <code>VK_KHR_wayland_surface</code> extensions to create surfaces on Wayland. If any of these extensions are not available, <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> will return an empty list and window surface creation will fail. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
74
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/compile_8dox.html
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: compile.dox File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">compile.dox File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
216
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/compile_guide.html
vendored
Normal file
@ -0,0 +1,216 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Compiling GLFW</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Compiling GLFW </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="toc"><h3>Table of Contents</h3>
|
||||
<ul><li class="level1"><a href="#compile_cmake">Using CMake</a><ul><li class="level2"><a href="#compile_deps">Installing dependencies</a><ul><li class="level3"><a href="#compile_deps_x11">Dependencies for X11 on Unix-like systems</a></li>
|
||||
<li class="level3"><a href="#compile_deps_wayland">Dependencies for Wayland on Unix-like systems</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level2"><a href="#compile_generate">Generating build files with CMake</a><ul><li class="level3"><a href="#compile_generate_gui">Generating files with the CMake GUI</a></li>
|
||||
<li class="level3"><a href="#compile_generate_cli">Generating files with the CMake command-line tool</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level2"><a href="#compile_compile">Compiling the library</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level1"><a href="#compile_options">CMake options</a><ul><li class="level2"><a href="#compile_options_shared">Shared CMake options</a></li>
|
||||
<li class="level2"><a href="#compile_options_win32">Windows specific CMake options</a></li>
|
||||
<li class="level2"><a href="#compile_options_wayland">Wayland specific CMake options</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level1"><a href="#compile_mingw_cross">Cross-compilation with CMake and MinGW</a></li>
|
||||
<li class="level1"><a href="#compile_manual">Compiling GLFW manually</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="textblock"><p >This is about compiling the GLFW library itself. For information on how to build applications that use GLFW, see <a class="el" href="build_guide.html">Building applications</a>.</p>
|
||||
<h1><a class="anchor" id="compile_cmake"></a>
|
||||
Using CMake</h1>
|
||||
<dl class="section note"><dt>Note</dt><dd>GLFW behaves like most other libraries that use CMake so this guide mostly describes the basic configure/generate/compile sequence. If you are already familiar with this from other projects, you may want to focus on the <a class="el" href="compile_guide.html#compile_deps">Installing dependencies</a> and <a class="el" href="compile_guide.html#compile_options">CMake options</a> sections for GLFW-specific information.</dd></dl>
|
||||
<p>GLFW uses <a href="https://cmake.org/">CMake</a> to generate project files or makefiles for your chosen development environment. To compile GLFW, first generate these files with CMake and then use them to compile the GLFW library.</p>
|
||||
<p >If you are on Windows and macOS you can <a href="https://cmake.org/download/">download CMake</a> from their site.</p>
|
||||
<p >If you are on a Unix-like system such as Linux, FreeBSD or Cygwin or have a package system like Fink, MacPorts or Homebrew, you can install its CMake package.</p>
|
||||
<p >CMake is a complex tool and this guide will only show a few of the possible ways to set up and compile GLFW. The CMake project has their own much more detailed <a href="https://cmake.org/cmake/help/latest/guide/user-interaction/">CMake user guide</a> that includes everything in this guide not specific to GLFW. It may be a useful companion to this one.</p>
|
||||
<h2><a class="anchor" id="compile_deps"></a>
|
||||
Installing dependencies</h2>
|
||||
<p >The C/C++ development environments in Visual Studio, Xcode and MinGW come with all necessary dependencies for compiling GLFW, but on Unix-like systems like Linux and FreeBSD you will need a few extra packages.</p>
|
||||
<h3><a class="anchor" id="compile_deps_x11"></a>
|
||||
Dependencies for X11 on Unix-like systems</h3>
|
||||
<p >To compile GLFW for X11, you need to have the X11 development packages installed. They are not needed to build or run programs that use GLFW.</p>
|
||||
<p >On Debian and derivates like Ubuntu and Linux Mint the <code>xorg-dev</code> meta-package pulls in the development packages for all of X11.</p>
|
||||
<div class="fragment"><div class="line">sudo apt install xorg-dev</div>
|
||||
</div><!-- fragment --><p >On Fedora and derivatives like Red Hat the X11 extension packages <code>libXcursor-devel</code>, <code>libXi-devel</code>, <code>libXinerama-devel</code> and <code>libXrandr-devel</code> required by GLFW pull in all its other dependencies.</p>
|
||||
<div class="fragment"><div class="line">sudo dnf install libXcursor-devel libXi-devel libXinerama-devel libXrandr-devel</div>
|
||||
</div><!-- fragment --><p >On FreeBSD the X11 headers are installed along the end-user X11 packages, so if you have an X server running you should have the headers as well. If not, install the <code>xorgproto</code> package.</p>
|
||||
<div class="fragment"><div class="line">pkg install xorgproto</div>
|
||||
</div><!-- fragment --><p >On Cygwin the <code>libXcursor-devel</code>, <code>libXi-devel</code>, <code>libXinerama-devel</code>, <code>libXrandr-devel</code> and <code>libXrender-devel</code> packages in the Libs section of the GUI installer will install all the headers and other development related files GLFW requires for X11.</p>
|
||||
<p >Once you have the required depdendencies, move on to <a class="el" href="compile_guide.html#compile_generate">Generating build files with CMake</a>.</p>
|
||||
<h3><a class="anchor" id="compile_deps_wayland"></a>
|
||||
Dependencies for Wayland on Unix-like systems</h3>
|
||||
<p >To compile GLFW for Wayland, you need to have the Wayland and xkbcommon development packages installed. They are not needed to build or run programs that use GLFW.</p>
|
||||
<p >On Debian and derivates like Ubuntu and Linux Mint you will need the <code>libwayland-dev</code>, <code>libxkbcommon-dev</code>, <code>wayland-protocols</code> and <code>extra-cmake-modules</code> packages.</p>
|
||||
<div class="fragment"><div class="line">sudo apt install libwayland-dev libxkbcommon-dev wayland-protocols extra-cmake-modules</div>
|
||||
</div><!-- fragment --><p >On Fedora and derivatives like Red Hat you will need the <code>wayland-devel</code>, <code>libxkbcommon-devel</code>, <code>wayland-protocols-devel</code> and <code>extra-cmake-modules</code> packages.</p>
|
||||
<div class="fragment"><div class="line">sudo dnf install wayland-devel libxkbcommon-devel wayland-protocols-devel extra-cmake-modules</div>
|
||||
</div><!-- fragment --><p >On FreeBSD you will need the <code>wayland</code>, <code>libxkbcommon</code>, <code>wayland-protocols</code> and <code>kf5-extra-cmake-modules</code> packages.</p>
|
||||
<div class="fragment"><div class="line">pkg install wayland libxkbcommon wayland-protocols kf5-extra-cmake-modules</div>
|
||||
</div><!-- fragment --><p >Once you have the required depdendencies, move on to <a class="el" href="compile_guide.html#compile_generate">Generating build files with CMake</a>.</p>
|
||||
<h2><a class="anchor" id="compile_generate"></a>
|
||||
Generating build files with CMake</h2>
|
||||
<p >Once you have all necessary dependencies it is time to generate the project files or makefiles for your development environment. CMake needs two paths for this:</p>
|
||||
<ul>
|
||||
<li>the path to the root directory of the GLFW source tree (not its <code>src</code> subdirectory)</li>
|
||||
<li>the path to the directory where the generated build files and compiled binaries will be placed</li>
|
||||
</ul>
|
||||
<p >If these are the same, it is called an in-tree build, otherwise it is called an out-of-tree build.</p>
|
||||
<p >Out-of-tree builds are recommended as they avoid cluttering up the source tree. They also allow you to have several build directories for different configurations all using the same source tree.</p>
|
||||
<p >A common pattern when building a single configuration is to have a build directory named <code>build</code> in the root of the source tree.</p>
|
||||
<h3><a class="anchor" id="compile_generate_gui"></a>
|
||||
Generating files with the CMake GUI</h3>
|
||||
<p >Start the CMake GUI and set the paths to the source and build directories described above. Then press <em>Configure</em> and <em>Generate</em>.</p>
|
||||
<p >If you wish change any CMake variables in the list, press <em>Configure</em> and then <em>Generate</em> to have the new values take effect. The variable list will be populated after the first configure step.</p>
|
||||
<p >By default GLFW will use X11 on Linux and other Unix-like systems other than macOS. To use Wayland instead, set the <code>GLFW_USE_WAYLAND</code> option in the GLFW section of the variable list, then apply the new value as described above.</p>
|
||||
<p >Once you have generated the project files or makefiles for your chosen development environment, move on to <a class="el" href="compile_guide.html#compile_compile">Compiling the library</a>.</p>
|
||||
<h3><a class="anchor" id="compile_generate_cli"></a>
|
||||
Generating files with the CMake command-line tool</h3>
|
||||
<p >To make a build directory, pass the source and build directories to the <code>cmake</code> command. These can be relative or absolute paths. The build directory is created if it doesn't already exist.</p>
|
||||
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build</div>
|
||||
</div><!-- fragment --><p >It is common to name the build directory <code>build</code> and place it in the root of the source tree when only planning to build a single configuration.</p>
|
||||
<div class="fragment"><div class="line">cd path/to/glfw</div>
|
||||
<div class="line">cmake -S . -B build</div>
|
||||
</div><!-- fragment --><p >Without other flags these will generate Visual Studio project files on Windows and makefiles on other platforms. You can choose other targets using the <code>-G</code> flag.</p>
|
||||
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build -G Xcode</div>
|
||||
</div><!-- fragment --><p >By default GLFW will use X11 on Linux and other Unix-like systems other than macOS. To use Wayland instead, set the <code>GLFW_USE_WAYLAND</code> CMake option.</p>
|
||||
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build -D GLFW_USE_WAYLAND=1</div>
|
||||
</div><!-- fragment --><p >Once you have generated the project files or makefiles for your chosen development environment, move on to <a class="el" href="compile_guide.html#compile_compile">Compiling the library</a>.</p>
|
||||
<h2><a class="anchor" id="compile_compile"></a>
|
||||
Compiling the library</h2>
|
||||
<p >You should now have all required dependencies and the project files or makefiles necessary to compile GLFW. Go ahead and compile the actual GLFW library with these files as you would with any other project.</p>
|
||||
<p >With Visual Studio open <code>GLFW.sln</code> and use the Build menu. With Xcode open <code>GLFW.xcodeproj</code> and use the Project menu.</p>
|
||||
<p >With Linux, macOS and other forms of Unix, run <code>make</code>.</p>
|
||||
<div class="fragment"><div class="line">cd path/to/build</div>
|
||||
<div class="line">make</div>
|
||||
</div><!-- fragment --><p >With MinGW, it is <code>mingw32-make</code>.</p>
|
||||
<div class="fragment"><div class="line">cd path/to/build</div>
|
||||
<div class="line">mingw32-make</div>
|
||||
</div><!-- fragment --><p >Any CMake build directory can also be built with the <code>cmake</code> command and the <code>--build</code> flag.</p>
|
||||
<div class="fragment"><div class="line">cmake --build path/to/build</div>
|
||||
</div><!-- fragment --><p >This will run the platform specific build tool the directory was generated for.</p>
|
||||
<p >Once the GLFW library is compiled you are ready to build your application, linking it to the GLFW library. See <a class="el" href="build_guide.html">Building applications</a> for more information.</p>
|
||||
<h1><a class="anchor" id="compile_options"></a>
|
||||
CMake options</h1>
|
||||
<p >The CMake files for GLFW provide a number of options, although not all are available on all supported platforms. Some of these are de facto standards among projects using CMake and so have no <code>GLFW_</code> prefix.</p>
|
||||
<p >If you are using the GUI version of CMake, these are listed and can be changed from there. If you are using the command-line version of CMake you can use the <code>ccmake</code> ncurses GUI to set options. Some package systems like Ubuntu and other distributions based on Debian GNU/Linux have this tool in a separate <code>cmake-curses-gui</code> package.</p>
|
||||
<p >Finally, if you don't want to use any GUI, you can set options from the <code>cmake</code> command-line with the <code>-D</code> flag.</p>
|
||||
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build -D BUILD_SHARED_LIBS=ON</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="compile_options_shared"></a>
|
||||
Shared CMake options</h2>
|
||||
<p ><a class="anchor" id="BUILD_SHARED_LIBS"></a><b>BUILD_SHARED_LIBS</b> determines whether GLFW is built as a static library or as a DLL / shared library / dynamic library. This is disabled by default, producing a static GLFW library.</p>
|
||||
<p ><a class="anchor" id="GLFW_BUILD_EXAMPLES"></a><b>GLFW_BUILD_EXAMPLES</b> determines whether the GLFW examples are built along with the library.</p>
|
||||
<p ><a class="anchor" id="GLFW_BUILD_TESTS"></a><b>GLFW_BUILD_TESTS</b> determines whether the GLFW test programs are built along with the library.</p>
|
||||
<p ><a class="anchor" id="GLFW_BUILD_DOCS"></a><b>GLFW_BUILD_DOCS</b> determines whether the GLFW documentation is built along with the library. This is enabled by default if <a href="https://www.doxygen.nl/">Doxygen</a> is found by CMake during configuration.</p>
|
||||
<p ><a class="anchor" id="GLFW_VULKAN_STATIC"></a><b>GLFW_VULKAN_STATIC</b> determines whether to use the Vulkan loader linked directly with the application. This is disabled by default.</p>
|
||||
<h2><a class="anchor" id="compile_options_win32"></a>
|
||||
Windows specific CMake options</h2>
|
||||
<p ><a class="anchor" id="USE_MSVC_RUNTIME_LIBRARY_DLL"></a><b>USE_MSVC_RUNTIME_LIBRARY_DLL</b> determines whether to use the DLL version or the static library version of the Visual C++ runtime library. When enabled, the DLL version of the Visual C++ library is used. This is enabled by default.</p>
|
||||
<p >On CMake 3.15 and later you can set the standard CMake <a href="https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html">CMAKE_MSVC_RUNTIME_LIBRARY</a> variable instead of this GLFW-specific option.</p>
|
||||
<p ><a class="anchor" id="GLFW_USE_HYBRID_HPG"></a><b>GLFW_USE_HYBRID_HPG</b> determines whether to export the <code>NvOptimusEnablement</code> and <code>AmdPowerXpressRequestHighPerformance</code> symbols, which force the use of the high-performance GPU on Nvidia Optimus and AMD PowerXpress systems. These symbols need to be exported by the EXE to be detected by the driver, so the override will not work if GLFW is built as a DLL. This is disabled by default, letting the operating system and driver decide.</p>
|
||||
<h2><a class="anchor" id="compile_options_wayland"></a>
|
||||
Wayland specific CMake options</h2>
|
||||
<p ><a class="anchor" id="GLFW_USE_WAYLAND"></a><b>GLFW_USE_WAYLAND</b> determines whether to compile the library for Wayland. This option is only available on Linux and other Unix-like systems other than macOS. This is disabled by default.</p>
|
||||
<h1><a class="anchor" id="compile_mingw_cross"></a>
|
||||
Cross-compilation with CMake and MinGW</h1>
|
||||
<p >Both Cygwin and many Linux distributions have MinGW or MinGW-w64 packages. For example, Cygwin has the <code>mingw64-i686-gcc</code> and <code>mingw64-x86_64-gcc</code> packages for 32- and 64-bit version of MinGW-w64, while Debian GNU/Linux and derivatives like Ubuntu have the <code>mingw-w64</code> package for both.</p>
|
||||
<p >GLFW has CMake toolchain files in the <code>CMake</code> subdirectory that set up cross-compilation of Windows binaries. To use these files you set the <code>CMAKE_TOOLCHAIN_FILE</code> CMake variable with the <code>-D</code> flag add an option when configuring and generating the build files.</p>
|
||||
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build -D CMAKE_TOOLCHAIN_FILE=path/to/file</div>
|
||||
</div><!-- fragment --><p >The exact toolchain file to use depends on the prefix used by the MinGW or MinGW-w64 binaries on your system. You can usually see this in the /usr directory. For example, both the Ubuntu and Cygwin MinGW-w64 packages have <code>/usr/x86_64-w64-mingw32</code> for the 64-bit compilers, so the correct invocation would be:</p>
|
||||
<div class="fragment"><div class="line">cmake -S path/to/glfw -B path/to/build -D CMAKE_TOOLCHAIN_FILE=CMake/x86_64-w64-mingw32.cmake</div>
|
||||
</div><!-- fragment --><p >The path to the toolchain file is relative to the path to the GLFW source tree passed to the <code>-S</code> flag, not to the current directory.</p>
|
||||
<p >For more details see the <a href="https://cmake.org/cmake/help/latest/manual/cmake-toolchains.7.html">CMake toolchain guide</a>.</p>
|
||||
<h1><a class="anchor" id="compile_manual"></a>
|
||||
Compiling GLFW manually</h1>
|
||||
<p >If you wish to compile GLFW without its CMake build environment then you will have to do at least some of the platform detection yourself. GLFW needs a configuration macro to be defined in order to know what window system it is being compiled for and also has optional, platform-specific ones for various features.</p>
|
||||
<p >When building with CMake, the <code>glfw_config.h</code> configuration header is generated based on the current platform and CMake options. The GLFW CMake environment defines <b>GLFW_USE_CONFIG_H</b>, which causes this header to be included by <code>internal.h</code>. Without this macro, GLFW will expect the necessary configuration macros to be defined on the command-line.</p>
|
||||
<p >The window creation API is used to create windows, handle input, monitors, gamma ramps and clipboard. The options are:</p>
|
||||
<ul>
|
||||
<li><b>_GLFW_COCOA</b> to use the Cocoa frameworks</li>
|
||||
<li><b>_GLFW_WIN32</b> to use the Win32 API</li>
|
||||
<li><b>_GLFW_X11</b> to use the X Window System</li>
|
||||
<li><b>_GLFW_WAYLAND</b> to use the Wayland API (experimental and incomplete)</li>
|
||||
<li><b>_GLFW_OSMESA</b> to use the OSMesa API (headless and non-interactive)</li>
|
||||
</ul>
|
||||
<p >If you are building GLFW as a shared library / dynamic library / DLL then you must also define <b>_GLFW_BUILD_DLL</b>. Otherwise, you must not define it.</p>
|
||||
<p >If you are linking the Vulkan loader directly with your application then you must also define <b>_GLFW_VULKAN_STATIC</b>. Otherwise, GLFW will attempt to use the external version.</p>
|
||||
<p >If you are using a custom name for the Vulkan, EGL, GLX, OSMesa, OpenGL, GLESv1 or GLESv2 library, you can override the default names by defining those you need of <b>_GLFW_VULKAN_LIBRARY</b>, <b>_GLFW_EGL_LIBRARY</b>, <b>_GLFW_GLX_LIBRARY</b>, <b>_GLFW_OSMESA_LIBRARY</b>, <b>_GLFW_OPENGL_LIBRARY</b>, <b>_GLFW_GLESV1_LIBRARY</b> and <b>_GLFW_GLESV2_LIBRARY</b>. Otherwise, GLFW will use the built-in default names.</p>
|
||||
<dl class="section note"><dt>Note</dt><dd>None of the <a class="el" href="build_guide.html#build_macros">GLFW header option macros</a> may be defined during the compilation of GLFW. If you define any of these in your build files, make sure they are not applied to the GLFW sources. </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
74
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/context_8dox.html
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: context.dox File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">context.dox File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
251
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/context_guide.html
vendored
Normal file
@ -0,0 +1,251 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Context guide</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Context guide </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="toc"><h3>Table of Contents</h3>
|
||||
<ul><li class="level1"><a href="#context_object">Context objects</a><ul><li class="level2"><a href="#context_hints">Context creation hints</a></li>
|
||||
<li class="level2"><a href="#context_sharing">Context object sharing</a></li>
|
||||
<li class="level2"><a href="#context_offscreen">Offscreen contexts</a></li>
|
||||
<li class="level2"><a href="#context_less">Windows without contexts</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level1"><a href="#context_current">Current context</a></li>
|
||||
<li class="level1"><a href="#context_swap">Buffer swapping</a></li>
|
||||
<li class="level1"><a href="#context_glext">OpenGL and OpenGL ES extensions</a><ul><li class="level2"><a href="#context_glext_auto">Loading extension with a loader library</a></li>
|
||||
<li class="level2"><a href="#context_glext_manual">Loading extensions manually</a><ul><li class="level3"><a href="#context_glext_header">The glext.h header</a></li>
|
||||
<li class="level3"><a href="#context_glext_string">Checking for extensions</a></li>
|
||||
<li class="level3"><a href="#context_glext_proc">Fetching function pointers</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="textblock"><p >This guide introduces the OpenGL and OpenGL ES context related functions of GLFW. For details on a specific function in this category, see the <a class="el" href="group__context.html">Context reference</a>. There are also guides for the other areas of the GLFW API.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="intro_guide.html">Introduction to the API</a></li>
|
||||
<li><a class="el" href="window_guide.html">Window guide</a></li>
|
||||
<li><a class="el" href="vulkan_guide.html">Vulkan guide</a></li>
|
||||
<li><a class="el" href="monitor_guide.html">Monitor guide</a></li>
|
||||
<li><a class="el" href="input_guide.html">Input guide</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="context_object"></a>
|
||||
Context objects</h1>
|
||||
<p >A window object encapsulates both a top-level window and an OpenGL or OpenGL ES context. It is created with <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a> and destroyed with <a class="el" href="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2">glfwDestroyWindow</a> or <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>. See <a class="el" href="window_guide.html#window_creation">Window creation</a> for more information.</p>
|
||||
<p >As the window and context are inseparably linked, the window object also serves as the context handle.</p>
|
||||
<p >To test the creation of various kinds of contexts and see their properties, run the <code>glfwinfo</code> test program.</p>
|
||||
<dl class="section note"><dt>Note</dt><dd>Vulkan does not have a context and the Vulkan instance is created via the Vulkan API itself. If you will be using Vulkan to render to a window, disable context creation by setting the <a class="el" href="window_guide.html#GLFW_CLIENT_API_hint">GLFW_CLIENT_API</a> hint to <code>GLFW_NO_API</code>. For more information, see the <a class="el" href="vulkan_guide.html">Vulkan guide</a>.</dd></dl>
|
||||
<h2><a class="anchor" id="context_hints"></a>
|
||||
Context creation hints</h2>
|
||||
<p >There are a number of hints, specified using <a class="el" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>, related to what kind of context is created. See <a class="el" href="window_guide.html#window_hints_ctx">context related hints</a> in the window guide.</p>
|
||||
<h2><a class="anchor" id="context_sharing"></a>
|
||||
Context object sharing</h2>
|
||||
<p >When creating a window and its OpenGL or OpenGL ES context with <a class="el" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>, you can specify another window whose context the new one should share its objects (textures, vertex and element buffers, etc.) with.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* second_window = <a class="code hl_function" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>(640, 480, <span class="stringliteral">"Second Window"</span>, NULL, first_window);</div>
|
||||
<div class="ttc" id="agroup__window_html_ga3555a418df92ad53f917597fe2f64aeb"><div class="ttname"><a href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a></div><div class="ttdeci">GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)</div><div class="ttdoc">Creates a window and its associated context.</div></div>
|
||||
<div class="ttc" id="agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242"><div class="ttname"><a href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a></div><div class="ttdeci">struct GLFWwindow GLFWwindow</div><div class="ttdoc">Opaque window object.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1185</div></div>
|
||||
</div><!-- fragment --><p >Object sharing is implemented by the operating system and graphics driver. On platforms where it is possible to choose which types of objects are shared, GLFW requests that all types are shared.</p>
|
||||
<p >See the relevant chapter of the <a href="https://www.opengl.org/registry/">OpenGL</a> or <a href="https://www.khronos.org/opengles/">OpenGL ES</a> reference documents for more information. The name and number of this chapter unfortunately varies between versions and APIs, but has at times been named <em>Shared Objects and Multiple Contexts</em>.</p>
|
||||
<p >GLFW comes with a barebones object sharing example program called <code>sharing</code>.</p>
|
||||
<h2><a class="anchor" id="context_offscreen"></a>
|
||||
Offscreen contexts</h2>
|
||||
<p >GLFW doesn't support creating contexts without an associated window. However, contexts with hidden windows can be created with the <a class="el" href="window_guide.html#GLFW_VISIBLE_hint">GLFW_VISIBLE</a> window hint.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a>(<a class="code hl_define" href="group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4">GLFW_VISIBLE</a>, <a class="code hl_define" href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* offscreen_context = <a class="code hl_function" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>(640, 480, <span class="stringliteral">""</span>, NULL, NULL);</div>
|
||||
<div class="ttc" id="agroup__init_html_gac877fe3b627d21ef3a0a23e0a73ba8c5"><div class="ttname"><a href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a></div><div class="ttdeci">#define GLFW_FALSE</div><div class="ttdoc">Zero.</div><div class="ttdef"><b>Definition:</b> glfw3.h:321</div></div>
|
||||
<div class="ttc" id="agroup__window_html_ga7d9c8c62384b1e2821c4dc48952d2033"><div class="ttname"><a href="group__window.html#ga7d9c8c62384b1e2821c4dc48952d2033">glfwWindowHint</a></div><div class="ttdeci">void glfwWindowHint(int hint, int value)</div><div class="ttdoc">Sets the specified window hint to the desired value.</div></div>
|
||||
<div class="ttc" id="agroup__window_html_gafb3cdc45297e06d8f1eb13adc69ca6c4"><div class="ttname"><a href="group__window.html#gafb3cdc45297e06d8f1eb13adc69ca6c4">GLFW_VISIBLE</a></div><div class="ttdeci">#define GLFW_VISIBLE</div><div class="ttdoc">Window visibility window hint and attribute.</div><div class="ttdef"><b>Definition:</b> glfw3.h:814</div></div>
|
||||
</div><!-- fragment --><p >The window never needs to be shown and its context can be used as a plain offscreen context. Depending on the window manager, the size of a hidden window's framebuffer may not be usable or modifiable, so framebuffer objects are recommended for rendering with such contexts.</p>
|
||||
<p >You should still <a class="el" href="input_guide.html#events">process events</a> as long as you have at least one window, even if none of them are visible.</p>
|
||||
<p ><b>macOS:</b> The first time a window is created the menu bar is created. This is not desirable for example when writing a command-line only application. Menu bar creation can be disabled with the <a class="el" href="group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf">GLFW_COCOA_MENUBAR</a> init hint.</p>
|
||||
<h2><a class="anchor" id="context_less"></a>
|
||||
Windows without contexts</h2>
|
||||
<p >You can disable context creation by setting the <a class="el" href="window_guide.html#GLFW_CLIENT_API_hint">GLFW_CLIENT_API</a> hint to <code>GLFW_NO_API</code>. Windows without contexts must not be passed to <a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a> or <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>.</p>
|
||||
<h1><a class="anchor" id="context_current"></a>
|
||||
Current context</h1>
|
||||
<p >Before you can make OpenGL or OpenGL ES calls, you need to have a current context of the correct type. A context can only be current for a single thread at a time, and a thread can only have a single context current at a time.</p>
|
||||
<p >When moving a context between threads, you must make it non-current on the old thread before making it current on the new one.</p>
|
||||
<p >The context of a window is made current with <a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a>(window);</div>
|
||||
<div class="ttc" id="agroup__context_html_ga1c04dc242268f827290fe40aa1c91157"><div class="ttname"><a href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a></div><div class="ttdeci">void glfwMakeContextCurrent(GLFWwindow *window)</div><div class="ttdoc">Makes the context of the specified window current for the calling thread.</div></div>
|
||||
</div><!-- fragment --><p >The window of the current context is returned by <a class="el" href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">glfwGetCurrentContext</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window = <a class="code hl_function" href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">glfwGetCurrentContext</a>();</div>
|
||||
<div class="ttc" id="agroup__context_html_gad94e80185397a6cf5fe2ab30567af71c"><div class="ttname"><a href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">glfwGetCurrentContext</a></div><div class="ttdeci">GLFWwindow * glfwGetCurrentContext(void)</div><div class="ttdoc">Returns the window whose context is current on the calling thread.</div></div>
|
||||
</div><!-- fragment --><p >The following GLFW functions require a context to be current. Calling any these functions without a current context will generate a <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a></li>
|
||||
<li><a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a></li>
|
||||
<li><a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="context_swap"></a>
|
||||
Buffer swapping</h1>
|
||||
<p >See <a class="el" href="window_guide.html#buffer_swap">Buffer swapping</a> in the window guide.</p>
|
||||
<h1><a class="anchor" id="context_glext"></a>
|
||||
OpenGL and OpenGL ES extensions</h1>
|
||||
<p >One of the benefits of OpenGL and OpenGL ES is their extensibility. Hardware vendors may include extensions in their implementations that extend the API before that functionality is included in a new version of the OpenGL or OpenGL ES specification, and some extensions are never included and remain as extensions until they become obsolete.</p>
|
||||
<p >An extension is defined by:</p>
|
||||
<ul>
|
||||
<li>An extension name (e.g. <code>GL_ARB_gl_spirv</code>)</li>
|
||||
<li>New OpenGL tokens (e.g. <code>GL_SPIR_V_BINARY_ARB</code>)</li>
|
||||
<li>New OpenGL functions (e.g. <code>glSpecializeShaderARB</code>)</li>
|
||||
</ul>
|
||||
<p >Note the <code>ARB</code> affix, which stands for Architecture Review Board and is used for official extensions. The extension above was created by the ARB, but there are many different affixes, like <code>NV</code> for Nvidia and <code>AMD</code> for, well, AMD. Any group may also use the generic <code>EXT</code> affix. Lists of extensions, together with their specifications, can be found at the <a href="https://www.opengl.org/registry/">OpenGL Registry</a> and <a href="https://www.khronos.org/registry/gles/">OpenGL ES Registry</a>.</p>
|
||||
<h2><a class="anchor" id="context_glext_auto"></a>
|
||||
Loading extension with a loader library</h2>
|
||||
<p >An extension loader library is the easiest and best way to access both OpenGL and OpenGL ES extensions and modern versions of the core OpenGL or OpenGL ES APIs. They will take care of all the details of declaring and loading everything you need. One such library is <a href="https://github.com/Dav1dde/glad">glad</a> and there are several others.</p>
|
||||
<p >The following example will use glad but all extension loader libraries work similarly.</p>
|
||||
<p >First you need to generate the source files using the glad Python script. This example generates a loader for any version of OpenGL, which is the default for both GLFW and glad, but loaders for OpenGL ES, as well as loaders for specific API versions and extension sets can be generated. The generated files are written to the <code>output</code> directory.</p>
|
||||
<div class="fragment"><div class="line">python main.py --generator c --no-loader --out-path output</div>
|
||||
</div><!-- fragment --><p >The <code>--no-loader</code> option is added because GLFW already provides a function for loading OpenGL and OpenGL ES function pointers, one that automatically uses the selected context creation API, and glad can call this instead of having to implement its own. There are several other command-line options as well. See the glad documentation for details.</p>
|
||||
<p >Add the generated <code>output/src/glad.c</code>, <code>output/include/glad/glad.h</code> and <code>output/include/KHR/khrplatform.h</code> files to your build. Then you need to include the glad header file, which will replace the OpenGL header of your development environment. By including the glad header before the GLFW header, it suppresses the development environment's OpenGL or OpenGL ES header.</p>
|
||||
<div class="fragment"><div class="line"><span class="preprocessor">#include <glad/glad.h></span></div>
|
||||
<div class="line"><span class="preprocessor">#include <<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>></span></div>
|
||||
<div class="ttc" id="aglfw3_8h_html"><div class="ttname"><a href="glfw3_8h.html">glfw3.h</a></div><div class="ttdoc">The header of the GLFW 3 API.</div></div>
|
||||
</div><!-- fragment --><p >Finally you need to initialize glad once you have a suitable current context.</p>
|
||||
<div class="fragment"><div class="line">window = <a class="code hl_function" href="group__window.html#ga3555a418df92ad53f917597fe2f64aeb">glfwCreateWindow</a>(640, 480, <span class="stringliteral">"My Window"</span>, NULL, NULL);</div>
|
||||
<div class="line"><span class="keywordflow">if</span> (!window)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> ...</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><a class="code hl_function" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a>(window);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line">gladLoadGLLoader((GLADloadproc) <a class="code hl_function" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a>);</div>
|
||||
<div class="ttc" id="agroup__context_html_ga35f1837e6f666781842483937612f163"><div class="ttname"><a href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a></div><div class="ttdeci">GLFWglproc glfwGetProcAddress(const char *procname)</div><div class="ttdoc">Returns the address of the specified function for the current context.</div></div>
|
||||
</div><!-- fragment --><p >Once glad has been loaded, you have access to all OpenGL core and extension functions supported by both the context you created and the glad loader you generated and you are ready to start rendering.</p>
|
||||
<p >You can specify a minimum required OpenGL or OpenGL ES version with <a class="el" href="window_guide.html#window_hints_ctx">context hints</a>. If your needs are more complex, you can check the actual OpenGL or OpenGL ES version with <a class="el" href="window_guide.html#window_attribs_ctx">context attributes</a>, or you can check whether a specific version is supported by the current context with the <code>GLAD_GL_VERSION_x_x</code> booleans.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (GLAD_GL_VERSION_3_2)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Call OpenGL 3.2+ specific code</span></div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p >To check whether a specific extension is supported, use the <code>GLAD_GL_xxx</code> booleans.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (GLAD_GL_ARB_gl_spirv)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Use GL_ARB_gl_spirv</span></div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="context_glext_manual"></a>
|
||||
Loading extensions manually</h2>
|
||||
<p ><b>Do not use this technique</b> unless it is absolutely necessary. An <a class="el" href="context_guide.html#context_glext_auto">extension loader library</a> will save you a ton of tedious, repetitive, error prone work.</p>
|
||||
<p >To use a certain extension, you must first check whether the context supports that extension and then, if it introduces new functions, retrieve the pointers to those functions. GLFW provides <a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a> and <a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a> for manual loading of extensions and new API functions.</p>
|
||||
<p >This section will demonstrate manual loading of OpenGL extensions. The loading of OpenGL ES extensions is identical except for the name of the extension header.</p>
|
||||
<h3><a class="anchor" id="context_glext_header"></a>
|
||||
The glext.h header</h3>
|
||||
<p >The <code>glext.h</code> extension header is a continually updated file that defines the interfaces for all OpenGL extensions. The latest version of this can always be found at the <a href="https://www.opengl.org/registry/">OpenGL Registry</a>. There are also extension headers for the various versions of OpenGL ES at the <a href="https://www.khronos.org/registry/gles/">OpenGL ES Registry</a>. It it strongly recommended that you use your own copy of the extension header, as the one included in your development environment may be several years out of date and may not include the extensions you wish to use.</p>
|
||||
<p >The header defines function pointer types for all functions of all extensions it supports. These have names like <code>PFNGLSPECIALIZESHADERARBPROC</code> (for <code>glSpecializeShaderARB</code>), i.e. the name is made uppercase and <code>PFN</code> (pointer to function) and <code>PROC</code> (procedure) are added to the ends.</p>
|
||||
<p >To include the extension header, define <a class="el" href="build_guide.html#GLFW_INCLUDE_GLEXT">GLFW_INCLUDE_GLEXT</a> before including the GLFW header.</p>
|
||||
<div class="fragment"><div class="line"><span class="preprocessor">#define GLFW_INCLUDE_GLEXT</span></div>
|
||||
<div class="line"><span class="preprocessor">#include <<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>></span></div>
|
||||
</div><!-- fragment --><h3><a class="anchor" id="context_glext_string"></a>
|
||||
Checking for extensions</h3>
|
||||
<p >A given machine may not actually support the extension (it may have older drivers or a graphics card that lacks the necessary hardware features), so it is necessary to check at run-time whether the context supports the extension. This is done with <a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (<a class="code hl_function" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>(<span class="stringliteral">"GL_ARB_gl_spirv"</span>))</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// The extension is supported by the current context</span></div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="agroup__context_html_ga87425065c011cef1ebd6aac75e059dfa"><div class="ttname"><a href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a></div><div class="ttdeci">int glfwExtensionSupported(const char *extension)</div><div class="ttdoc">Returns whether the specified extension is available.</div></div>
|
||||
</div><!-- fragment --><p >The argument is a null terminated ASCII string with the extension name. If the extension is supported, <a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a> returns <code>GLFW_TRUE</code>, otherwise it returns <code>GLFW_FALSE</code>.</p>
|
||||
<h3><a class="anchor" id="context_glext_proc"></a>
|
||||
Fetching function pointers</h3>
|
||||
<p >Many extensions, though not all, require the use of new OpenGL functions. These functions often do not have entry points in the client API libraries of your operating system, making it necessary to fetch them at run time. You can retrieve pointers to these functions with <a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a>.</p>
|
||||
<div class="fragment"><div class="line">PFNGLSPECIALIZESHADERARBPROC pfnSpecializeShaderARB = <a class="code hl_function" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a>(<span class="stringliteral">"glSpecializeShaderARB"</span>);</div>
|
||||
</div><!-- fragment --><p >In general, you should avoid giving the function pointer variables the (exact) same name as the function, as this may confuse your linker. Instead, you can use a different prefix, like above, or some other naming scheme.</p>
|
||||
<p >Now that all the pieces have been introduced, here is what they might look like when used together.</p>
|
||||
<div class="fragment"><div class="line"><span class="preprocessor">#define GLFW_INCLUDE_GLEXT</span></div>
|
||||
<div class="line"><span class="preprocessor">#include <<a class="code" href="glfw3_8h.html">GLFW/glfw3.h</a>></span></div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="preprocessor">#define glSpecializeShaderARB pfnSpecializeShaderARB</span></div>
|
||||
<div class="line">PFNGLSPECIALIZESHADERARBPROC pfnSpecializeShaderARB;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="comment">// Flag indicating whether the extension is supported</span></div>
|
||||
<div class="line"><span class="keywordtype">int</span> has_ARB_gl_spirv = 0;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> load_extensions(<span class="keywordtype">void</span>)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">if</span> (<a class="code hl_function" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>(<span class="stringliteral">"GL_ARB_gl_spirv"</span>))</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> pfnSpecializeShaderARB = (PFNGLSPECIALIZESHADERARBPROC)</div>
|
||||
<div class="line"> <a class="code hl_function" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a>(<span class="stringliteral">"glSpecializeShaderARB"</span>);</div>
|
||||
<div class="line"> has_ARB_gl_spirv = 1;</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordtype">void</span> some_function(<span class="keywordtype">void</span>)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">if</span> (has_ARB_gl_spirv)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// Now the extension function can be called as usual</span></div>
|
||||
<div class="line"> glSpecializeShaderARB(...);</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
81
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/deprecated.html
vendored
Normal file
@ -0,0 +1,81 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Deprecated List</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Deprecated List </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock"><dl class="reflist">
|
||||
<dt>Global <a class="el" href="group__input.html#gac3cf64f90b6219c05ac7b7822d5a4b8f">GLFWcharmodsfun</a> )(GLFWwindow *window, unsigned int codepoint, int mods)</dt>
|
||||
<dd><a class="anchor" id="_deprecated000001"></a>Scheduled for removal in version 4.0. </dd>
|
||||
<dt>Global <a class="el" href="group__input.html#ga0b7f4ad13c2b17435ff13b6dcfb4e43c">glfwSetCharModsCallback</a> (GLFWwindow *window, GLFWcharmodsfun callback)</dt>
|
||||
<dd><a class="anchor" id="_deprecated000002"></a>Scheduled for removal in version 4.0.</dd>
|
||||
</dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
88
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/dir_1dfd43b3952c5bc1ba15d15b12afff7b.html
vendored
Normal file
@ -0,0 +1,88 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: GLFW Directory Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_4351554941a2744586042c1cf3cf139a.html">glfw-3.3.8</a></li><li class="navelem"><a class="el" href="dir_f6ba4c3dca55a8d4e7d63c8235e0ad43.html">include</a></li><li class="navelem"><a class="el" href="dir_1dfd43b3952c5bc1ba15d15b12afff7b.html">GLFW</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">GLFW Directory Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="files" name="files"></a>
|
||||
Files</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="glfw3_8h.html">glfw3.h</a> <a href="glfw3_8h_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:glfw3_8h"><td class="mdescLeft"> </td><td class="mdescRight">The header of the GLFW 3 API. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">file  </td><td class="memItemRight" valign="bottom"><a class="el" href="glfw3native_8h.html">glfw3native.h</a> <a href="glfw3native_8h_source.html">[code]</a></td></tr>
|
||||
<tr class="memdesc:glfw3native_8h"><td class="mdescLeft"> </td><td class="mdescRight">The header of the native access functions. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
86
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/dir_4351554941a2744586042c1cf3cf139a.html
vendored
Normal file
@ -0,0 +1,86 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: glfw-3.3.8 Directory Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_4351554941a2744586042c1cf3cf139a.html">glfw-3.3.8</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">glfw-3.3.8 Directory Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="subdirs" name="subdirs"></a>
|
||||
Directories</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">directory  </td><td class="memItemRight" valign="bottom"><a class="el" href="dir_fda32cf7bec00275262cb8799a618f76.html">docs</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">directory  </td><td class="memItemRight" valign="bottom"><a class="el" href="dir_f6ba4c3dca55a8d4e7d63c8235e0ad43.html">include</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
84
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/dir_f6ba4c3dca55a8d4e7d63c8235e0ad43.html
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: include Directory Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_4351554941a2744586042c1cf3cf139a.html">glfw-3.3.8</a></li><li class="navelem"><a class="el" href="dir_f6ba4c3dca55a8d4e7d63c8235e0ad43.html">include</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">include Directory Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="subdirs" name="subdirs"></a>
|
||||
Directories</h2></td></tr>
|
||||
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">directory  </td><td class="memItemRight" valign="bottom"><a class="el" href="dir_1dfd43b3952c5bc1ba15d15b12afff7b.html">GLFW</a></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
78
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/dir_fda32cf7bec00275262cb8799a618f76.html
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: docs Directory Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_4351554941a2744586042c1cf3cf139a.html">glfw-3.3.8</a></li><li class="navelem"><a class="el" href="dir_fda32cf7bec00275262cb8799a618f76.html">docs</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">docs Directory Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/doc.png
vendored
Normal file
|
After Width: | Height: | Size: 746 B |
1841
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/doxygen.css
vendored
Normal file
26
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/doxygen.svg
vendored
Normal file
|
After Width: | Height: | Size: 15 KiB |
121
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/dynsections.js
vendored
Normal file
@ -0,0 +1,121 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function toggleVisibility(linkObj)
|
||||
{
|
||||
var base = $(linkObj).attr('id');
|
||||
var summary = $('#'+base+'-summary');
|
||||
var content = $('#'+base+'-content');
|
||||
var trigger = $('#'+base+'-trigger');
|
||||
var src=$(trigger).attr('src');
|
||||
if (content.is(':visible')===true) {
|
||||
content.hide();
|
||||
summary.show();
|
||||
$(linkObj).addClass('closed').removeClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
content.show();
|
||||
summary.hide();
|
||||
$(linkObj).removeClass('closed').addClass('opened');
|
||||
$(trigger).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function updateStripes()
|
||||
{
|
||||
$('table.directory tr').
|
||||
removeClass('even').filter(':visible:even').addClass('even');
|
||||
}
|
||||
|
||||
function toggleLevel(level)
|
||||
{
|
||||
$('table.directory tr').each(function() {
|
||||
var l = this.id.split('_').length-1;
|
||||
var i = $('#img'+this.id.substring(3));
|
||||
var a = $('#arr'+this.id.substring(3));
|
||||
if (l<level+1) {
|
||||
i.removeClass('iconfopen iconfclosed').addClass('iconfopen');
|
||||
a.html('▼');
|
||||
$(this).show();
|
||||
} else if (l==level+1) {
|
||||
i.removeClass('iconfclosed iconfopen').addClass('iconfclosed');
|
||||
a.html('►');
|
||||
$(this).show();
|
||||
} else {
|
||||
$(this).hide();
|
||||
}
|
||||
});
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
function toggleFolder(id)
|
||||
{
|
||||
// the clicked row
|
||||
var currentRow = $('#row_'+id);
|
||||
|
||||
// all rows after the clicked row
|
||||
var rows = currentRow.nextAll("tr");
|
||||
|
||||
var re = new RegExp('^row_'+id+'\\d+_$', "i"); //only one sub
|
||||
|
||||
// only match elements AFTER this one (can't hide elements before)
|
||||
var childRows = rows.filter(function() { return this.id.match(re); });
|
||||
|
||||
// first row is visible we are HIDING
|
||||
if (childRows.filter(':first').is(':visible')===true) {
|
||||
// replace down arrow by right arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
currentRowSpans.filter(".arrow").html('►');
|
||||
rows.filter("[id^=row_"+id+"]").hide(); // hide all children
|
||||
} else { // we are SHOWING
|
||||
// replace right arrow by down arrow for current row
|
||||
var currentRowSpans = currentRow.find("span");
|
||||
currentRowSpans.filter(".iconfclosed").removeClass("iconfclosed").addClass("iconfopen");
|
||||
currentRowSpans.filter(".arrow").html('▼');
|
||||
// replace down arrows by right arrows for child rows
|
||||
var childRowsSpans = childRows.find("span");
|
||||
childRowsSpans.filter(".iconfopen").removeClass("iconfopen").addClass("iconfclosed");
|
||||
childRowsSpans.filter(".arrow").html('►');
|
||||
childRows.show(); //show all children
|
||||
}
|
||||
updateStripes();
|
||||
}
|
||||
|
||||
|
||||
function toggleInherit(id)
|
||||
{
|
||||
var rows = $('tr.inherit.'+id);
|
||||
var img = $('tr.inherit_header.'+id+' img');
|
||||
var src = $(img).attr('src');
|
||||
if (rows.filter(':first').is(':visible')===true) {
|
||||
rows.css('display','none');
|
||||
$(img).attr('src',src.substring(0,src.length-8)+'closed.png');
|
||||
} else {
|
||||
rows.css('display','table-row'); // using show() causes jump in firefox
|
||||
$(img).attr('src',src.substring(0,src.length-10)+'open.png');
|
||||
}
|
||||
}
|
||||
/* @license-end */
|
||||
1
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/extra.css
vendored
Normal file
84
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/files.html
vendored
Normal file
@ -0,0 +1,84 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Files</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">Files</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all files with brief descriptions:</div><div class="directory">
|
||||
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span><span onclick="javascript:toggleLevel(4);">4</span>]</div><table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">▼</span><span id="img_0_" class="iconfopen" onclick="toggleFolder('0_')"> </span><a class="el" href="dir_4351554941a2744586042c1cf3cf139a.html" target="_self">glfw-3.3.8</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_0_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span class="iconfclosed"></span><a class="el" href="dir_fda32cf7bec00275262cb8799a618f76.html" target="_self">docs</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_1_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><span id="arr_0_1_" class="arrow" onclick="toggleFolder('0_1_')">▼</span><span id="img_0_1_" class="iconfopen" onclick="toggleFolder('0_1_')"> </span><a class="el" href="dir_f6ba4c3dca55a8d4e7d63c8235e0ad43.html" target="_self">include</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_1_0_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><span id="arr_0_1_0_" class="arrow" onclick="toggleFolder('0_1_0_')">▼</span><span id="img_0_1_0_" class="iconfopen" onclick="toggleFolder('0_1_0_')"> </span><a class="el" href="dir_1dfd43b3952c5bc1ba15d15b12afff7b.html" target="_self">GLFW</a></td><td class="desc"></td></tr>
|
||||
<tr id="row_0_1_0_0_" class="even"><td class="entry"><span style="width:64px;display:inline-block;"> </span><a href="glfw3_8h_source.html"><span class="icondoc"></span></a><a class="el" href="glfw3_8h.html" target="_self">glfw3.h</a></td><td class="desc">The header of the GLFW 3 API </td></tr>
|
||||
<tr id="row_0_1_0_1_"><td class="entry"><span style="width:64px;display:inline-block;"> </span><a href="glfw3native_8h_source.html"><span class="icondoc"></span></a><a class="el" href="glfw3native_8h.html" target="_self">glfw3native.h</a></td><td class="desc">The header of the native access functions </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
BIN
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/folderclosed.png
vendored
Normal file
|
After Width: | Height: | Size: 616 B |
BIN
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/folderopen.png
vendored
Normal file
|
After Width: | Height: | Size: 597 B |
1619
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/glfw3_8h.html
vendored
Normal file
1155
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/glfw3_8h_source.html
vendored
Normal file
160
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/glfw3native_8h.html
vendored
Normal file
@ -0,0 +1,160 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: glfw3native.h File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_4351554941a2744586042c1cf3cf139a.html">glfw-3.3.8</a></li><li class="navelem"><a class="el" href="dir_f6ba4c3dca55a8d4e7d63c8235e0ad43.html">include</a></li><li class="navelem"><a class="el" href="dir_1dfd43b3952c5bc1ba15d15b12afff7b.html">GLFW</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">glfw3native.h File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<div class="textblock"><p >This is the header file of the native access functions. See <a class="el" href="group__native.html">Native access</a> for more information. </p>
|
||||
</div>
|
||||
<p><a href="glfw3native_8h_source.html">Go to the source code of this file.</a></p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:gad4d3e9242536c0ba6be88a98f4c73a41"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41">glfwGetWin32Adapter</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:gad4d3e9242536c0ba6be88a98f4c73a41"><td class="mdescLeft"> </td><td class="mdescRight">Returns the adapter device name of the specified monitor. <a href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad4d3e9242536c0ba6be88a98f4c73a41"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766">glfwGetWin32Monitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="mdescLeft"> </td><td class="mdescRight">Returns the display device name of the specified monitor. <a href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gafe5079aa79038b0079fc09d5f0a8e667"><td class="memItemLeft" align="right" valign="top">HWND </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:gafe5079aa79038b0079fc09d5f0a8e667"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>HWND</code> of the specified window. <a href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">More...</a><br /></td></tr>
|
||||
<tr class="separator:gafe5079aa79038b0079fc09d5f0a8e667"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gadc4010d91d9cc1134d040eeb1202a143"><td class="memItemLeft" align="right" valign="top">HGLRC </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143">glfwGetWGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:gadc4010d91d9cc1134d040eeb1202a143"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>HGLRC</code> of the specified window. <a href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143">More...</a><br /></td></tr>
|
||||
<tr class="separator:gadc4010d91d9cc1134d040eeb1202a143"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf22f429aec4b1aab316142d66d9be3e6"><td class="memItemLeft" align="right" valign="top">CGDirectDisplayID </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6">glfwGetCocoaMonitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:gaf22f429aec4b1aab316142d66d9be3e6"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>CGDirectDisplayID</code> of the specified monitor. <a href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaf22f429aec4b1aab316142d66d9be3e6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac3ed9d495d0c2bb9652de5a50c648715"><td class="memItemLeft" align="right" valign="top">id </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715">glfwGetCocoaWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:gac3ed9d495d0c2bb9652de5a50c648715"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>NSWindow</code> of the specified window. <a href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac3ed9d495d0c2bb9652de5a50c648715"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga559e002e3cd63c979881770cd4dc63bc"><td class="memItemLeft" align="right" valign="top">id </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc">glfwGetNSGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga559e002e3cd63c979881770cd4dc63bc"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>NSOpenGLContext</code> of the specified window. <a href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga559e002e3cd63c979881770cd4dc63bc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6e7822385cc8a1cc3b18f60352830189"><td class="memItemLeft" align="right" valign="top">Display * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189">glfwGetX11Display</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga6e7822385cc8a1cc3b18f60352830189"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>Display</code> used by GLFW. <a href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga6e7822385cc8a1cc3b18f60352830189"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga088fbfa80f50569402b41be71ad66e40"><td class="memItemLeft" align="right" valign="top">RRCrtc </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga088fbfa80f50569402b41be71ad66e40">glfwGetX11Adapter</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:ga088fbfa80f50569402b41be71ad66e40"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>RRCrtc</code> of the specified monitor. <a href="group__native.html#ga088fbfa80f50569402b41be71ad66e40">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga088fbfa80f50569402b41be71ad66e40"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="memItemLeft" align="right" valign="top">RROutput </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c">glfwGetX11Monitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>RROutput</code> of the specified monitor. <a href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga90ca676322740842db446999a1b1f21d"><td class="memItemLeft" align="right" valign="top">Window </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga90ca676322740842db446999a1b1f21d">glfwGetX11Window</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga90ca676322740842db446999a1b1f21d"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>Window</code> of the specified window. <a href="group__native.html#ga90ca676322740842db446999a1b1f21d">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga90ca676322740842db446999a1b1f21d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga55f879ab02d93367f966186b6f0133f7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">glfwSetX11SelectionString</a> (const char *string)</td></tr>
|
||||
<tr class="memdesc:ga55f879ab02d93367f966186b6f0133f7"><td class="mdescLeft"> </td><td class="mdescRight">Sets the current primary selection to the specified string. <a href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga55f879ab02d93367f966186b6f0133f7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae084ef64dc0db140b455b1427256d3f7"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">glfwGetX11SelectionString</a> (void)</td></tr>
|
||||
<tr class="memdesc:gae084ef64dc0db140b455b1427256d3f7"><td class="mdescLeft"> </td><td class="mdescRight">Returns the contents of the current primary selection as a string. <a href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">More...</a><br /></td></tr>
|
||||
<tr class="separator:gae084ef64dc0db140b455b1427256d3f7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga62d884114b0abfcdc2930e89f20867e2"><td class="memItemLeft" align="right" valign="top">GLXContext </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2">glfwGetGLXContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga62d884114b0abfcdc2930e89f20867e2"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>GLXContext</code> of the specified window. <a href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga62d884114b0abfcdc2930e89f20867e2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1ed27b8766e859a21381e8f8ce18d049"><td class="memItemLeft" align="right" valign="top">GLXWindow </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049">glfwGetGLXWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga1ed27b8766e859a21381e8f8ce18d049"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>GLXWindow</code> of the specified window. <a href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1ed27b8766e859a21381e8f8ce18d049"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gacbe11f93ce20621de82989bbba94e62a"><td class="memItemLeft" align="right" valign="top">struct wl_display * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gacbe11f93ce20621de82989bbba94e62a">glfwGetWaylandDisplay</a> (void)</td></tr>
|
||||
<tr class="memdesc:gacbe11f93ce20621de82989bbba94e62a"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>struct wl_display*</code> used by GLFW. <a href="group__native.html#gacbe11f93ce20621de82989bbba94e62a">More...</a><br /></td></tr>
|
||||
<tr class="separator:gacbe11f93ce20621de82989bbba94e62a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga4f16066bd4c59e2f99418adfcb43dd16"><td class="memItemLeft" align="right" valign="top">struct wl_output * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16">glfwGetWaylandMonitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:ga4f16066bd4c59e2f99418adfcb43dd16"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>struct wl_output*</code> of the specified monitor. <a href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga4f16066bd4c59e2f99418adfcb43dd16"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5c597f2841229d9626f0811cca41ceb3"><td class="memItemLeft" align="right" valign="top">struct wl_surface * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3">glfwGetWaylandWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga5c597f2841229d9626f0811cca41ceb3"><td class="mdescLeft"> </td><td class="mdescRight">Returns the main <code>struct wl_surface*</code> of the specified window. <a href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga5c597f2841229d9626f0811cca41ceb3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1cd8d973f47aacb5532d368147cc3138"><td class="memItemLeft" align="right" valign="top">EGLDisplay </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138">glfwGetEGLDisplay</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga1cd8d973f47aacb5532d368147cc3138"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>EGLDisplay</code> used by GLFW. <a href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1cd8d973f47aacb5532d368147cc3138"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga671c5072becd085f4ab5771a9c8efcf1"><td class="memItemLeft" align="right" valign="top">EGLContext </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1">glfwGetEGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga671c5072becd085f4ab5771a9c8efcf1"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>EGLContext</code> of the specified window. <a href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga671c5072becd085f4ab5771a9c8efcf1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga2199b36117a6a695fec8441d8052eee6"><td class="memItemLeft" align="right" valign="top">EGLSurface </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga2199b36117a6a695fec8441d8052eee6">glfwGetEGLSurface</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga2199b36117a6a695fec8441d8052eee6"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>EGLSurface</code> of the specified window. <a href="group__native.html#ga2199b36117a6a695fec8441d8052eee6">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga2199b36117a6a695fec8441d8052eee6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3b36e3e3dcf308b776427b6bd73cc132"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132">glfwGetOSMesaColorBuffer</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height, int *format, void **buffer)</td></tr>
|
||||
<tr class="memdesc:ga3b36e3e3dcf308b776427b6bd73cc132"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the color buffer associated with the specified window. <a href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3b36e3e3dcf308b776427b6bd73cc132"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53">glfwGetOSMesaDepthBuffer</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height, int *bytesPerValue, void **buffer)</td></tr>
|
||||
<tr class="memdesc:ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the depth buffer associated with the specified window. <a href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga9e47700080094eb569cb053afaa88773"><td class="memItemLeft" align="right" valign="top">OSMesaContext </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga9e47700080094eb569cb053afaa88773">glfwGetOSMesaContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga9e47700080094eb569cb053afaa88773"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>OSMesaContext</code> of the specified window. <a href="group__native.html#ga9e47700080094eb569cb053afaa88773">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga9e47700080094eb569cb053afaa88773"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
285
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/glfw3native_8h_source.html
vendored
Normal file
@ -0,0 +1,285 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: glfw3native.h Source File</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div id="nav-path" class="navpath">
|
||||
<ul>
|
||||
<li class="navelem"><a class="el" href="dir_4351554941a2744586042c1cf3cf139a.html">glfw-3.3.8</a></li><li class="navelem"><a class="el" href="dir_f6ba4c3dca55a8d4e7d63c8235e0ad43.html">include</a></li><li class="navelem"><a class="el" href="dir_1dfd43b3952c5bc1ba15d15b12afff7b.html">GLFW</a></li> </ul>
|
||||
</div>
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">glfw3native.h</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a href="glfw3native_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span><span class="comment">/*************************************************************************</span></div>
|
||||
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno"> 2</span><span class="comment"> * GLFW 3.3 - www.glfw.org</span></div>
|
||||
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno"> 3</span><span class="comment"> * A library for OpenGL, window and input</span></div>
|
||||
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno"> 4</span><span class="comment"> *------------------------------------------------------------------------</span></div>
|
||||
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno"> 5</span><span class="comment"> * Copyright (c) 2002-2006 Marcus Geelnard</span></div>
|
||||
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno"> 6</span><span class="comment"> * Copyright (c) 2006-2018 Camilla Löwy <elmindreda@glfw.org></span></div>
|
||||
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno"> 7</span><span class="comment"> *</span></div>
|
||||
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno"> 8</span><span class="comment"> * This software is provided 'as-is', without any express or implied</span></div>
|
||||
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno"> 9</span><span class="comment"> * warranty. In no event will the authors be held liable for any damages</span></div>
|
||||
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno"> 10</span><span class="comment"> * arising from the use of this software.</span></div>
|
||||
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="comment"> *</span></div>
|
||||
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="comment"> * Permission is granted to anyone to use this software for any purpose,</span></div>
|
||||
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="comment"> * including commercial applications, and to alter it and redistribute it</span></div>
|
||||
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="comment"> * freely, subject to the following restrictions:</span></div>
|
||||
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="comment"> *</span></div>
|
||||
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="comment"> * 1. The origin of this software must not be misrepresented; you must not</span></div>
|
||||
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span><span class="comment"> * claim that you wrote the original software. If you use this software</span></div>
|
||||
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment"> * in a product, an acknowledgment in the product documentation would</span></div>
|
||||
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment"> * be appreciated but is not required.</span></div>
|
||||
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"> 20</span><span class="comment"> *</span></div>
|
||||
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"> 21</span><span class="comment"> * 2. Altered source versions must be plainly marked as such, and must not</span></div>
|
||||
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"> 22</span><span class="comment"> * be misrepresented as being the original software.</span></div>
|
||||
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"> 23</span><span class="comment"> *</span></div>
|
||||
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"> 24</span><span class="comment"> * 3. This notice may not be removed or altered from any source</span></div>
|
||||
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"> 25</span><span class="comment"> * distribution.</span></div>
|
||||
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"> 26</span><span class="comment"> *</span></div>
|
||||
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"> 27</span><span class="comment"> *************************************************************************/</span></div>
|
||||
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"> 28</span> </div>
|
||||
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"> 29</span><span class="preprocessor">#ifndef _glfw3_native_h_</span></div>
|
||||
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"> 30</span><span class="preprocessor">#define _glfw3_native_h_</span></div>
|
||||
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"> 31</span> </div>
|
||||
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"> 32</span><span class="preprocessor">#ifdef __cplusplus</span></div>
|
||||
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"> 33</span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div>
|
||||
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"> 34</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"> 35</span> </div>
|
||||
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"> 36</span> </div>
|
||||
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"> 37</span><span class="comment">/*************************************************************************</span></div>
|
||||
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"> 38</span><span class="comment"> * Doxygen documentation</span></div>
|
||||
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"> 39</span><span class="comment"> *************************************************************************/</span></div>
|
||||
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"> 40</span> </div>
|
||||
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span><span class="comment">/*************************************************************************</span></div>
|
||||
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><span class="comment"> * System headers and types</span></div>
|
||||
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><span class="comment"> *************************************************************************/</span></div>
|
||||
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span> </div>
|
||||
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><span class="preprocessor">#if !defined(GLFW_NATIVE_INCLUDE_NONE)</span></div>
|
||||
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span> </div>
|
||||
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_WIN32) || defined(GLFW_EXPOSE_NATIVE_WGL)</span></div>
|
||||
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span> <span class="comment">/* This is a workaround for the fact that glfw3.h needs to export APIENTRY (for</span></div>
|
||||
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><span class="comment"> * example to allow applications to correctly declare a GL_KHR_debug callback)</span></div>
|
||||
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><span class="comment"> * but windows.h assumes no one will define APIENTRY before it does</span></div>
|
||||
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><span class="comment"> */</span></div>
|
||||
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"> 101</span><span class="preprocessor"> #if defined(GLFW_APIENTRY_DEFINED)</span></div>
|
||||
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span><span class="preprocessor"> #undef APIENTRY</span></div>
|
||||
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="preprocessor"> #undef GLFW_APIENTRY_DEFINED</span></div>
|
||||
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><span class="preprocessor"> #endif</span></div>
|
||||
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><span class="preprocessor"> #include <windows.h></span></div>
|
||||
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span><span class="preprocessor"> #elif defined(GLFW_EXPOSE_NATIVE_COCOA) || defined(GLFW_EXPOSE_NATIVE_NSGL)</span></div>
|
||||
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="preprocessor"> #if defined(__OBJC__)</span></div>
|
||||
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span><span class="preprocessor"> #import <Cocoa/Cocoa.h></span></div>
|
||||
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="preprocessor"> #else</span></div>
|
||||
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno"> 110</span><span class="preprocessor"> #include <ApplicationServices/ApplicationServices.h></span></div>
|
||||
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno"> 111</span><span class="preprocessor"> #include <objc/objc.h></span></div>
|
||||
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"> 112</span><span class="preprocessor"> #endif</span></div>
|
||||
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"> 113</span><span class="preprocessor"> #elif defined(GLFW_EXPOSE_NATIVE_X11) || defined(GLFW_EXPOSE_NATIVE_GLX)</span></div>
|
||||
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno"> 114</span><span class="preprocessor"> #include <X11/Xlib.h></span></div>
|
||||
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno"> 115</span><span class="preprocessor"> #include <X11/extensions/Xrandr.h></span></div>
|
||||
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno"> 116</span><span class="preprocessor"> #elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)</span></div>
|
||||
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"> 117</span><span class="preprocessor"> #include <wayland-client.h></span></div>
|
||||
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"> 118</span><span class="preprocessor"> #endif</span></div>
|
||||
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno"> 119</span> </div>
|
||||
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno"> 120</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_WGL)</span></div>
|
||||
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno"> 121</span> <span class="comment">/* WGL is declared by windows.h */</span></div>
|
||||
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"> 122</span><span class="preprocessor"> #endif</span></div>
|
||||
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno"> 123</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_NSGL)</span></div>
|
||||
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"> 124</span> <span class="comment">/* NSGL is declared by Cocoa.h */</span></div>
|
||||
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"> 125</span><span class="preprocessor"> #endif</span></div>
|
||||
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno"> 126</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_GLX)</span></div>
|
||||
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno"> 127</span> <span class="comment">/* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by</span></div>
|
||||
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno"> 128</span><span class="comment"> * default it also acts as an OpenGL header</span></div>
|
||||
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno"> 129</span><span class="comment"> * However, glx.h will include gl.h, which will define it unconditionally</span></div>
|
||||
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno"> 130</span><span class="comment"> */</span></div>
|
||||
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno"> 131</span><span class="preprocessor"> #if defined(GLFW_GLAPIENTRY_DEFINED)</span></div>
|
||||
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"> 132</span><span class="preprocessor"> #undef GLAPIENTRY</span></div>
|
||||
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno"> 133</span><span class="preprocessor"> #undef GLFW_GLAPIENTRY_DEFINED</span></div>
|
||||
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno"> 134</span><span class="preprocessor"> #endif</span></div>
|
||||
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"> 135</span><span class="preprocessor"> #include <GL/glx.h></span></div>
|
||||
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno"> 136</span><span class="preprocessor"> #endif</span></div>
|
||||
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno"> 137</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_EGL)</span></div>
|
||||
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno"> 138</span><span class="preprocessor"> #include <EGL/egl.h></span></div>
|
||||
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno"> 139</span><span class="preprocessor"> #endif</span></div>
|
||||
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno"> 140</span><span class="preprocessor"> #if defined(GLFW_EXPOSE_NATIVE_OSMESA)</span></div>
|
||||
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"> 141</span> <span class="comment">/* This is a workaround for the fact that glfw3.h defines GLAPIENTRY because by</span></div>
|
||||
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno"> 142</span><span class="comment"> * default it also acts as an OpenGL header</span></div>
|
||||
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno"> 143</span><span class="comment"> * However, osmesa.h will include gl.h, which will define it unconditionally</span></div>
|
||||
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"> 144</span><span class="comment"> */</span></div>
|
||||
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno"> 145</span><span class="preprocessor"> #if defined(GLFW_GLAPIENTRY_DEFINED)</span></div>
|
||||
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno"> 146</span><span class="preprocessor"> #undef GLAPIENTRY</span></div>
|
||||
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno"> 147</span><span class="preprocessor"> #undef GLFW_GLAPIENTRY_DEFINED</span></div>
|
||||
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno"> 148</span><span class="preprocessor"> #endif</span></div>
|
||||
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno"> 149</span><span class="preprocessor"> #include <GL/osmesa.h></span></div>
|
||||
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"> 150</span><span class="preprocessor"> #endif</span></div>
|
||||
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno"> 151</span> </div>
|
||||
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno"> 152</span><span class="preprocessor">#endif </span><span class="comment">/*GLFW_NATIVE_INCLUDE_NONE*/</span><span class="preprocessor"></span></div>
|
||||
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"> 153</span> </div>
|
||||
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno"> 154</span> </div>
|
||||
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno"> 155</span><span class="comment">/*************************************************************************</span></div>
|
||||
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno"> 156</span><span class="comment"> * Functions</span></div>
|
||||
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"> 157</span><span class="comment"> *************************************************************************/</span></div>
|
||||
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"> 158</span> </div>
|
||||
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno"> 159</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_WIN32)</span></div>
|
||||
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno"><a class="line" href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41"> 175</a></span>GLFWAPI <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code hl_function" href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41">glfwGetWin32Adapter</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
|
||||
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno"> 176</span> </div>
|
||||
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"><a class="line" href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766"> 192</a></span>GLFWAPI <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code hl_function" href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766">glfwGetWin32Monitor</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
|
||||
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"> 193</span> </div>
|
||||
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"><a class="line" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667"> 216</a></span>GLFWAPI HWND <a class="code hl_function" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
|
||||
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"> 217</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno"> 218</span> </div>
|
||||
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno"> 219</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_WGL)</span></div>
|
||||
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno"><a class="line" href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143"> 243</a></span>GLFWAPI HGLRC <a class="code hl_function" href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143">glfwGetWGLContext</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
|
||||
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno"> 244</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno"> 245</span> </div>
|
||||
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno"> 246</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_COCOA)</span></div>
|
||||
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno"><a class="line" href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6"> 261</a></span>GLFWAPI CGDirectDisplayID <a class="code hl_function" href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6">glfwGetCocoaMonitor</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
|
||||
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"> 262</span> </div>
|
||||
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno"><a class="line" href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715"> 277</a></span>GLFWAPI <span class="keywordtype">id</span> <a class="code hl_function" href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715">glfwGetCocoaWindow</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
|
||||
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno"> 278</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno"> 279</span> </div>
|
||||
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno"> 280</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_NSGL)</span></div>
|
||||
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"><a class="line" href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc"> 296</a></span>GLFWAPI <span class="keywordtype">id</span> <a class="code hl_function" href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc">glfwGetNSGLContext</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
|
||||
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"> 297</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno"> 298</span> </div>
|
||||
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno"> 299</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_X11)</span></div>
|
||||
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno"><a class="line" href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189"> 314</a></span>GLFWAPI Display* <a class="code hl_function" href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189">glfwGetX11Display</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"> 315</span> </div>
|
||||
<div class="line"><a id="l00330" name="l00330"></a><span class="lineno"><a class="line" href="group__native.html#ga088fbfa80f50569402b41be71ad66e40"> 330</a></span>GLFWAPI RRCrtc <a class="code hl_function" href="group__native.html#ga088fbfa80f50569402b41be71ad66e40">glfwGetX11Adapter</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
|
||||
<div class="line"><a id="l00331" name="l00331"></a><span class="lineno"> 331</span> </div>
|
||||
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno"><a class="line" href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c"> 346</a></span>GLFWAPI RROutput <a class="code hl_function" href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c">glfwGetX11Monitor</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
|
||||
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno"> 347</span> </div>
|
||||
<div class="line"><a id="l00362" name="l00362"></a><span class="lineno"><a class="line" href="group__native.html#ga90ca676322740842db446999a1b1f21d"> 362</a></span>GLFWAPI Window <a class="code hl_function" href="group__native.html#ga90ca676322740842db446999a1b1f21d">glfwGetX11Window</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
|
||||
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno"> 363</span> </div>
|
||||
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno"><a class="line" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7"> 384</a></span>GLFWAPI <span class="keywordtype">void</span> <a class="code hl_function" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">glfwSetX11SelectionString</a>(<span class="keyword">const</span> <span class="keywordtype">char</span>* <span class="keywordtype">string</span>);</div>
|
||||
<div class="line"><a id="l00385" name="l00385"></a><span class="lineno"> 385</span> </div>
|
||||
<div class="line"><a id="l00412" name="l00412"></a><span class="lineno"><a class="line" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7"> 412</a></span>GLFWAPI <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code hl_function" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">glfwGetX11SelectionString</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a id="l00413" name="l00413"></a><span class="lineno"> 413</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00414" name="l00414"></a><span class="lineno"> 414</span> </div>
|
||||
<div class="line"><a id="l00415" name="l00415"></a><span class="lineno"> 415</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_GLX)</span></div>
|
||||
<div class="line"><a id="l00431" name="l00431"></a><span class="lineno"><a class="line" href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2"> 431</a></span>GLFWAPI GLXContext <a class="code hl_function" href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2">glfwGetGLXContext</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
|
||||
<div class="line"><a id="l00432" name="l00432"></a><span class="lineno"> 432</span> </div>
|
||||
<div class="line"><a id="l00448" name="l00448"></a><span class="lineno"><a class="line" href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049"> 448</a></span>GLFWAPI GLXWindow <a class="code hl_function" href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049">glfwGetGLXWindow</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
|
||||
<div class="line"><a id="l00449" name="l00449"></a><span class="lineno"> 449</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00450" name="l00450"></a><span class="lineno"> 450</span> </div>
|
||||
<div class="line"><a id="l00451" name="l00451"></a><span class="lineno"> 451</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)</span></div>
|
||||
<div class="line"><a id="l00466" name="l00466"></a><span class="lineno"><a class="line" href="group__native.html#gacbe11f93ce20621de82989bbba94e62a"> 466</a></span>GLFWAPI <span class="keyword">struct </span>wl_display* <a class="code hl_function" href="group__native.html#gacbe11f93ce20621de82989bbba94e62a">glfwGetWaylandDisplay</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a id="l00467" name="l00467"></a><span class="lineno"> 467</span> </div>
|
||||
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno"><a class="line" href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16"> 482</a></span>GLFWAPI <span class="keyword">struct </span>wl_output* <a class="code hl_function" href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16">glfwGetWaylandMonitor</a>(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor);</div>
|
||||
<div class="line"><a id="l00483" name="l00483"></a><span class="lineno"> 483</span> </div>
|
||||
<div class="line"><a id="l00498" name="l00498"></a><span class="lineno"><a class="line" href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3"> 498</a></span>GLFWAPI <span class="keyword">struct </span>wl_surface* <a class="code hl_function" href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3">glfwGetWaylandWindow</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
|
||||
<div class="line"><a id="l00499" name="l00499"></a><span class="lineno"> 499</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00500" name="l00500"></a><span class="lineno"> 500</span> </div>
|
||||
<div class="line"><a id="l00501" name="l00501"></a><span class="lineno"> 501</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_EGL)</span></div>
|
||||
<div class="line"><a id="l00519" name="l00519"></a><span class="lineno"><a class="line" href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138"> 519</a></span>GLFWAPI EGLDisplay <a class="code hl_function" href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138">glfwGetEGLDisplay</a>(<span class="keywordtype">void</span>);</div>
|
||||
<div class="line"><a id="l00520" name="l00520"></a><span class="lineno"> 520</span> </div>
|
||||
<div class="line"><a id="l00536" name="l00536"></a><span class="lineno"><a class="line" href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1"> 536</a></span>GLFWAPI EGLContext <a class="code hl_function" href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1">glfwGetEGLContext</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
|
||||
<div class="line"><a id="l00537" name="l00537"></a><span class="lineno"> 537</span> </div>
|
||||
<div class="line"><a id="l00553" name="l00553"></a><span class="lineno"><a class="line" href="group__native.html#ga2199b36117a6a695fec8441d8052eee6"> 553</a></span>GLFWAPI EGLSurface <a class="code hl_function" href="group__native.html#ga2199b36117a6a695fec8441d8052eee6">glfwGetEGLSurface</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
|
||||
<div class="line"><a id="l00554" name="l00554"></a><span class="lineno"> 554</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00555" name="l00555"></a><span class="lineno"> 555</span> </div>
|
||||
<div class="line"><a id="l00556" name="l00556"></a><span class="lineno"> 556</span><span class="preprocessor">#if defined(GLFW_EXPOSE_NATIVE_OSMESA)</span></div>
|
||||
<div class="line"><a id="l00579" name="l00579"></a><span class="lineno"><a class="line" href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132"> 579</a></span>GLFWAPI <span class="keywordtype">int</span> <a class="code hl_function" href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132">glfwGetOSMesaColorBuffer</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span>* width, <span class="keywordtype">int</span>* height, <span class="keywordtype">int</span>* format, <span class="keywordtype">void</span>** buffer);</div>
|
||||
<div class="line"><a id="l00580" name="l00580"></a><span class="lineno"> 580</span> </div>
|
||||
<div class="line"><a id="l00603" name="l00603"></a><span class="lineno"><a class="line" href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53"> 603</a></span>GLFWAPI <span class="keywordtype">int</span> <a class="code hl_function" href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53">glfwGetOSMesaDepthBuffer</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span>* width, <span class="keywordtype">int</span>* height, <span class="keywordtype">int</span>* bytesPerValue, <span class="keywordtype">void</span>** buffer);</div>
|
||||
<div class="line"><a id="l00604" name="l00604"></a><span class="lineno"> 604</span> </div>
|
||||
<div class="line"><a id="l00620" name="l00620"></a><span class="lineno"><a class="line" href="group__native.html#ga9e47700080094eb569cb053afaa88773"> 620</a></span>GLFWAPI OSMesaContext <a class="code hl_function" href="group__native.html#ga9e47700080094eb569cb053afaa88773">glfwGetOSMesaContext</a>(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window);</div>
|
||||
<div class="line"><a id="l00621" name="l00621"></a><span class="lineno"> 621</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00622" name="l00622"></a><span class="lineno"> 622</span> </div>
|
||||
<div class="line"><a id="l00623" name="l00623"></a><span class="lineno"> 623</span><span class="preprocessor">#ifdef __cplusplus</span></div>
|
||||
<div class="line"><a id="l00624" name="l00624"></a><span class="lineno"> 624</span>}</div>
|
||||
<div class="line"><a id="l00625" name="l00625"></a><span class="lineno"> 625</span><span class="preprocessor">#endif</span></div>
|
||||
<div class="line"><a id="l00626" name="l00626"></a><span class="lineno"> 626</span> </div>
|
||||
<div class="line"><a id="l00627" name="l00627"></a><span class="lineno"> 627</span><span class="preprocessor">#endif </span><span class="comment">/* _glfw3_native_h_ */</span><span class="preprocessor"></span></div>
|
||||
<div class="line"><a id="l00628" name="l00628"></a><span class="lineno"> 628</span> </div>
|
||||
<div class="ttc" id="agroup__monitor_html_ga8d9efd1cde9426692c73fe40437d0ae3"><div class="ttname"><a href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></div><div class="ttdeci">struct GLFWmonitor GLFWmonitor</div><div class="ttdoc">Opaque monitor object.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1173</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga088fbfa80f50569402b41be71ad66e40"><div class="ttname"><a href="group__native.html#ga088fbfa80f50569402b41be71ad66e40">glfwGetX11Adapter</a></div><div class="ttdeci">RRCrtc glfwGetX11Adapter(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the RRCrtc of the specified monitor.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga1cd8d973f47aacb5532d368147cc3138"><div class="ttname"><a href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138">glfwGetEGLDisplay</a></div><div class="ttdeci">EGLDisplay glfwGetEGLDisplay(void)</div><div class="ttdoc">Returns the EGLDisplay used by GLFW.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga1ed27b8766e859a21381e8f8ce18d049"><div class="ttname"><a href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049">glfwGetGLXWindow</a></div><div class="ttdeci">GLXWindow glfwGetGLXWindow(GLFWwindow *window)</div><div class="ttdoc">Returns the GLXWindow of the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga2199b36117a6a695fec8441d8052eee6"><div class="ttname"><a href="group__native.html#ga2199b36117a6a695fec8441d8052eee6">glfwGetEGLSurface</a></div><div class="ttdeci">EGLSurface glfwGetEGLSurface(GLFWwindow *window)</div><div class="ttdoc">Returns the EGLSurface of the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga3b36e3e3dcf308b776427b6bd73cc132"><div class="ttname"><a href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132">glfwGetOSMesaColorBuffer</a></div><div class="ttdeci">int glfwGetOSMesaColorBuffer(GLFWwindow *window, int *width, int *height, int *format, void **buffer)</div><div class="ttdoc">Retrieves the color buffer associated with the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga4f16066bd4c59e2f99418adfcb43dd16"><div class="ttname"><a href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16">glfwGetWaylandMonitor</a></div><div class="ttdeci">struct wl_output * glfwGetWaylandMonitor(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the struct wl_output* of the specified monitor.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga559e002e3cd63c979881770cd4dc63bc"><div class="ttname"><a href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc">glfwGetNSGLContext</a></div><div class="ttdeci">id glfwGetNSGLContext(GLFWwindow *window)</div><div class="ttdoc">Returns the NSOpenGLContext of the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga55f879ab02d93367f966186b6f0133f7"><div class="ttname"><a href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">glfwSetX11SelectionString</a></div><div class="ttdeci">void glfwSetX11SelectionString(const char *string)</div><div class="ttdoc">Sets the current primary selection to the specified string.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga5c597f2841229d9626f0811cca41ceb3"><div class="ttname"><a href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3">glfwGetWaylandWindow</a></div><div class="ttdeci">struct wl_surface * glfwGetWaylandWindow(GLFWwindow *window)</div><div class="ttdoc">Returns the main struct wl_surface* of the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga62d884114b0abfcdc2930e89f20867e2"><div class="ttname"><a href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2">glfwGetGLXContext</a></div><div class="ttdeci">GLXContext glfwGetGLXContext(GLFWwindow *window)</div><div class="ttdoc">Returns the GLXContext of the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga671c5072becd085f4ab5771a9c8efcf1"><div class="ttname"><a href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1">glfwGetEGLContext</a></div><div class="ttdeci">EGLContext glfwGetEGLContext(GLFWwindow *window)</div><div class="ttdoc">Returns the EGLContext of the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga6b64039ffc88a7a2f57f0956c0c75d53"><div class="ttname"><a href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53">glfwGetOSMesaDepthBuffer</a></div><div class="ttdeci">int glfwGetOSMesaDepthBuffer(GLFWwindow *window, int *width, int *height, int *bytesPerValue, void **buffer)</div><div class="ttdoc">Retrieves the depth buffer associated with the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga6e7822385cc8a1cc3b18f60352830189"><div class="ttname"><a href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189">glfwGetX11Display</a></div><div class="ttdeci">Display * glfwGetX11Display(void)</div><div class="ttdoc">Returns the Display used by GLFW.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga90ca676322740842db446999a1b1f21d"><div class="ttname"><a href="group__native.html#ga90ca676322740842db446999a1b1f21d">glfwGetX11Window</a></div><div class="ttdeci">Window glfwGetX11Window(GLFWwindow *window)</div><div class="ttdoc">Returns the Window of the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_ga9e47700080094eb569cb053afaa88773"><div class="ttname"><a href="group__native.html#ga9e47700080094eb569cb053afaa88773">glfwGetOSMesaContext</a></div><div class="ttdeci">OSMesaContext glfwGetOSMesaContext(GLFWwindow *window)</div><div class="ttdoc">Returns the OSMesaContext of the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_gab2f8cc043905e9fa9b12bfdbbcfe874c"><div class="ttname"><a href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c">glfwGetX11Monitor</a></div><div class="ttdeci">RROutput glfwGetX11Monitor(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the RROutput of the specified monitor.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_gac3ed9d495d0c2bb9652de5a50c648715"><div class="ttname"><a href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715">glfwGetCocoaWindow</a></div><div class="ttdeci">id glfwGetCocoaWindow(GLFWwindow *window)</div><div class="ttdoc">Returns the NSWindow of the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_gac845f7dbe4c1d7fdd682a3c6fdae6766"><div class="ttname"><a href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766">glfwGetWin32Monitor</a></div><div class="ttdeci">const char * glfwGetWin32Monitor(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the display device name of the specified monitor.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_gacbe11f93ce20621de82989bbba94e62a"><div class="ttname"><a href="group__native.html#gacbe11f93ce20621de82989bbba94e62a">glfwGetWaylandDisplay</a></div><div class="ttdeci">struct wl_display * glfwGetWaylandDisplay(void)</div><div class="ttdoc">Returns the struct wl_display* used by GLFW.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_gad4d3e9242536c0ba6be88a98f4c73a41"><div class="ttname"><a href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41">glfwGetWin32Adapter</a></div><div class="ttdeci">const char * glfwGetWin32Adapter(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the adapter device name of the specified monitor.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_gadc4010d91d9cc1134d040eeb1202a143"><div class="ttname"><a href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143">glfwGetWGLContext</a></div><div class="ttdeci">HGLRC glfwGetWGLContext(GLFWwindow *window)</div><div class="ttdoc">Returns the HGLRC of the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_gae084ef64dc0db140b455b1427256d3f7"><div class="ttname"><a href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">glfwGetX11SelectionString</a></div><div class="ttdeci">const char * glfwGetX11SelectionString(void)</div><div class="ttdoc">Returns the contents of the current primary selection as a string.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_gaf22f429aec4b1aab316142d66d9be3e6"><div class="ttname"><a href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6">glfwGetCocoaMonitor</a></div><div class="ttdeci">CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the CGDirectDisplayID of the specified monitor.</div></div>
|
||||
<div class="ttc" id="agroup__native_html_gafe5079aa79038b0079fc09d5f0a8e667"><div class="ttname"><a href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a></div><div class="ttdeci">HWND glfwGetWin32Window(GLFWwindow *window)</div><div class="ttdoc">Returns the HWND of the specified window.</div></div>
|
||||
<div class="ttc" id="agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242"><div class="ttname"><a href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a></div><div class="ttdeci">struct GLFWwindow GLFWwindow</div><div class="ttdoc">Opaque window object.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1185</div></div>
|
||||
</div><!-- fragment --></div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
275
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__buttons.html
vendored
Normal file
@ -0,0 +1,275 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Mouse buttons</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> </div>
|
||||
<div class="headertitle"><div class="title">Mouse buttons<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >See <a class="el" href="input_guide.html#input_mouse_button">mouse button input</a> for how these are used. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:ga181a6e875251fd8671654eff00f9112e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga181a6e875251fd8671654eff00f9112e">GLFW_MOUSE_BUTTON_1</a>   0</td></tr>
|
||||
<tr class="separator:ga181a6e875251fd8671654eff00f9112e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga604b39b92c88ce9bd332e97fc3f4156c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c">GLFW_MOUSE_BUTTON_2</a>   1</td></tr>
|
||||
<tr class="separator:ga604b39b92c88ce9bd332e97fc3f4156c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0130d505563d0236a6f85545f19e1721"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga0130d505563d0236a6f85545f19e1721">GLFW_MOUSE_BUTTON_3</a>   2</td></tr>
|
||||
<tr class="separator:ga0130d505563d0236a6f85545f19e1721"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga53f4097bb01d5521c7d9513418c91ca9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga53f4097bb01d5521c7d9513418c91ca9">GLFW_MOUSE_BUTTON_4</a>   3</td></tr>
|
||||
<tr class="separator:ga53f4097bb01d5521c7d9513418c91ca9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf08c4ddecb051d3d9667db1d5e417c9c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#gaf08c4ddecb051d3d9667db1d5e417c9c">GLFW_MOUSE_BUTTON_5</a>   4</td></tr>
|
||||
<tr class="separator:gaf08c4ddecb051d3d9667db1d5e417c9c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae8513e06aab8aa393b595f22c6d8257a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#gae8513e06aab8aa393b595f22c6d8257a">GLFW_MOUSE_BUTTON_6</a>   5</td></tr>
|
||||
<tr class="separator:gae8513e06aab8aa393b595f22c6d8257a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga8b02a1ab55dde45b3a3883d54ffd7dc7"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga8b02a1ab55dde45b3a3883d54ffd7dc7">GLFW_MOUSE_BUTTON_7</a>   6</td></tr>
|
||||
<tr class="separator:ga8b02a1ab55dde45b3a3883d54ffd7dc7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga35d5c4263e0dc0d0a4731ca6c562f32c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c">GLFW_MOUSE_BUTTON_8</a>   7</td></tr>
|
||||
<tr class="separator:ga35d5c4263e0dc0d0a4731ca6c562f32c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab1fd86a4518a9141ec7bcde2e15a2fdf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#gab1fd86a4518a9141ec7bcde2e15a2fdf">GLFW_MOUSE_BUTTON_LAST</a>   <a class="el" href="group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c">GLFW_MOUSE_BUTTON_8</a></td></tr>
|
||||
<tr class="separator:gab1fd86a4518a9141ec7bcde2e15a2fdf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf37100431dcd5082d48f95ee8bc8cd56"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#gaf37100431dcd5082d48f95ee8bc8cd56">GLFW_MOUSE_BUTTON_LEFT</a>   <a class="el" href="group__buttons.html#ga181a6e875251fd8671654eff00f9112e">GLFW_MOUSE_BUTTON_1</a></td></tr>
|
||||
<tr class="separator:gaf37100431dcd5082d48f95ee8bc8cd56"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3e2f2cf3c4942df73cc094247d275e74"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga3e2f2cf3c4942df73cc094247d275e74">GLFW_MOUSE_BUTTON_RIGHT</a>   <a class="el" href="group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c">GLFW_MOUSE_BUTTON_2</a></td></tr>
|
||||
<tr class="separator:ga3e2f2cf3c4942df73cc094247d275e74"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga34a4d2a701434f763fd93a2ff842b95a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__buttons.html#ga34a4d2a701434f763fd93a2ff842b95a">GLFW_MOUSE_BUTTON_MIDDLE</a>   <a class="el" href="group__buttons.html#ga0130d505563d0236a6f85545f19e1721">GLFW_MOUSE_BUTTON_3</a></td></tr>
|
||||
<tr class="separator:ga34a4d2a701434f763fd93a2ff842b95a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="ga181a6e875251fd8671654eff00f9112e" name="ga181a6e875251fd8671654eff00f9112e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga181a6e875251fd8671654eff00f9112e">◆ </a></span>GLFW_MOUSE_BUTTON_1</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_1   0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga604b39b92c88ce9bd332e97fc3f4156c" name="ga604b39b92c88ce9bd332e97fc3f4156c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga604b39b92c88ce9bd332e97fc3f4156c">◆ </a></span>GLFW_MOUSE_BUTTON_2</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_2   1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga0130d505563d0236a6f85545f19e1721" name="ga0130d505563d0236a6f85545f19e1721"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga0130d505563d0236a6f85545f19e1721">◆ </a></span>GLFW_MOUSE_BUTTON_3</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_3   2</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga53f4097bb01d5521c7d9513418c91ca9" name="ga53f4097bb01d5521c7d9513418c91ca9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga53f4097bb01d5521c7d9513418c91ca9">◆ </a></span>GLFW_MOUSE_BUTTON_4</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_4   3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaf08c4ddecb051d3d9667db1d5e417c9c" name="gaf08c4ddecb051d3d9667db1d5e417c9c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaf08c4ddecb051d3d9667db1d5e417c9c">◆ </a></span>GLFW_MOUSE_BUTTON_5</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_5   4</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gae8513e06aab8aa393b595f22c6d8257a" name="gae8513e06aab8aa393b595f22c6d8257a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gae8513e06aab8aa393b595f22c6d8257a">◆ </a></span>GLFW_MOUSE_BUTTON_6</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_6   5</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga8b02a1ab55dde45b3a3883d54ffd7dc7" name="ga8b02a1ab55dde45b3a3883d54ffd7dc7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga8b02a1ab55dde45b3a3883d54ffd7dc7">◆ </a></span>GLFW_MOUSE_BUTTON_7</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_7   6</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga35d5c4263e0dc0d0a4731ca6c562f32c" name="ga35d5c4263e0dc0d0a4731ca6c562f32c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga35d5c4263e0dc0d0a4731ca6c562f32c">◆ </a></span>GLFW_MOUSE_BUTTON_8</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_8   7</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gab1fd86a4518a9141ec7bcde2e15a2fdf" name="gab1fd86a4518a9141ec7bcde2e15a2fdf"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab1fd86a4518a9141ec7bcde2e15a2fdf">◆ </a></span>GLFW_MOUSE_BUTTON_LAST</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_LAST   <a class="el" href="group__buttons.html#ga35d5c4263e0dc0d0a4731ca6c562f32c">GLFW_MOUSE_BUTTON_8</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaf37100431dcd5082d48f95ee8bc8cd56" name="gaf37100431dcd5082d48f95ee8bc8cd56"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaf37100431dcd5082d48f95ee8bc8cd56">◆ </a></span>GLFW_MOUSE_BUTTON_LEFT</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_LEFT   <a class="el" href="group__buttons.html#ga181a6e875251fd8671654eff00f9112e">GLFW_MOUSE_BUTTON_1</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga3e2f2cf3c4942df73cc094247d275e74" name="ga3e2f2cf3c4942df73cc094247d275e74"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga3e2f2cf3c4942df73cc094247d275e74">◆ </a></span>GLFW_MOUSE_BUTTON_RIGHT</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_RIGHT   <a class="el" href="group__buttons.html#ga604b39b92c88ce9bd332e97fc3f4156c">GLFW_MOUSE_BUTTON_2</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga34a4d2a701434f763fd93a2ff842b95a" name="ga34a4d2a701434f763fd93a2ff842b95a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga34a4d2a701434f763fd93a2ff842b95a">◆ </a></span>GLFW_MOUSE_BUTTON_MIDDLE</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOUSE_BUTTON_MIDDLE   <a class="el" href="group__buttons.html#ga0130d505563d0236a6f85545f19e1721">GLFW_MOUSE_BUTTON_3</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
295
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__context.html
vendored
Normal file
@ -0,0 +1,295 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Context reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#typedef-members">Typedefs</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">Context reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >This is the reference documentation for OpenGL and OpenGL ES context related functions. For more task-oriented information, see the <a class="el" href="context_guide.html">Context guide</a>. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
<tr class="memitem:ga3d47c2d2fbe0be9c505d0e04e91a133c"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c">GLFWglproc</a>) (void)</td></tr>
|
||||
<tr class="memdesc:ga3d47c2d2fbe0be9c505d0e04e91a133c"><td class="mdescLeft"> </td><td class="mdescRight">Client API function pointer type. <a href="group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3d47c2d2fbe0be9c505d0e04e91a133c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga1c04dc242268f827290fe40aa1c91157"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga1c04dc242268f827290fe40aa1c91157"><td class="mdescLeft"> </td><td class="mdescRight">Makes the context of the specified window current for the calling thread. <a href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1c04dc242268f827290fe40aa1c91157"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad94e80185397a6cf5fe2ab30567af71c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">glfwGetCurrentContext</a> (void)</td></tr>
|
||||
<tr class="memdesc:gad94e80185397a6cf5fe2ab30567af71c"><td class="mdescLeft"> </td><td class="mdescRight">Returns the window whose context is current on the calling thread. <a href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad94e80185397a6cf5fe2ab30567af71c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6d4e0cdf151b5e579bd67f13202994ed"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a> (int interval)</td></tr>
|
||||
<tr class="memdesc:ga6d4e0cdf151b5e579bd67f13202994ed"><td class="mdescLeft"> </td><td class="mdescRight">Sets the swap interval for the current context. <a href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga6d4e0cdf151b5e579bd67f13202994ed"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga87425065c011cef1ebd6aac75e059dfa"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a> (const char *extension)</td></tr>
|
||||
<tr class="memdesc:ga87425065c011cef1ebd6aac75e059dfa"><td class="mdescLeft"> </td><td class="mdescRight">Returns whether the specified extension is available. <a href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga87425065c011cef1ebd6aac75e059dfa"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga35f1837e6f666781842483937612f163"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c">GLFWglproc</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a> (const char *procname)</td></tr>
|
||||
<tr class="memdesc:ga35f1837e6f666781842483937612f163"><td class="mdescLeft"> </td><td class="mdescRight">Returns the address of the specified function for the current context. <a href="group__context.html#ga35f1837e6f666781842483937612f163">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga35f1837e6f666781842483937612f163"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Typedef Documentation</h2>
|
||||
<a id="ga3d47c2d2fbe0be9c505d0e04e91a133c" name="ga3d47c2d2fbe0be9c505d0e04e91a133c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga3d47c2d2fbe0be9c505d0e04e91a133c">◆ </a></span>GLFWglproc</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">typedef void(* GLFWglproc) (void)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Generic function pointer used for returning client API function pointers without forcing a cast from a regular pointer.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga1c04dc242268f827290fe40aa1c91157" name="ga1c04dc242268f827290fe40aa1c91157"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1c04dc242268f827290fe40aa1c91157">◆ </a></span>glfwMakeContextCurrent()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwMakeContextCurrent </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function makes the OpenGL or OpenGL ES context of the specified window current on the calling thread. A context must only be made current on a single thread at a time and each thread can have only a single current context at a time.</p>
|
||||
<p >When moving a context between threads, you must make it non-current on the old thread before making it current on the new one.</p>
|
||||
<p >By default, making a context non-current implicitly forces a pipeline flush. On machines that support <code>GL_KHR_context_flush_control</code>, you can control whether a context performs this flush by setting the <a class="el" href="window_guide.html#GLFW_CONTEXT_RELEASE_BEHAVIOR_hint">GLFW_CONTEXT_RELEASE_BEHAVIOR</a> hint.</p>
|
||||
<p >The specified window must have an OpenGL or OpenGL ES context. Specifying a window without a context will generate a <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> error.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose context to make current, or <code>NULL</code> to detach the current context.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_current">Current context</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">glfwGetCurrentContext</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad94e80185397a6cf5fe2ab30567af71c" name="gad94e80185397a6cf5fe2ab30567af71c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad94e80185397a6cf5fe2ab30567af71c">◆ </a></span>glfwGetCurrentContext()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * glfwGetCurrentContext </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns the window whose OpenGL or OpenGL ES context is current on the calling thread.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The window whose context is current, or <code>NULL</code> if no window's context is current.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_current">Current context</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga6d4e0cdf151b5e579bd67f13202994ed" name="ga6d4e0cdf151b5e579bd67f13202994ed"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga6d4e0cdf151b5e579bd67f13202994ed">◆ </a></span>glfwSwapInterval()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwSwapInterval </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>interval</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function sets the swap interval for the current OpenGL or OpenGL ES context, i.e. the number of screen updates to wait from the time <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a> was called before swapping the buffers and returning. This is sometimes called <em>vertical synchronization</em>, <em>vertical retrace synchronization</em> or just <em>vsync</em>.</p>
|
||||
<p >A context that supports either of the <code>WGL_EXT_swap_control_tear</code> and <code>GLX_EXT_swap_control_tear</code> extensions also accepts <em>negative</em> swap intervals, which allows the driver to swap immediately even if a frame arrives a little bit late. You can check for these extensions with <a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a>.</p>
|
||||
<p >A context must be current on the calling thread. Calling this function without a current context will cause a <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
|
||||
<p >This function does not apply to Vulkan. If you are rendering with Vulkan, see the present mode of your swapchain instead.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">interval</td><td>The minimum number of screen updates to wait for until the buffers are swapped by <a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a>.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>This function is not called during context creation, leaving the swap interval set to whatever is the default on that platform. This is done because some swap interval extensions used by GLFW do not allow the swap interval to be reset to zero once it has been set to a non-zero value.</dd>
|
||||
<dd>
|
||||
Some GPU drivers do not honor the requested swap interval, either because of a user setting that overrides the application's request or due to bugs in the driver.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="window_guide.html#buffer_swap">Buffer swapping</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga87425065c011cef1ebd6aac75e059dfa" name="ga87425065c011cef1ebd6aac75e059dfa"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga87425065c011cef1ebd6aac75e059dfa">◆ </a></span>glfwExtensionSupported()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int glfwExtensionSupported </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const char * </td>
|
||||
<td class="paramname"><em>extension</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns whether the specified <a class="el" href="context_guide.html#context_glext">API extension</a> is supported by the current OpenGL or OpenGL ES context. It searches both for client API extension and context creation API extensions.</p>
|
||||
<p >A context must be current on the calling thread. Calling this function without a current context will cause a <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
|
||||
<p >As this functions retrieves and searches one or more extension strings each call, it is recommended that you cache its results if it is going to be used frequently. The extension strings will not change during the lifetime of a context, so there is no danger in doing this.</p>
|
||||
<p >This function does not apply to Vulkan. If you are using Vulkan, see <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a>, <code>vkEnumerateInstanceExtensionProperties</code> and <code>vkEnumerateDeviceExtensionProperties</code> instead.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">extension</td><td>The ASCII encoded name of the extension. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the extension is available, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a>, <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga35f1837e6f666781842483937612f163" name="ga35f1837e6f666781842483937612f163"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga35f1837e6f666781842483937612f163">◆ </a></span>glfwGetProcAddress()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="group__context.html#ga3d47c2d2fbe0be9c505d0e04e91a133c">GLFWglproc</a> glfwGetProcAddress </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const char * </td>
|
||||
<td class="paramname"><em>procname</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns the address of the specified OpenGL or OpenGL ES <a class="el" href="context_guide.html#context_glext">core or extension function</a>, if it is supported by the current context.</p>
|
||||
<p >A context must be current on the calling thread. Calling this function without a current context will cause a <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> error.</p>
|
||||
<p >This function does not apply to Vulkan. If you are rendering with Vulkan, see <a class="el" href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">glfwGetInstanceProcAddress</a>, <code>vkGetInstanceProcAddr</code> and <code>vkGetDeviceProcAddr</code> instead.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">procname</td><td>The ASCII encoded name of the function. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The address of the function, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>The address of a given function is not guaranteed to be the same between contexts.</dd>
|
||||
<dd>
|
||||
This function may return a non-<code>NULL</code> address despite the associated version or extension not being available. Always check the context version or extension string first.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned function pointer is valid until the context is destroyed or the library is terminated.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="context_guide.html#context_glext">OpenGL and OpenGL ES extensions</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
297
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__errors.html
vendored
Normal file
@ -0,0 +1,297 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Error codes</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> </div>
|
||||
<div class="headertitle"><div class="title">Error codes<div class="ingroups"><a class="el" href="group__init.html">Initialization, version and error reference</a></div></div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >See <a class="el" href="intro_guide.html#error_handling">error handling</a> for how these are used. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:gafa30deee5db4d69c4c93d116ed87dbf4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4">GLFW_NO_ERROR</a>   0</td></tr>
|
||||
<tr class="memdesc:gafa30deee5db4d69c4c93d116ed87dbf4"><td class="mdescLeft"> </td><td class="mdescRight">No error has occurred. <a href="group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4">More...</a><br /></td></tr>
|
||||
<tr class="separator:gafa30deee5db4d69c4c93d116ed87dbf4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga2374ee02c177f12e1fa76ff3ed15e14a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>   0x00010001</td></tr>
|
||||
<tr class="memdesc:ga2374ee02c177f12e1fa76ff3ed15e14a"><td class="mdescLeft"> </td><td class="mdescRight">GLFW has not been initialized. <a href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga2374ee02c177f12e1fa76ff3ed15e14a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaa8290386e9528ccb9e42a3a4e16fc0d0"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">GLFW_NO_CURRENT_CONTEXT</a>   0x00010002</td></tr>
|
||||
<tr class="memdesc:gaa8290386e9528ccb9e42a3a4e16fc0d0"><td class="mdescLeft"> </td><td class="mdescRight">No context is current for this thread. <a href="group__errors.html#gaa8290386e9528ccb9e42a3a4e16fc0d0">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaa8290386e9528ccb9e42a3a4e16fc0d0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga76f6bb9c4eea73db675f096b404593ce"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a>   0x00010003</td></tr>
|
||||
<tr class="memdesc:ga76f6bb9c4eea73db675f096b404593ce"><td class="mdescLeft"> </td><td class="mdescRight">One of the arguments to the function was an invalid enum value. <a href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga76f6bb9c4eea73db675f096b404593ce"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaaf2ef9aa8202c2b82ac2d921e554c687"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a>   0x00010004</td></tr>
|
||||
<tr class="memdesc:gaaf2ef9aa8202c2b82ac2d921e554c687"><td class="mdescLeft"> </td><td class="mdescRight">One of the arguments to the function was an invalid value. <a href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaaf2ef9aa8202c2b82ac2d921e554c687"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga9023953a2bcb98c2906afd071d21ee7f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga9023953a2bcb98c2906afd071d21ee7f">GLFW_OUT_OF_MEMORY</a>   0x00010005</td></tr>
|
||||
<tr class="memdesc:ga9023953a2bcb98c2906afd071d21ee7f"><td class="mdescLeft"> </td><td class="mdescRight">A memory allocation failed. <a href="group__errors.html#ga9023953a2bcb98c2906afd071d21ee7f">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga9023953a2bcb98c2906afd071d21ee7f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga56882b290db23261cc6c053c40c2d08e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>   0x00010006</td></tr>
|
||||
<tr class="memdesc:ga56882b290db23261cc6c053c40c2d08e"><td class="mdescLeft"> </td><td class="mdescRight">GLFW could not find support for the requested API on the system. <a href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga56882b290db23261cc6c053c40c2d08e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad16c5565b4a69f9c2a9ac2c0dbc89462"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462">GLFW_VERSION_UNAVAILABLE</a>   0x00010007</td></tr>
|
||||
<tr class="memdesc:gad16c5565b4a69f9c2a9ac2c0dbc89462"><td class="mdescLeft"> </td><td class="mdescRight">The requested OpenGL or OpenGL ES version is not available. <a href="group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad16c5565b4a69f9c2a9ac2c0dbc89462"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad44162d78100ea5e87cdd38426b8c7a1"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>   0x00010008</td></tr>
|
||||
<tr class="memdesc:gad44162d78100ea5e87cdd38426b8c7a1"><td class="mdescLeft"> </td><td class="mdescRight">A platform-specific error occurred that does not match any of the more specific categories. <a href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad44162d78100ea5e87cdd38426b8c7a1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga196e125ef261d94184e2b55c05762f14"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#ga196e125ef261d94184e2b55c05762f14">GLFW_FORMAT_UNAVAILABLE</a>   0x00010009</td></tr>
|
||||
<tr class="memdesc:ga196e125ef261d94184e2b55c05762f14"><td class="mdescLeft"> </td><td class="mdescRight">The requested format is not supported or available. <a href="group__errors.html#ga196e125ef261d94184e2b55c05762f14">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga196e125ef261d94184e2b55c05762f14"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gacff24d2757da752ae4c80bf452356487"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a>   0x0001000A</td></tr>
|
||||
<tr class="memdesc:gacff24d2757da752ae4c80bf452356487"><td class="mdescLeft"> </td><td class="mdescRight">The specified window does not have an OpenGL or OpenGL ES context. <a href="group__errors.html#gacff24d2757da752ae4c80bf452356487">More...</a><br /></td></tr>
|
||||
<tr class="separator:gacff24d2757da752ae4c80bf452356487"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="gafa30deee5db4d69c4c93d116ed87dbf4" name="gafa30deee5db4d69c4c93d116ed87dbf4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gafa30deee5db4d69c4c93d116ed87dbf4">◆ </a></span>GLFW_NO_ERROR</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_NO_ERROR   0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >No error has occurred.</p>
|
||||
<dl class="section user"><dt>Analysis</dt><dd>Yay. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga2374ee02c177f12e1fa76ff3ed15e14a" name="ga2374ee02c177f12e1fa76ff3ed15e14a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga2374ee02c177f12e1fa76ff3ed15e14a">◆ </a></span>GLFW_NOT_INITIALIZED</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_NOT_INITIALIZED   0x00010001</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This occurs if a GLFW function was called that must not be called unless the library is <a class="el" href="intro_guide.html#intro_init">initialized</a>.</p>
|
||||
<dl class="section user"><dt>Analysis</dt><dd>Application programmer error. Initialize GLFW before calling any function that requires initialization. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaa8290386e9528ccb9e42a3a4e16fc0d0" name="gaa8290386e9528ccb9e42a3a4e16fc0d0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaa8290386e9528ccb9e42a3a4e16fc0d0">◆ </a></span>GLFW_NO_CURRENT_CONTEXT</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_NO_CURRENT_CONTEXT   0x00010002</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This occurs if a GLFW function was called that needs and operates on the current OpenGL or OpenGL ES context but no context is current on the calling thread. One such function is <a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a>.</p>
|
||||
<dl class="section user"><dt>Analysis</dt><dd>Application programmer error. Ensure a context is current before calling functions that require a current context. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga76f6bb9c4eea73db675f096b404593ce" name="ga76f6bb9c4eea73db675f096b404593ce"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga76f6bb9c4eea73db675f096b404593ce">◆ </a></span>GLFW_INVALID_ENUM</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_INVALID_ENUM   0x00010003</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >One of the arguments to the function was an invalid enum value, for example requesting <a class="el" href="window_guide.html#GLFW_RED_BITS">GLFW_RED_BITS</a> with <a class="el" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>.</p>
|
||||
<dl class="section user"><dt>Analysis</dt><dd>Application programmer error. Fix the offending call. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaaf2ef9aa8202c2b82ac2d921e554c687" name="gaaf2ef9aa8202c2b82ac2d921e554c687"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaaf2ef9aa8202c2b82ac2d921e554c687">◆ </a></span>GLFW_INVALID_VALUE</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_INVALID_VALUE   0x00010004</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >One of the arguments to the function was an invalid value, for example requesting a non-existent OpenGL or OpenGL ES version like 2.7.</p>
|
||||
<p >Requesting a valid but unavailable OpenGL or OpenGL ES version will instead result in a <a class="el" href="group__errors.html#gad16c5565b4a69f9c2a9ac2c0dbc89462">GLFW_VERSION_UNAVAILABLE</a> error.</p>
|
||||
<dl class="section user"><dt>Analysis</dt><dd>Application programmer error. Fix the offending call. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga9023953a2bcb98c2906afd071d21ee7f" name="ga9023953a2bcb98c2906afd071d21ee7f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga9023953a2bcb98c2906afd071d21ee7f">◆ </a></span>GLFW_OUT_OF_MEMORY</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_OUT_OF_MEMORY   0x00010005</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >A memory allocation failed.</p>
|
||||
<dl class="section user"><dt>Analysis</dt><dd>A bug in GLFW or the underlying operating system. Report the bug to our <a href="https://github.com/glfw/glfw/issues">issue tracker</a>. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga56882b290db23261cc6c053c40c2d08e" name="ga56882b290db23261cc6c053c40c2d08e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga56882b290db23261cc6c053c40c2d08e">◆ </a></span>GLFW_API_UNAVAILABLE</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_API_UNAVAILABLE   0x00010006</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >GLFW could not find support for the requested API on the system.</p>
|
||||
<dl class="section user"><dt>Analysis</dt><dd>The installed graphics driver does not support the requested API, or does not support it via the chosen context creation backend. Below are a few examples.</dd></dl>
|
||||
<dl class="section user"><dt></dt><dd>Some pre-installed Windows graphics drivers do not support OpenGL. AMD only supports OpenGL ES via EGL, while Nvidia and Intel only support it via a WGL or GLX extension. macOS does not provide OpenGL ES at all. The Mesa EGL, OpenGL and OpenGL ES libraries do not interface with the Nvidia binary driver. Older graphics drivers do not support Vulkan. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad16c5565b4a69f9c2a9ac2c0dbc89462" name="gad16c5565b4a69f9c2a9ac2c0dbc89462"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad16c5565b4a69f9c2a9ac2c0dbc89462">◆ </a></span>GLFW_VERSION_UNAVAILABLE</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_VERSION_UNAVAILABLE   0x00010007</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >The requested OpenGL or OpenGL ES version (including any requested context or framebuffer hints) is not available on this machine.</p>
|
||||
<dl class="section user"><dt>Analysis</dt><dd>The machine does not support your requirements. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.</dd></dl>
|
||||
<dl class="section user"><dt></dt><dd>Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 comes out before the 4.x series gets that far, also fail with this error and not <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a>, because GLFW cannot know what future versions will exist. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad44162d78100ea5e87cdd38426b8c7a1" name="gad44162d78100ea5e87cdd38426b8c7a1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad44162d78100ea5e87cdd38426b8c7a1">◆ </a></span>GLFW_PLATFORM_ERROR</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_PLATFORM_ERROR   0x00010008</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >A platform-specific error occurred that does not match any of the more specific categories.</p>
|
||||
<dl class="section user"><dt>Analysis</dt><dd>A bug or configuration error in GLFW, the underlying operating system or its drivers, or a lack of required resources. Report the issue to our <a href="https://github.com/glfw/glfw/issues">issue tracker</a>. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga196e125ef261d94184e2b55c05762f14" name="ga196e125ef261d94184e2b55c05762f14"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga196e125ef261d94184e2b55c05762f14">◆ </a></span>GLFW_FORMAT_UNAVAILABLE</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_FORMAT_UNAVAILABLE   0x00010009</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >If emitted during window creation, the requested pixel format is not supported.</p>
|
||||
<p >If emitted when querying the clipboard, the contents of the clipboard could not be converted to the requested format.</p>
|
||||
<dl class="section user"><dt>Analysis</dt><dd>If emitted during window creation, one or more <a class="el" href="window_guide.html#window_hints_hard">hard constraints</a> did not match any of the available pixel formats. If your application is sufficiently flexible, downgrade your requirements and try again. Otherwise, inform the user that their machine does not match your requirements.</dd></dl>
|
||||
<dl class="section user"><dt></dt><dd>If emitted when querying the clipboard, ignore the error or report it to the user, as appropriate. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gacff24d2757da752ae4c80bf452356487" name="gacff24d2757da752ae4c80bf452356487"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gacff24d2757da752ae4c80bf452356487">◆ </a></span>GLFW_NO_WINDOW_CONTEXT</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_NO_WINDOW_CONTEXT   0x0001000A</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >A window that does not have an OpenGL or OpenGL ES context was passed to a function that requires it to have one.</p>
|
||||
<dl class="section user"><dt>Analysis</dt><dd>Application programmer error. Fix the offending call. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
195
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__gamepad__axes.html
vendored
Normal file
@ -0,0 +1,195 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Gamepad axes</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> </div>
|
||||
<div class="headertitle"><div class="title">Gamepad axes<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >See <a class="el" href="input_guide.html#gamepad">Gamepad input</a> for how these are used. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:ga544e396d092036a7d80c1e5f233f7a38"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga544e396d092036a7d80c1e5f233f7a38">GLFW_GAMEPAD_AXIS_LEFT_X</a>   0</td></tr>
|
||||
<tr class="separator:ga544e396d092036a7d80c1e5f233f7a38"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga64dcf2c6e9be50b7c556ff7671996dd5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga64dcf2c6e9be50b7c556ff7671996dd5">GLFW_GAMEPAD_AXIS_LEFT_Y</a>   1</td></tr>
|
||||
<tr class="separator:ga64dcf2c6e9be50b7c556ff7671996dd5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gabd6785106cd3c5a044a6e49a395ee2fc"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#gabd6785106cd3c5a044a6e49a395ee2fc">GLFW_GAMEPAD_AXIS_RIGHT_X</a>   2</td></tr>
|
||||
<tr class="separator:gabd6785106cd3c5a044a6e49a395ee2fc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1cc20566d44d521b7183681a8e88e2e4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga1cc20566d44d521b7183681a8e88e2e4">GLFW_GAMEPAD_AXIS_RIGHT_Y</a>   3</td></tr>
|
||||
<tr class="separator:ga1cc20566d44d521b7183681a8e88e2e4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6d79561dd8907c37354426242901b86e"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga6d79561dd8907c37354426242901b86e">GLFW_GAMEPAD_AXIS_LEFT_TRIGGER</a>   4</td></tr>
|
||||
<tr class="separator:ga6d79561dd8907c37354426242901b86e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga121a7d5d20589a423cd1634dd6ee6eab"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a>   5</td></tr>
|
||||
<tr class="separator:ga121a7d5d20589a423cd1634dd6ee6eab"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga0818fd9433e1359692b7443293e5ac86"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__axes.html#ga0818fd9433e1359692b7443293e5ac86">GLFW_GAMEPAD_AXIS_LAST</a>   <a class="el" href="group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a></td></tr>
|
||||
<tr class="separator:ga0818fd9433e1359692b7443293e5ac86"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="ga544e396d092036a7d80c1e5f233f7a38" name="ga544e396d092036a7d80c1e5f233f7a38"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga544e396d092036a7d80c1e5f233f7a38">◆ </a></span>GLFW_GAMEPAD_AXIS_LEFT_X</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_AXIS_LEFT_X   0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga64dcf2c6e9be50b7c556ff7671996dd5" name="ga64dcf2c6e9be50b7c556ff7671996dd5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga64dcf2c6e9be50b7c556ff7671996dd5">◆ </a></span>GLFW_GAMEPAD_AXIS_LEFT_Y</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_AXIS_LEFT_Y   1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gabd6785106cd3c5a044a6e49a395ee2fc" name="gabd6785106cd3c5a044a6e49a395ee2fc"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gabd6785106cd3c5a044a6e49a395ee2fc">◆ </a></span>GLFW_GAMEPAD_AXIS_RIGHT_X</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_AXIS_RIGHT_X   2</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1cc20566d44d521b7183681a8e88e2e4" name="ga1cc20566d44d521b7183681a8e88e2e4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1cc20566d44d521b7183681a8e88e2e4">◆ </a></span>GLFW_GAMEPAD_AXIS_RIGHT_Y</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_AXIS_RIGHT_Y   3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga6d79561dd8907c37354426242901b86e" name="ga6d79561dd8907c37354426242901b86e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga6d79561dd8907c37354426242901b86e">◆ </a></span>GLFW_GAMEPAD_AXIS_LEFT_TRIGGER</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_AXIS_LEFT_TRIGGER   4</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga121a7d5d20589a423cd1634dd6ee6eab" name="ga121a7d5d20589a423cd1634dd6ee6eab"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga121a7d5d20589a423cd1634dd6ee6eab">◆ </a></span>GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER   5</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga0818fd9433e1359692b7443293e5ac86" name="ga0818fd9433e1359692b7443293e5ac86"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga0818fd9433e1359692b7443293e5ac86">◆ </a></span>GLFW_GAMEPAD_AXIS_LAST</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_AXIS_LAST   <a class="el" href="group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
403
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__gamepad__buttons.html
vendored
Normal file
@ -0,0 +1,403 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Gamepad buttons</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> </div>
|
||||
<div class="headertitle"><div class="title">Gamepad buttons<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >See <a class="el" href="input_guide.html#gamepad">Gamepad input</a> for how these are used. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:gae055a12fbf4b48b5954c8e1cd129b810"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810">GLFW_GAMEPAD_BUTTON_A</a>   0</td></tr>
|
||||
<tr class="separator:gae055a12fbf4b48b5954c8e1cd129b810"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga2228a6512fd5950cdb51ba07846546fa"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa">GLFW_GAMEPAD_BUTTON_B</a>   1</td></tr>
|
||||
<tr class="separator:ga2228a6512fd5950cdb51ba07846546fa"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga52cc94785cf3fe9a12e246539259887c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c">GLFW_GAMEPAD_BUTTON_X</a>   2</td></tr>
|
||||
<tr class="separator:ga52cc94785cf3fe9a12e246539259887c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gafc931248bda494b530cbe057f386a5ed"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed">GLFW_GAMEPAD_BUTTON_Y</a>   3</td></tr>
|
||||
<tr class="separator:gafc931248bda494b530cbe057f386a5ed"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga17d67b4f39a39d6b813bd1567a3507c3"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga17d67b4f39a39d6b813bd1567a3507c3">GLFW_GAMEPAD_BUTTON_LEFT_BUMPER</a>   4</td></tr>
|
||||
<tr class="separator:ga17d67b4f39a39d6b813bd1567a3507c3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gadfbc9ea9bf3aae896b79fa49fdc85c7f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gadfbc9ea9bf3aae896b79fa49fdc85c7f">GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER</a>   5</td></tr>
|
||||
<tr class="separator:gadfbc9ea9bf3aae896b79fa49fdc85c7f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gabc7c0264ce778835b516a472b47f6caf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gabc7c0264ce778835b516a472b47f6caf">GLFW_GAMEPAD_BUTTON_BACK</a>   6</td></tr>
|
||||
<tr class="separator:gabc7c0264ce778835b516a472b47f6caf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga04606949dd9139434b8a1bedf4ac1021"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga04606949dd9139434b8a1bedf4ac1021">GLFW_GAMEPAD_BUTTON_START</a>   7</td></tr>
|
||||
<tr class="separator:ga04606949dd9139434b8a1bedf4ac1021"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga7fa48c32e5b2f5db2f080aa0b8b573dc"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga7fa48c32e5b2f5db2f080aa0b8b573dc">GLFW_GAMEPAD_BUTTON_GUIDE</a>   8</td></tr>
|
||||
<tr class="separator:ga7fa48c32e5b2f5db2f080aa0b8b573dc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3e089787327454f7bfca7364d6ca206a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga3e089787327454f7bfca7364d6ca206a">GLFW_GAMEPAD_BUTTON_LEFT_THUMB</a>   9</td></tr>
|
||||
<tr class="separator:ga3e089787327454f7bfca7364d6ca206a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1c003f52b5aebb45272475b48953b21a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga1c003f52b5aebb45272475b48953b21a">GLFW_GAMEPAD_BUTTON_RIGHT_THUMB</a>   10</td></tr>
|
||||
<tr class="separator:ga1c003f52b5aebb45272475b48953b21a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga4f1ed6f974a47bc8930d4874a283476a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga4f1ed6f974a47bc8930d4874a283476a">GLFW_GAMEPAD_BUTTON_DPAD_UP</a>   11</td></tr>
|
||||
<tr class="separator:ga4f1ed6f974a47bc8930d4874a283476a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae2a780d2a8c79e0b77c0b7b601ca57c6"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gae2a780d2a8c79e0b77c0b7b601ca57c6">GLFW_GAMEPAD_BUTTON_DPAD_RIGHT</a>   12</td></tr>
|
||||
<tr class="separator:gae2a780d2a8c79e0b77c0b7b601ca57c6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga8f2b731b97d80f90f11967a83207665c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga8f2b731b97d80f90f11967a83207665c">GLFW_GAMEPAD_BUTTON_DPAD_DOWN</a>   13</td></tr>
|
||||
<tr class="separator:ga8f2b731b97d80f90f11967a83207665c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf0697e0e8607b2ebe1c93b0c6befe301"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a>   14</td></tr>
|
||||
<tr class="separator:gaf0697e0e8607b2ebe1c93b0c6befe301"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5cc98882f4f81dacf761639a567f61eb"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga5cc98882f4f81dacf761639a567f61eb">GLFW_GAMEPAD_BUTTON_LAST</a>   <a class="el" href="group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a></td></tr>
|
||||
<tr class="separator:ga5cc98882f4f81dacf761639a567f61eb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf08d0df26527c9305253422bd98ed63a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gaf08d0df26527c9305253422bd98ed63a">GLFW_GAMEPAD_BUTTON_CROSS</a>   <a class="el" href="group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810">GLFW_GAMEPAD_BUTTON_A</a></td></tr>
|
||||
<tr class="separator:gaf08d0df26527c9305253422bd98ed63a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaaef094b3dacbf15f272b274516839b82"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gaaef094b3dacbf15f272b274516839b82">GLFW_GAMEPAD_BUTTON_CIRCLE</a>   <a class="el" href="group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa">GLFW_GAMEPAD_BUTTON_B</a></td></tr>
|
||||
<tr class="separator:gaaef094b3dacbf15f272b274516839b82"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gafc7821e87d77d41ed2cd3e1f726ec35f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#gafc7821e87d77d41ed2cd3e1f726ec35f">GLFW_GAMEPAD_BUTTON_SQUARE</a>   <a class="el" href="group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c">GLFW_GAMEPAD_BUTTON_X</a></td></tr>
|
||||
<tr class="separator:gafc7821e87d77d41ed2cd3e1f726ec35f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3a7ef6bcb768a08cd3bf142f7f09f802"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__gamepad__buttons.html#ga3a7ef6bcb768a08cd3bf142f7f09f802">GLFW_GAMEPAD_BUTTON_TRIANGLE</a>   <a class="el" href="group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed">GLFW_GAMEPAD_BUTTON_Y</a></td></tr>
|
||||
<tr class="separator:ga3a7ef6bcb768a08cd3bf142f7f09f802"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="gae055a12fbf4b48b5954c8e1cd129b810" name="gae055a12fbf4b48b5954c8e1cd129b810"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gae055a12fbf4b48b5954c8e1cd129b810">◆ </a></span>GLFW_GAMEPAD_BUTTON_A</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_A   0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga2228a6512fd5950cdb51ba07846546fa" name="ga2228a6512fd5950cdb51ba07846546fa"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga2228a6512fd5950cdb51ba07846546fa">◆ </a></span>GLFW_GAMEPAD_BUTTON_B</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_B   1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga52cc94785cf3fe9a12e246539259887c" name="ga52cc94785cf3fe9a12e246539259887c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga52cc94785cf3fe9a12e246539259887c">◆ </a></span>GLFW_GAMEPAD_BUTTON_X</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_X   2</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gafc931248bda494b530cbe057f386a5ed" name="gafc931248bda494b530cbe057f386a5ed"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gafc931248bda494b530cbe057f386a5ed">◆ </a></span>GLFW_GAMEPAD_BUTTON_Y</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_Y   3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga17d67b4f39a39d6b813bd1567a3507c3" name="ga17d67b4f39a39d6b813bd1567a3507c3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga17d67b4f39a39d6b813bd1567a3507c3">◆ </a></span>GLFW_GAMEPAD_BUTTON_LEFT_BUMPER</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_LEFT_BUMPER   4</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gadfbc9ea9bf3aae896b79fa49fdc85c7f" name="gadfbc9ea9bf3aae896b79fa49fdc85c7f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gadfbc9ea9bf3aae896b79fa49fdc85c7f">◆ </a></span>GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER   5</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gabc7c0264ce778835b516a472b47f6caf" name="gabc7c0264ce778835b516a472b47f6caf"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gabc7c0264ce778835b516a472b47f6caf">◆ </a></span>GLFW_GAMEPAD_BUTTON_BACK</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_BACK   6</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga04606949dd9139434b8a1bedf4ac1021" name="ga04606949dd9139434b8a1bedf4ac1021"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga04606949dd9139434b8a1bedf4ac1021">◆ </a></span>GLFW_GAMEPAD_BUTTON_START</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_START   7</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga7fa48c32e5b2f5db2f080aa0b8b573dc" name="ga7fa48c32e5b2f5db2f080aa0b8b573dc"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga7fa48c32e5b2f5db2f080aa0b8b573dc">◆ </a></span>GLFW_GAMEPAD_BUTTON_GUIDE</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_GUIDE   8</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga3e089787327454f7bfca7364d6ca206a" name="ga3e089787327454f7bfca7364d6ca206a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga3e089787327454f7bfca7364d6ca206a">◆ </a></span>GLFW_GAMEPAD_BUTTON_LEFT_THUMB</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_LEFT_THUMB   9</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1c003f52b5aebb45272475b48953b21a" name="ga1c003f52b5aebb45272475b48953b21a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1c003f52b5aebb45272475b48953b21a">◆ </a></span>GLFW_GAMEPAD_BUTTON_RIGHT_THUMB</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_RIGHT_THUMB   10</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga4f1ed6f974a47bc8930d4874a283476a" name="ga4f1ed6f974a47bc8930d4874a283476a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga4f1ed6f974a47bc8930d4874a283476a">◆ </a></span>GLFW_GAMEPAD_BUTTON_DPAD_UP</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_DPAD_UP   11</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gae2a780d2a8c79e0b77c0b7b601ca57c6" name="gae2a780d2a8c79e0b77c0b7b601ca57c6"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gae2a780d2a8c79e0b77c0b7b601ca57c6">◆ </a></span>GLFW_GAMEPAD_BUTTON_DPAD_RIGHT</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_DPAD_RIGHT   12</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga8f2b731b97d80f90f11967a83207665c" name="ga8f2b731b97d80f90f11967a83207665c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga8f2b731b97d80f90f11967a83207665c">◆ </a></span>GLFW_GAMEPAD_BUTTON_DPAD_DOWN</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_DPAD_DOWN   13</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaf0697e0e8607b2ebe1c93b0c6befe301" name="gaf0697e0e8607b2ebe1c93b0c6befe301"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaf0697e0e8607b2ebe1c93b0c6befe301">◆ </a></span>GLFW_GAMEPAD_BUTTON_DPAD_LEFT</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_DPAD_LEFT   14</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga5cc98882f4f81dacf761639a567f61eb" name="ga5cc98882f4f81dacf761639a567f61eb"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga5cc98882f4f81dacf761639a567f61eb">◆ </a></span>GLFW_GAMEPAD_BUTTON_LAST</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_LAST   <a class="el" href="group__gamepad__buttons.html#gaf0697e0e8607b2ebe1c93b0c6befe301">GLFW_GAMEPAD_BUTTON_DPAD_LEFT</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaf08d0df26527c9305253422bd98ed63a" name="gaf08d0df26527c9305253422bd98ed63a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaf08d0df26527c9305253422bd98ed63a">◆ </a></span>GLFW_GAMEPAD_BUTTON_CROSS</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_CROSS   <a class="el" href="group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810">GLFW_GAMEPAD_BUTTON_A</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaaef094b3dacbf15f272b274516839b82" name="gaaef094b3dacbf15f272b274516839b82"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaaef094b3dacbf15f272b274516839b82">◆ </a></span>GLFW_GAMEPAD_BUTTON_CIRCLE</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_CIRCLE   <a class="el" href="group__gamepad__buttons.html#ga2228a6512fd5950cdb51ba07846546fa">GLFW_GAMEPAD_BUTTON_B</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gafc7821e87d77d41ed2cd3e1f726ec35f" name="gafc7821e87d77d41ed2cd3e1f726ec35f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gafc7821e87d77d41ed2cd3e1f726ec35f">◆ </a></span>GLFW_GAMEPAD_BUTTON_SQUARE</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_SQUARE   <a class="el" href="group__gamepad__buttons.html#ga52cc94785cf3fe9a12e246539259887c">GLFW_GAMEPAD_BUTTON_X</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga3a7ef6bcb768a08cd3bf142f7f09f802" name="ga3a7ef6bcb768a08cd3bf142f7f09f802"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga3a7ef6bcb768a08cd3bf142f7f09f802">◆ </a></span>GLFW_GAMEPAD_BUTTON_TRIANGLE</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_GAMEPAD_BUTTON_TRIANGLE   <a class="el" href="group__gamepad__buttons.html#gafc931248bda494b530cbe057f386a5ed">GLFW_GAMEPAD_BUTTON_Y</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
227
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__hat__state.html
vendored
Normal file
@ -0,0 +1,227 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Joystick hat states</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> </div>
|
||||
<div class="headertitle"><div class="title">Joystick hat states<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >See <a class="el" href="input_guide.html#joystick_hat">joystick hat input</a> for how these are used. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:gae2c0bcb7aec609e4736437554f6638fd"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#gae2c0bcb7aec609e4736437554f6638fd">GLFW_HAT_CENTERED</a>   0</td></tr>
|
||||
<tr class="separator:gae2c0bcb7aec609e4736437554f6638fd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga8c9720c76cd1b912738159ed74c85b36"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36">GLFW_HAT_UP</a>   1</td></tr>
|
||||
<tr class="separator:ga8c9720c76cd1b912738159ed74c85b36"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga252586e3bbde75f4b0e07ad3124867f5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a>   2</td></tr>
|
||||
<tr class="separator:ga252586e3bbde75f4b0e07ad3124867f5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad60d1fd0dc85c18f2642cbae96d3deff"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff">GLFW_HAT_DOWN</a>   4</td></tr>
|
||||
<tr class="separator:gad60d1fd0dc85c18f2642cbae96d3deff"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac775f4b3154fdf5db93eb432ba546dff"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff">GLFW_HAT_LEFT</a>   8</td></tr>
|
||||
<tr class="separator:gac775f4b3154fdf5db93eb432ba546dff"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga94aea0ae241a8b902883536c592ee693"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#ga94aea0ae241a8b902883536c592ee693">GLFW_HAT_RIGHT_UP</a>   (<a class="el" href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a> | <a class="el" href="group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36">GLFW_HAT_UP</a>)</td></tr>
|
||||
<tr class="separator:ga94aea0ae241a8b902883536c592ee693"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad7f0e4f52fd68d734863aaeadab3a3f5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#gad7f0e4f52fd68d734863aaeadab3a3f5">GLFW_HAT_RIGHT_DOWN</a>   (<a class="el" href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a> | <a class="el" href="group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff">GLFW_HAT_DOWN</a>)</td></tr>
|
||||
<tr class="separator:gad7f0e4f52fd68d734863aaeadab3a3f5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga638f0e20dc5de90de21a33564e8ce129"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#ga638f0e20dc5de90de21a33564e8ce129">GLFW_HAT_LEFT_UP</a>   (<a class="el" href="group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff">GLFW_HAT_LEFT</a> | <a class="el" href="group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36">GLFW_HAT_UP</a>)</td></tr>
|
||||
<tr class="separator:ga638f0e20dc5de90de21a33564e8ce129"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga76c02baf1ea345fcbe3e8ff176a73e19"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__hat__state.html#ga76c02baf1ea345fcbe3e8ff176a73e19">GLFW_HAT_LEFT_DOWN</a>   (<a class="el" href="group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff">GLFW_HAT_LEFT</a> | <a class="el" href="group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff">GLFW_HAT_DOWN</a>)</td></tr>
|
||||
<tr class="separator:ga76c02baf1ea345fcbe3e8ff176a73e19"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="gae2c0bcb7aec609e4736437554f6638fd" name="gae2c0bcb7aec609e4736437554f6638fd"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gae2c0bcb7aec609e4736437554f6638fd">◆ </a></span>GLFW_HAT_CENTERED</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_HAT_CENTERED   0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga8c9720c76cd1b912738159ed74c85b36" name="ga8c9720c76cd1b912738159ed74c85b36"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga8c9720c76cd1b912738159ed74c85b36">◆ </a></span>GLFW_HAT_UP</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_HAT_UP   1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga252586e3bbde75f4b0e07ad3124867f5" name="ga252586e3bbde75f4b0e07ad3124867f5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga252586e3bbde75f4b0e07ad3124867f5">◆ </a></span>GLFW_HAT_RIGHT</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_HAT_RIGHT   2</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad60d1fd0dc85c18f2642cbae96d3deff" name="gad60d1fd0dc85c18f2642cbae96d3deff"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad60d1fd0dc85c18f2642cbae96d3deff">◆ </a></span>GLFW_HAT_DOWN</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_HAT_DOWN   4</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gac775f4b3154fdf5db93eb432ba546dff" name="gac775f4b3154fdf5db93eb432ba546dff"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gac775f4b3154fdf5db93eb432ba546dff">◆ </a></span>GLFW_HAT_LEFT</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_HAT_LEFT   8</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga94aea0ae241a8b902883536c592ee693" name="ga94aea0ae241a8b902883536c592ee693"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga94aea0ae241a8b902883536c592ee693">◆ </a></span>GLFW_HAT_RIGHT_UP</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_HAT_RIGHT_UP   (<a class="el" href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a> | <a class="el" href="group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36">GLFW_HAT_UP</a>)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad7f0e4f52fd68d734863aaeadab3a3f5" name="gad7f0e4f52fd68d734863aaeadab3a3f5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad7f0e4f52fd68d734863aaeadab3a3f5">◆ </a></span>GLFW_HAT_RIGHT_DOWN</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_HAT_RIGHT_DOWN   (<a class="el" href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a> | <a class="el" href="group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff">GLFW_HAT_DOWN</a>)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga638f0e20dc5de90de21a33564e8ce129" name="ga638f0e20dc5de90de21a33564e8ce129"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga638f0e20dc5de90de21a33564e8ce129">◆ </a></span>GLFW_HAT_LEFT_UP</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_HAT_LEFT_UP   (<a class="el" href="group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff">GLFW_HAT_LEFT</a> | <a class="el" href="group__hat__state.html#ga8c9720c76cd1b912738159ed74c85b36">GLFW_HAT_UP</a>)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga76c02baf1ea345fcbe3e8ff176a73e19" name="ga76c02baf1ea345fcbe3e8ff176a73e19"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga76c02baf1ea345fcbe3e8ff176a73e19">◆ </a></span>GLFW_HAT_LEFT_DOWN</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_HAT_LEFT_DOWN   (<a class="el" href="group__hat__state.html#gac775f4b3154fdf5db93eb432ba546dff">GLFW_HAT_LEFT</a> | <a class="el" href="group__hat__state.html#gad60d1fd0dc85c18f2642cbae96d3deff">GLFW_HAT_DOWN</a>)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
545
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__init.html
vendored
Normal file
@ -0,0 +1,545 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Initialization, version and error reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#groups">Modules</a> |
|
||||
<a href="#define-members">Macros</a> |
|
||||
<a href="#typedef-members">Typedefs</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">Initialization, version and error reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >This is the reference documentation for initialization and termination of the library, version management and error handling. For more task-oriented information, see the <a class="el" href="intro_guide.html">Introduction to the API</a>. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="groups" name="groups"></a>
|
||||
Modules</h2></td></tr>
|
||||
<tr class="memitem:group__errors"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__errors.html">Error codes</a></td></tr>
|
||||
<tr class="memdesc:group__errors"><td class="mdescLeft"> </td><td class="mdescRight">Error codes. <br /></td></tr>
|
||||
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:ga2744fbb29b5631bb28802dbe0cf36eba"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba">GLFW_TRUE</a>   1</td></tr>
|
||||
<tr class="memdesc:ga2744fbb29b5631bb28802dbe0cf36eba"><td class="mdescLeft"> </td><td class="mdescRight">One. <a href="group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga2744fbb29b5631bb28802dbe0cf36eba"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac877fe3b627d21ef3a0a23e0a73ba8c5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a>   0</td></tr>
|
||||
<tr class="memdesc:gac877fe3b627d21ef3a0a23e0a73ba8c5"><td class="mdescLeft"> </td><td class="mdescRight">Zero. <a href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac877fe3b627d21ef3a0a23e0a73ba8c5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab9c0534709fda03ec8959201da3a9a18"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gab9c0534709fda03ec8959201da3a9a18">GLFW_JOYSTICK_HAT_BUTTONS</a>   0x00050001</td></tr>
|
||||
<tr class="memdesc:gab9c0534709fda03ec8959201da3a9a18"><td class="mdescLeft"> </td><td class="mdescRight">Joystick hat buttons init hint. <a href="group__init.html#gab9c0534709fda03ec8959201da3a9a18">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab9c0534709fda03ec8959201da3a9a18"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab937983147a3158d45f88fad7129d9f2"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gab937983147a3158d45f88fad7129d9f2">GLFW_COCOA_CHDIR_RESOURCES</a>   0x00051001</td></tr>
|
||||
<tr class="memdesc:gab937983147a3158d45f88fad7129d9f2"><td class="mdescLeft"> </td><td class="mdescRight">macOS specific init hint. <a href="group__init.html#gab937983147a3158d45f88fad7129d9f2">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab937983147a3158d45f88fad7129d9f2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga71e0b4ce2f2696a84a9b8c5e12dc70cf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf">GLFW_COCOA_MENUBAR</a>   0x00051002</td></tr>
|
||||
<tr class="memdesc:ga71e0b4ce2f2696a84a9b8c5e12dc70cf"><td class="mdescLeft"> </td><td class="mdescRight">macOS specific init hint. <a href="group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga71e0b4ce2f2696a84a9b8c5e12dc70cf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
<tr class="memitem:ga8184701785c096b3862a75cda1bf44a3"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga8184701785c096b3862a75cda1bf44a3">GLFWerrorfun</a>) (int error_code, const char *description)</td></tr>
|
||||
<tr class="memdesc:ga8184701785c096b3862a75cda1bf44a3"><td class="mdescLeft"> </td><td class="mdescRight">The function pointer type for error callbacks. <a href="group__init.html#ga8184701785c096b3862a75cda1bf44a3">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga8184701785c096b3862a75cda1bf44a3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga317aac130a235ab08c6db0834907d85e"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga317aac130a235ab08c6db0834907d85e"><td class="mdescLeft"> </td><td class="mdescRight">Initializes the GLFW library. <a href="group__init.html#ga317aac130a235ab08c6db0834907d85e">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga317aac130a235ab08c6db0834907d85e"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaaae48c0a18607ea4a4ba951d939f0901"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> (void)</td></tr>
|
||||
<tr class="memdesc:gaaae48c0a18607ea4a4ba951d939f0901"><td class="mdescLeft"> </td><td class="mdescRight">Terminates the GLFW library. <a href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaaae48c0a18607ea4a4ba951d939f0901"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga110fd1d3f0412822b4f1908c026f724a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga110fd1d3f0412822b4f1908c026f724a">glfwInitHint</a> (int hint, int value)</td></tr>
|
||||
<tr class="memdesc:ga110fd1d3f0412822b4f1908c026f724a"><td class="mdescLeft"> </td><td class="mdescRight">Sets the specified init hint to the desired value. <a href="group__init.html#ga110fd1d3f0412822b4f1908c026f724a">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga110fd1d3f0412822b4f1908c026f724a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga9f8ffaacf3c269cc48eafbf8b9b71197"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a> (int *major, int *minor, int *rev)</td></tr>
|
||||
<tr class="memdesc:ga9f8ffaacf3c269cc48eafbf8b9b71197"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the version of the GLFW library. <a href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga9f8ffaacf3c269cc48eafbf8b9b71197"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga026abd003c8e6501981ab1662062f1c0"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga026abd003c8e6501981ab1662062f1c0">glfwGetVersionString</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga026abd003c8e6501981ab1662062f1c0"><td class="mdescLeft"> </td><td class="mdescRight">Returns a string describing the compile-time configuration. <a href="group__init.html#ga026abd003c8e6501981ab1662062f1c0">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga026abd003c8e6501981ab1662062f1c0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga944986b4ec0b928d488141f92982aa18"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#ga944986b4ec0b928d488141f92982aa18">glfwGetError</a> (const char **description)</td></tr>
|
||||
<tr class="memdesc:ga944986b4ec0b928d488141f92982aa18"><td class="mdescLeft"> </td><td class="mdescRight">Returns and clears the last error for the calling thread. <a href="group__init.html#ga944986b4ec0b928d488141f92982aa18">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga944986b4ec0b928d488141f92982aa18"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaff45816610d53f0b83656092a4034f40"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__init.html#ga8184701785c096b3862a75cda1bf44a3">GLFWerrorfun</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__init.html#gaff45816610d53f0b83656092a4034f40">glfwSetErrorCallback</a> (<a class="el" href="group__init.html#ga8184701785c096b3862a75cda1bf44a3">GLFWerrorfun</a> callback)</td></tr>
|
||||
<tr class="memdesc:gaff45816610d53f0b83656092a4034f40"><td class="mdescLeft"> </td><td class="mdescRight">Sets the error callback. <a href="group__init.html#gaff45816610d53f0b83656092a4034f40">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaff45816610d53f0b83656092a4034f40"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="ga6337d9ea43b22fc529b2bba066b4a576" name="ga6337d9ea43b22fc529b2bba066b4a576"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga6337d9ea43b22fc529b2bba066b4a576">◆ </a></span>GLFW_VERSION_MAJOR</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_VERSION_MAJOR   3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >The major version number of the GLFW header. This is incremented when the API is changed in non-compatible ways. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaf80d40f0aea7088ff337606e9c48f7a3" name="gaf80d40f0aea7088ff337606e9c48f7a3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaf80d40f0aea7088ff337606e9c48f7a3">◆ </a></span>GLFW_VERSION_MINOR</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_VERSION_MINOR   3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >The minor version number of the GLFW header. This is incremented when features are added to the API but it remains backward-compatible. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gab72ae2e2035d9ea461abc3495eac0502" name="gab72ae2e2035d9ea461abc3495eac0502"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab72ae2e2035d9ea461abc3495eac0502">◆ </a></span>GLFW_VERSION_REVISION</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_VERSION_REVISION   8</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >The revision number of the GLFW header. This is incremented when a bug fix release is made that does not contain any API changes. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga2744fbb29b5631bb28802dbe0cf36eba" name="ga2744fbb29b5631bb28802dbe0cf36eba"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga2744fbb29b5631bb28802dbe0cf36eba">◆ </a></span>GLFW_TRUE</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_TRUE   1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This is only semantic sugar for the number 1. You can instead use <code>1</code> or <code>true</code> or <code>_True</code> or <code>GL_TRUE</code> or <code>VK_TRUE</code> or anything else that is equal to one. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gac877fe3b627d21ef3a0a23e0a73ba8c5" name="gac877fe3b627d21ef3a0a23e0a73ba8c5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gac877fe3b627d21ef3a0a23e0a73ba8c5">◆ </a></span>GLFW_FALSE</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_FALSE   0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This is only semantic sugar for the number 0. You can instead use <code>0</code> or <code>false</code> or <code>_False</code> or <code>GL_FALSE</code> or <code>VK_FALSE</code> or anything else that is equal to zero. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gab9c0534709fda03ec8959201da3a9a18" name="gab9c0534709fda03ec8959201da3a9a18"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab9c0534709fda03ec8959201da3a9a18">◆ </a></span>GLFW_JOYSTICK_HAT_BUTTONS</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_HAT_BUTTONS   0x00050001</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Joystick hat buttons <a class="el" href="intro_guide.html#GLFW_JOYSTICK_HAT_BUTTONS">init hint</a>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gab937983147a3158d45f88fad7129d9f2" name="gab937983147a3158d45f88fad7129d9f2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab937983147a3158d45f88fad7129d9f2">◆ </a></span>GLFW_COCOA_CHDIR_RESOURCES</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_COCOA_CHDIR_RESOURCES   0x00051001</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >macOS specific <a class="el" href="intro_guide.html#GLFW_COCOA_CHDIR_RESOURCES_hint">init hint</a>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga71e0b4ce2f2696a84a9b8c5e12dc70cf" name="ga71e0b4ce2f2696a84a9b8c5e12dc70cf"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga71e0b4ce2f2696a84a9b8c5e12dc70cf">◆ </a></span>GLFW_COCOA_MENUBAR</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_COCOA_MENUBAR   0x00051002</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >macOS specific <a class="el" href="intro_guide.html#GLFW_COCOA_MENUBAR_hint">init hint</a>. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Typedef Documentation</h2>
|
||||
<a id="ga8184701785c096b3862a75cda1bf44a3" name="ga8184701785c096b3862a75cda1bf44a3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga8184701785c096b3862a75cda1bf44a3">◆ </a></span>GLFWerrorfun</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">typedef void(* GLFWerrorfun) (int error_code, const char *description)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This is the function pointer type for error callbacks. An error callback function has the following signature: </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> callback_name(<span class="keywordtype">int</span> error_code, <span class="keyword">const</span> <span class="keywordtype">char</span>* description)</div>
|
||||
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">error_code</td><td>An <a class="el" href="group__errors.html">error code</a>. Future releases may add more error codes. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">description</td><td>A UTF-8 encoded string describing the error.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The error description string is valid until the callback function returns.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#error_handling">Error handling</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__init.html#gaff45816610d53f0b83656092a4034f40">glfwSetErrorCallback</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga317aac130a235ab08c6db0834907d85e" name="ga317aac130a235ab08c6db0834907d85e"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga317aac130a235ab08c6db0834907d85e">◆ </a></span>glfwInit()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int glfwInit </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function initializes the GLFW library. Before most GLFW functions can be used, GLFW must be initialized, and before an application terminates GLFW should be terminated in order to free any resources allocated during or after initialization.</p>
|
||||
<p >If this function fails, it calls <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> before returning. If it succeeds, you should call <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> before the application exits.</p>
|
||||
<p >Additional calls to this function after successful initialization but before termination will return <code>GLFW_TRUE</code> immediately.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd><b>macOS:</b> This function will change the current directory of the application to the <code>Contents/Resources</code> subdirectory of the application's bundle, if present. This can be disabled with the <a class="el" href="group__init.html#gab937983147a3158d45f88fad7129d9f2">GLFW_COCOA_CHDIR_RESOURCES</a> init hint.</dd>
|
||||
<dd>
|
||||
<b>X11:</b> This function will set the <code>LC_CTYPE</code> category of the application locale according to the current environment if that category is still "C". This is because the "C" locale breaks Unicode text input.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#intro_init">Initialization and termination</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaaae48c0a18607ea4a4ba951d939f0901" name="gaaae48c0a18607ea4a4ba951d939f0901"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaaae48c0a18607ea4a4ba951d939f0901">◆ </a></span>glfwTerminate()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwTerminate </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function destroys all remaining windows and cursors, restores any modified gamma ramps and frees any other allocated resources. Once this function is called, you must again call <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> successfully before you will be able to use most GLFW functions.</p>
|
||||
<p >If GLFW has been successfully initialized, this function should be called before the application exits. If initialization fails, there is no need to call this function, as it is called by <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> before it returns failure.</p>
|
||||
<p >This function has no effect if GLFW is not initialized.</p>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
|
||||
<dl class="section warning"><dt>Warning</dt><dd>The contexts of any remaining windows must not be current on any other thread when this function is called.</dd></dl>
|
||||
<dl class="section user"><dt>Reentrancy</dt><dd>This function must not be called from a callback.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#intro_init">Initialization and termination</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga110fd1d3f0412822b4f1908c026f724a" name="ga110fd1d3f0412822b4f1908c026f724a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga110fd1d3f0412822b4f1908c026f724a">◆ </a></span>glfwInitHint()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwInitHint </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>hint</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int </td>
|
||||
<td class="paramname"><em>value</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function sets hints for the next initialization of GLFW.</p>
|
||||
<p >The values you set hints to are never reset by GLFW, but they only take effect during initialization. Once GLFW has been initialized, any values you set will be ignored until the library is terminated and initialized again.</p>
|
||||
<p >Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or functions.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">hint</td><td>The <a class="el" href="intro_guide.html#init_hints">init hint</a> to set. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>The new value of the init hint.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga76f6bb9c4eea73db675f096b404593ce">GLFW_INVALID_ENUM</a> and <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd>init_hints </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e" title="Initializes the GLFW library.">glfwInit</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga9f8ffaacf3c269cc48eafbf8b9b71197" name="ga9f8ffaacf3c269cc48eafbf8b9b71197"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga9f8ffaacf3c269cc48eafbf8b9b71197">◆ </a></span>glfwGetVersion()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwGetVersion </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>major</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>minor</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>rev</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function retrieves the major, minor and revision numbers of the GLFW library. It is intended for when you are using GLFW as a shared library and want to ensure that you are using the minimum required version.</p>
|
||||
<p >Any or all of the version arguments may be <code>NULL</code>.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">major</td><td>Where to store the major version number, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">minor</td><td>Where to store the minor version number, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">rev</td><td>Where to store the revision number, or <code>NULL</code>.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>None.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#intro_version">Version management</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__init.html#ga026abd003c8e6501981ab1662062f1c0">glfwGetVersionString</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga026abd003c8e6501981ab1662062f1c0" name="ga026abd003c8e6501981ab1662062f1c0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga026abd003c8e6501981ab1662062f1c0">◆ </a></span>glfwGetVersionString()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const char * glfwGetVersionString </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns the compile-time generated <a class="el" href="intro_guide.html#intro_version_string">version string</a> of the GLFW library binary. It describes the version, platform, compiler and any platform-specific compile-time options. It should not be confused with the OpenGL or OpenGL ES version string, queried with <code>glGetString</code>.</p>
|
||||
<p ><b>Do not use the version string</b> to parse the GLFW library version. The <a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a> function provides the version of the running library binary in numerical format.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The ASCII encoded GLFW version string.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>None.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned string is static and compile-time generated.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#intro_version">Version management</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga944986b4ec0b928d488141f92982aa18" name="ga944986b4ec0b928d488141f92982aa18"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga944986b4ec0b928d488141f92982aa18">◆ </a></span>glfwGetError()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int glfwGetError </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const char ** </td>
|
||||
<td class="paramname"><em>description</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns and clears the <a class="el" href="group__errors.html">error code</a> of the last error that occurred on the calling thread, and optionally a UTF-8 encoded human-readable description of it. If no error has occurred since the last call, it returns <a class="el" href="group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4">GLFW_NO_ERROR</a> (zero) and the description pointer is set to <code>NULL</code>.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">description</td><td>Where to store the error description pointer, or <code>NULL</code>. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The last error code for the calling thread, or <a class="el" href="group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4">GLFW_NO_ERROR</a> (zero).</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>None.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the next error occurs or the library is terminated.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#error_handling">Error handling</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__init.html#gaff45816610d53f0b83656092a4034f40">glfwSetErrorCallback</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaff45816610d53f0b83656092a4034f40" name="gaff45816610d53f0b83656092a4034f40"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaff45816610d53f0b83656092a4034f40">◆ </a></span>glfwSetErrorCallback()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="group__init.html#ga8184701785c096b3862a75cda1bf44a3">GLFWerrorfun</a> glfwSetErrorCallback </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__init.html#ga8184701785c096b3862a75cda1bf44a3">GLFWerrorfun</a> </td>
|
||||
<td class="paramname"><em>callback</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function sets the error callback, which is called with an error code and a human-readable description each time a GLFW error occurs.</p>
|
||||
<p >The error code is set before the callback is called. Calling <a class="el" href="group__init.html#ga944986b4ec0b928d488141f92982aa18">glfwGetError</a> from the error callback will return the same value as the error code argument.</p>
|
||||
<p >The error callback is called on the thread where the error occurred. If you are using GLFW from multiple threads, your error callback needs to be written accordingly.</p>
|
||||
<p >Because the description string may have been generated specifically for that error, it is not guaranteed to be valid after the callback has returned. If you wish to use it after the callback returns, you need to make a copy.</p>
|
||||
<p >Once set, the error callback remains set even after the library has been terminated.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set.</dd></dl>
|
||||
<dl class="section user"><dt>Callback signature</dt><dd><div class="fragment"><div class="line"><span class="keywordtype">void</span> callback_name(<span class="keywordtype">int</span> error_code, <span class="keyword">const</span> <span class="keywordtype">char</span>* description)</div>
|
||||
</div><!-- fragment --> For more information about the callback parameters, see the <a class="el" href="group__init.html#ga8184701785c096b3862a75cda1bf44a3">callback pointer type</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>None.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>This function may be called before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="intro_guide.html#error_handling">Error handling</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__init.html#ga944986b4ec0b928d488141f92982aa18">glfwGetError</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
2228
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__input.html
vendored
Normal file
355
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__joysticks.html
vendored
Normal file
@ -0,0 +1,355 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Joysticks</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> </div>
|
||||
<div class="headertitle"><div class="title">Joysticks<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >See <a class="el" href="input_guide.html#joystick">joystick input</a> for how these are used. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:ga34a0443d059e9f22272cd4669073f73d"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga34a0443d059e9f22272cd4669073f73d">GLFW_JOYSTICK_1</a>   0</td></tr>
|
||||
<tr class="separator:ga34a0443d059e9f22272cd4669073f73d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6eab65ec88e65e0850ef8413504cb50c"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga6eab65ec88e65e0850ef8413504cb50c">GLFW_JOYSTICK_2</a>   1</td></tr>
|
||||
<tr class="separator:ga6eab65ec88e65e0850ef8413504cb50c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae6f3eedfeb42424c2f5e3161efb0b654"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#gae6f3eedfeb42424c2f5e3161efb0b654">GLFW_JOYSTICK_3</a>   2</td></tr>
|
||||
<tr class="separator:gae6f3eedfeb42424c2f5e3161efb0b654"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga97ddbcad02b7f48d74fad4ddb08fff59"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga97ddbcad02b7f48d74fad4ddb08fff59">GLFW_JOYSTICK_4</a>   3</td></tr>
|
||||
<tr class="separator:ga97ddbcad02b7f48d74fad4ddb08fff59"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae43281bc66d3fa5089fb50c3e7a28695"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#gae43281bc66d3fa5089fb50c3e7a28695">GLFW_JOYSTICK_5</a>   4</td></tr>
|
||||
<tr class="separator:gae43281bc66d3fa5089fb50c3e7a28695"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga74771620aa53bd68a487186dea66fd77"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga74771620aa53bd68a487186dea66fd77">GLFW_JOYSTICK_6</a>   5</td></tr>
|
||||
<tr class="separator:ga74771620aa53bd68a487186dea66fd77"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga20a9f4f3aaefed9ea5e66072fc588b87"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87">GLFW_JOYSTICK_7</a>   6</td></tr>
|
||||
<tr class="separator:ga20a9f4f3aaefed9ea5e66072fc588b87"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga21a934c940bcf25db0e4c8fe9b364bdb"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga21a934c940bcf25db0e4c8fe9b364bdb">GLFW_JOYSTICK_8</a>   7</td></tr>
|
||||
<tr class="separator:ga21a934c940bcf25db0e4c8fe9b364bdb"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga87689d47df0ba6f9f5fcbbcaf7b3cecf"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga87689d47df0ba6f9f5fcbbcaf7b3cecf">GLFW_JOYSTICK_9</a>   8</td></tr>
|
||||
<tr class="separator:ga87689d47df0ba6f9f5fcbbcaf7b3cecf"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaef55389ee605d6dfc31aef6fe98c54ec"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#gaef55389ee605d6dfc31aef6fe98c54ec">GLFW_JOYSTICK_10</a>   9</td></tr>
|
||||
<tr class="separator:gaef55389ee605d6dfc31aef6fe98c54ec"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae7d26e3df447c2c14a569fcc18516af4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#gae7d26e3df447c2c14a569fcc18516af4">GLFW_JOYSTICK_11</a>   10</td></tr>
|
||||
<tr class="separator:gae7d26e3df447c2c14a569fcc18516af4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab91bbf5b7ca6be8d3ac5c4d89ff48ac7"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#gab91bbf5b7ca6be8d3ac5c4d89ff48ac7">GLFW_JOYSTICK_12</a>   11</td></tr>
|
||||
<tr class="separator:gab91bbf5b7ca6be8d3ac5c4d89ff48ac7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5c84fb4e49bf661d7d7c78eb4018c508"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga5c84fb4e49bf661d7d7c78eb4018c508">GLFW_JOYSTICK_13</a>   12</td></tr>
|
||||
<tr class="separator:ga5c84fb4e49bf661d7d7c78eb4018c508"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga89540873278ae5a42b3e70d64164dc74"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga89540873278ae5a42b3e70d64164dc74">GLFW_JOYSTICK_14</a>   13</td></tr>
|
||||
<tr class="separator:ga89540873278ae5a42b3e70d64164dc74"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga7b02ab70daf7a78bcc942d5d4cc1dcf9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga7b02ab70daf7a78bcc942d5d4cc1dcf9">GLFW_JOYSTICK_15</a>   14</td></tr>
|
||||
<tr class="separator:ga7b02ab70daf7a78bcc942d5d4cc1dcf9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga453edeeabf350827646b6857df4f80ce"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga453edeeabf350827646b6857df4f80ce">GLFW_JOYSTICK_16</a>   15</td></tr>
|
||||
<tr class="separator:ga453edeeabf350827646b6857df4f80ce"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga9ca13ebf24c331dd98df17d84a4b72c9"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__joysticks.html#ga9ca13ebf24c331dd98df17d84a4b72c9">GLFW_JOYSTICK_LAST</a>   <a class="el" href="group__joysticks.html#ga453edeeabf350827646b6857df4f80ce">GLFW_JOYSTICK_16</a></td></tr>
|
||||
<tr class="separator:ga9ca13ebf24c331dd98df17d84a4b72c9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="ga34a0443d059e9f22272cd4669073f73d" name="ga34a0443d059e9f22272cd4669073f73d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga34a0443d059e9f22272cd4669073f73d">◆ </a></span>GLFW_JOYSTICK_1</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_1   0</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga6eab65ec88e65e0850ef8413504cb50c" name="ga6eab65ec88e65e0850ef8413504cb50c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga6eab65ec88e65e0850ef8413504cb50c">◆ </a></span>GLFW_JOYSTICK_2</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_2   1</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gae6f3eedfeb42424c2f5e3161efb0b654" name="gae6f3eedfeb42424c2f5e3161efb0b654"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gae6f3eedfeb42424c2f5e3161efb0b654">◆ </a></span>GLFW_JOYSTICK_3</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_3   2</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga97ddbcad02b7f48d74fad4ddb08fff59" name="ga97ddbcad02b7f48d74fad4ddb08fff59"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga97ddbcad02b7f48d74fad4ddb08fff59">◆ </a></span>GLFW_JOYSTICK_4</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_4   3</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gae43281bc66d3fa5089fb50c3e7a28695" name="gae43281bc66d3fa5089fb50c3e7a28695"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gae43281bc66d3fa5089fb50c3e7a28695">◆ </a></span>GLFW_JOYSTICK_5</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_5   4</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga74771620aa53bd68a487186dea66fd77" name="ga74771620aa53bd68a487186dea66fd77"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga74771620aa53bd68a487186dea66fd77">◆ </a></span>GLFW_JOYSTICK_6</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_6   5</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga20a9f4f3aaefed9ea5e66072fc588b87" name="ga20a9f4f3aaefed9ea5e66072fc588b87"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga20a9f4f3aaefed9ea5e66072fc588b87">◆ </a></span>GLFW_JOYSTICK_7</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_7   6</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga21a934c940bcf25db0e4c8fe9b364bdb" name="ga21a934c940bcf25db0e4c8fe9b364bdb"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga21a934c940bcf25db0e4c8fe9b364bdb">◆ </a></span>GLFW_JOYSTICK_8</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_8   7</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga87689d47df0ba6f9f5fcbbcaf7b3cecf" name="ga87689d47df0ba6f9f5fcbbcaf7b3cecf"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga87689d47df0ba6f9f5fcbbcaf7b3cecf">◆ </a></span>GLFW_JOYSTICK_9</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_9   8</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaef55389ee605d6dfc31aef6fe98c54ec" name="gaef55389ee605d6dfc31aef6fe98c54ec"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaef55389ee605d6dfc31aef6fe98c54ec">◆ </a></span>GLFW_JOYSTICK_10</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_10   9</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gae7d26e3df447c2c14a569fcc18516af4" name="gae7d26e3df447c2c14a569fcc18516af4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gae7d26e3df447c2c14a569fcc18516af4">◆ </a></span>GLFW_JOYSTICK_11</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_11   10</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gab91bbf5b7ca6be8d3ac5c4d89ff48ac7" name="gab91bbf5b7ca6be8d3ac5c4d89ff48ac7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab91bbf5b7ca6be8d3ac5c4d89ff48ac7">◆ </a></span>GLFW_JOYSTICK_12</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_12   11</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga5c84fb4e49bf661d7d7c78eb4018c508" name="ga5c84fb4e49bf661d7d7c78eb4018c508"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga5c84fb4e49bf661d7d7c78eb4018c508">◆ </a></span>GLFW_JOYSTICK_13</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_13   12</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga89540873278ae5a42b3e70d64164dc74" name="ga89540873278ae5a42b3e70d64164dc74"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga89540873278ae5a42b3e70d64164dc74">◆ </a></span>GLFW_JOYSTICK_14</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_14   13</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga7b02ab70daf7a78bcc942d5d4cc1dcf9" name="ga7b02ab70daf7a78bcc942d5d4cc1dcf9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga7b02ab70daf7a78bcc942d5d4cc1dcf9">◆ </a></span>GLFW_JOYSTICK_15</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_15   14</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga453edeeabf350827646b6857df4f80ce" name="ga453edeeabf350827646b6857df4f80ce"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga453edeeabf350827646b6857df4f80ce">◆ </a></span>GLFW_JOYSTICK_16</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_16   15</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga9ca13ebf24c331dd98df17d84a4b72c9" name="ga9ca13ebf24c331dd98df17d84a4b72c9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga9ca13ebf24c331dd98df17d84a4b72c9">◆ </a></span>GLFW_JOYSTICK_LAST</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_JOYSTICK_LAST   <a class="el" href="group__joysticks.html#ga453edeeabf350827646b6857df4f80ce">GLFW_JOYSTICK_16</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
2043
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__keys.html
vendored
Normal file
191
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__mods.html
vendored
Normal file
@ -0,0 +1,191 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Modifier key flags</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> </div>
|
||||
<div class="headertitle"><div class="title">Modifier key flags<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >See <a class="el" href="input_guide.html#input_key">key input</a> for how these are used. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:ga14994d3196c290aaa347248e51740274"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#ga14994d3196c290aaa347248e51740274">GLFW_MOD_SHIFT</a>   0x0001</td></tr>
|
||||
<tr class="memdesc:ga14994d3196c290aaa347248e51740274"><td class="mdescLeft"> </td><td class="mdescRight">If this bit is set one or more Shift keys were held down. <a href="group__mods.html#ga14994d3196c290aaa347248e51740274">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga14994d3196c290aaa347248e51740274"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6ed94871c3208eefd85713fa929d45aa"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#ga6ed94871c3208eefd85713fa929d45aa">GLFW_MOD_CONTROL</a>   0x0002</td></tr>
|
||||
<tr class="memdesc:ga6ed94871c3208eefd85713fa929d45aa"><td class="mdescLeft"> </td><td class="mdescRight">If this bit is set one or more Control keys were held down. <a href="group__mods.html#ga6ed94871c3208eefd85713fa929d45aa">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga6ed94871c3208eefd85713fa929d45aa"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad2acd5633463c29e07008687ea73c0f4"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#gad2acd5633463c29e07008687ea73c0f4">GLFW_MOD_ALT</a>   0x0004</td></tr>
|
||||
<tr class="memdesc:gad2acd5633463c29e07008687ea73c0f4"><td class="mdescLeft"> </td><td class="mdescRight">If this bit is set one or more Alt keys were held down. <a href="group__mods.html#gad2acd5633463c29e07008687ea73c0f4">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad2acd5633463c29e07008687ea73c0f4"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6b64ba10ea0227cf6f42efd0a220aba1"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#ga6b64ba10ea0227cf6f42efd0a220aba1">GLFW_MOD_SUPER</a>   0x0008</td></tr>
|
||||
<tr class="memdesc:ga6b64ba10ea0227cf6f42efd0a220aba1"><td class="mdescLeft"> </td><td class="mdescRight">If this bit is set one or more Super keys were held down. <a href="group__mods.html#ga6b64ba10ea0227cf6f42efd0a220aba1">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga6b64ba10ea0227cf6f42efd0a220aba1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaefeef8fcf825a6e43e241b337897200f"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#gaefeef8fcf825a6e43e241b337897200f">GLFW_MOD_CAPS_LOCK</a>   0x0010</td></tr>
|
||||
<tr class="memdesc:gaefeef8fcf825a6e43e241b337897200f"><td class="mdescLeft"> </td><td class="mdescRight">If this bit is set the Caps Lock key is enabled. <a href="group__mods.html#gaefeef8fcf825a6e43e241b337897200f">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaefeef8fcf825a6e43e241b337897200f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga64e020b8a42af8376e944baf61feecbe"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__mods.html#ga64e020b8a42af8376e944baf61feecbe">GLFW_MOD_NUM_LOCK</a>   0x0020</td></tr>
|
||||
<tr class="memdesc:ga64e020b8a42af8376e944baf61feecbe"><td class="mdescLeft"> </td><td class="mdescRight">If this bit is set the Num Lock key is enabled. <a href="group__mods.html#ga64e020b8a42af8376e944baf61feecbe">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga64e020b8a42af8376e944baf61feecbe"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="ga14994d3196c290aaa347248e51740274" name="ga14994d3196c290aaa347248e51740274"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga14994d3196c290aaa347248e51740274">◆ </a></span>GLFW_MOD_SHIFT</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOD_SHIFT   0x0001</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >If this bit is set one or more Shift keys were held down. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga6ed94871c3208eefd85713fa929d45aa" name="ga6ed94871c3208eefd85713fa929d45aa"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga6ed94871c3208eefd85713fa929d45aa">◆ </a></span>GLFW_MOD_CONTROL</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOD_CONTROL   0x0002</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >If this bit is set one or more Control keys were held down. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad2acd5633463c29e07008687ea73c0f4" name="gad2acd5633463c29e07008687ea73c0f4"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad2acd5633463c29e07008687ea73c0f4">◆ </a></span>GLFW_MOD_ALT</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOD_ALT   0x0004</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >If this bit is set one or more Alt keys were held down. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga6b64ba10ea0227cf6f42efd0a220aba1" name="ga6b64ba10ea0227cf6f42efd0a220aba1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga6b64ba10ea0227cf6f42efd0a220aba1">◆ </a></span>GLFW_MOD_SUPER</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOD_SUPER   0x0008</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >If this bit is set one or more Super keys were held down. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaefeef8fcf825a6e43e241b337897200f" name="gaefeef8fcf825a6e43e241b337897200f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaefeef8fcf825a6e43e241b337897200f">◆ </a></span>GLFW_MOD_CAPS_LOCK</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOD_CAPS_LOCK   0x0010</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >If this bit is set the Caps Lock key is enabled and the <a class="el" href="input_guide.html#GLFW_LOCK_KEY_MODS">GLFW_LOCK_KEY_MODS</a> input mode is set. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga64e020b8a42af8376e944baf61feecbe" name="ga64e020b8a42af8376e944baf61feecbe"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga64e020b8a42af8376e944baf61feecbe">◆ </a></span>GLFW_MOD_NUM_LOCK</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_MOD_NUM_LOCK   0x0020</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >If this bit is set the Num Lock key is enabled and the <a class="el" href="input_guide.html#GLFW_LOCK_KEY_MODS">GLFW_LOCK_KEY_MODS</a> input mode is set. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
841
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__monitor.html
vendored
Normal file
@ -0,0 +1,841 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Monitor reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#typedef-members">Typedefs</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">Monitor reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >This is the reference documentation for monitor related functions and types. For more task-oriented information, see the <a class="el" href="monitor_guide.html">Monitor guide</a>. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
<tr class="memitem:ga8d9efd1cde9426692c73fe40437d0ae3"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></td></tr>
|
||||
<tr class="memdesc:ga8d9efd1cde9426692c73fe40437d0ae3"><td class="mdescLeft"> </td><td class="mdescRight">Opaque monitor object. <a href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga8d9efd1cde9426692c73fe40437d0ae3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaabe16caca8dea952504dfdebdf4cd249"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">GLFWmonitorfun</a>) (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int event)</td></tr>
|
||||
<tr class="memdesc:gaabe16caca8dea952504dfdebdf4cd249"><td class="mdescLeft"> </td><td class="mdescRight">The function pointer type for monitor configuration callbacks. <a href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaabe16caca8dea952504dfdebdf4cd249"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga902c2816ac9b34b757282daab59b2565"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga902c2816ac9b34b757282daab59b2565">GLFWvidmode</a></td></tr>
|
||||
<tr class="memdesc:ga902c2816ac9b34b757282daab59b2565"><td class="mdescLeft"> </td><td class="mdescRight">Video mode type. <a href="group__monitor.html#ga902c2816ac9b34b757282daab59b2565">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga902c2816ac9b34b757282daab59b2565"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga939cf093cb0af0498b7b54dc2e181404"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga939cf093cb0af0498b7b54dc2e181404">GLFWgammaramp</a></td></tr>
|
||||
<tr class="memdesc:ga939cf093cb0af0498b7b54dc2e181404"><td class="mdescLeft"> </td><td class="mdescRight">Gamma ramp. <a href="group__monitor.html#ga939cf093cb0af0498b7b54dc2e181404">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga939cf093cb0af0498b7b54dc2e181404"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga70b1156d5d24e9928f145d6c864369d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> ** </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga70b1156d5d24e9928f145d6c864369d2">glfwGetMonitors</a> (int *count)</td></tr>
|
||||
<tr class="memdesc:ga70b1156d5d24e9928f145d6c864369d2"><td class="mdescLeft"> </td><td class="mdescRight">Returns the currently connected monitors. <a href="group__monitor.html#ga70b1156d5d24e9928f145d6c864369d2">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga70b1156d5d24e9928f145d6c864369d2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac3adb24947eb709e1874028272e5dfc5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gac3adb24947eb709e1874028272e5dfc5">glfwGetPrimaryMonitor</a> (void)</td></tr>
|
||||
<tr class="memdesc:gac3adb24947eb709e1874028272e5dfc5"><td class="mdescLeft"> </td><td class="mdescRight">Returns the primary monitor. <a href="group__monitor.html#gac3adb24947eb709e1874028272e5dfc5">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac3adb24947eb709e1874028272e5dfc5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga102f54e7acc9149edbcf0997152df8c9"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9">glfwGetMonitorPos</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *xpos, int *ypos)</td></tr>
|
||||
<tr class="memdesc:ga102f54e7acc9149edbcf0997152df8c9"><td class="mdescLeft"> </td><td class="mdescRight">Returns the position of the monitor's viewport on the virtual screen. <a href="group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga102f54e7acc9149edbcf0997152df8c9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0">glfwGetMonitorWorkarea</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *xpos, int *ypos, int *width, int *height)</td></tr>
|
||||
<tr class="memdesc:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the work area of the monitor. <a href="group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga7d8bffc6c55539286a6bd20d32a8d7ea"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea">glfwGetMonitorPhysicalSize</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *widthMM, int *heightMM)</td></tr>
|
||||
<tr class="memdesc:ga7d8bffc6c55539286a6bd20d32a8d7ea"><td class="mdescLeft"> </td><td class="mdescRight">Returns the physical size of the monitor. <a href="group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga7d8bffc6c55539286a6bd20d32a8d7ea"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad3152e84465fa620b601265ebfcdb21b"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gad3152e84465fa620b601265ebfcdb21b">glfwGetMonitorContentScale</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, float *xscale, float *yscale)</td></tr>
|
||||
<tr class="memdesc:gad3152e84465fa620b601265ebfcdb21b"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the content scale for the specified monitor. <a href="group__monitor.html#gad3152e84465fa620b601265ebfcdb21b">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad3152e84465fa620b601265ebfcdb21b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga7af83e13489d90379588fb331b9e4b68"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga7af83e13489d90379588fb331b9e4b68">glfwGetMonitorName</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:ga7af83e13489d90379588fb331b9e4b68"><td class="mdescLeft"> </td><td class="mdescRight">Returns the name of the specified monitor. <a href="group__monitor.html#ga7af83e13489d90379588fb331b9e4b68">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga7af83e13489d90379588fb331b9e4b68"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga702750e24313a686d3637297b6e85fda"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga702750e24313a686d3637297b6e85fda">glfwSetMonitorUserPointer</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, void *pointer)</td></tr>
|
||||
<tr class="memdesc:ga702750e24313a686d3637297b6e85fda"><td class="mdescLeft"> </td><td class="mdescRight">Sets the user pointer of the specified monitor. <a href="group__monitor.html#ga702750e24313a686d3637297b6e85fda">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga702750e24313a686d3637297b6e85fda"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1adbfbfb8cd58b23cfee82e574fbbdc5"><td class="memItemLeft" align="right" valign="top">void * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga1adbfbfb8cd58b23cfee82e574fbbdc5">glfwGetMonitorUserPointer</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:ga1adbfbfb8cd58b23cfee82e574fbbdc5"><td class="mdescLeft"> </td><td class="mdescRight">Returns the user pointer of the specified monitor. <a href="group__monitor.html#ga1adbfbfb8cd58b23cfee82e574fbbdc5">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1adbfbfb8cd58b23cfee82e574fbbdc5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab39df645587c8518192aa746c2fb06c3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">GLFWmonitorfun</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gab39df645587c8518192aa746c2fb06c3">glfwSetMonitorCallback</a> (<a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">GLFWmonitorfun</a> callback)</td></tr>
|
||||
<tr class="memdesc:gab39df645587c8518192aa746c2fb06c3"><td class="mdescLeft"> </td><td class="mdescRight">Sets the monitor configuration callback. <a href="group__monitor.html#gab39df645587c8518192aa746c2fb06c3">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab39df645587c8518192aa746c2fb06c3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gad2e24d2843cb7d6c26202cddd530fc1b"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gad2e24d2843cb7d6c26202cddd530fc1b">glfwGetVideoModes</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int *count)</td></tr>
|
||||
<tr class="memdesc:gad2e24d2843cb7d6c26202cddd530fc1b"><td class="mdescLeft"> </td><td class="mdescRight">Returns the available video modes for the specified monitor. <a href="group__monitor.html#gad2e24d2843cb7d6c26202cddd530fc1b">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad2e24d2843cb7d6c26202cddd530fc1b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaba376fa7e76634b4788bddc505d6c9d5"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:gaba376fa7e76634b4788bddc505d6c9d5"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current mode of the specified monitor. <a href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaba376fa7e76634b4788bddc505d6c9d5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6ac582625c990220785ddd34efa3169a"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga6ac582625c990220785ddd34efa3169a">glfwSetGamma</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, float gamma)</td></tr>
|
||||
<tr class="memdesc:ga6ac582625c990220785ddd34efa3169a"><td class="mdescLeft"> </td><td class="mdescRight">Generates a gamma ramp and sets it for the specified monitor. <a href="group__monitor.html#ga6ac582625c990220785ddd34efa3169a">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga6ac582625c990220785ddd34efa3169a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga76ba90debcf0062b5c4b73052b24f96f"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga76ba90debcf0062b5c4b73052b24f96f">glfwGetGammaRamp</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:ga76ba90debcf0062b5c4b73052b24f96f"><td class="mdescLeft"> </td><td class="mdescRight">Returns the current gamma ramp for the specified monitor. <a href="group__monitor.html#ga76ba90debcf0062b5c4b73052b24f96f">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga76ba90debcf0062b5c4b73052b24f96f"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga583f0ffd0d29613d8cd172b996bbf0dd"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, const <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> *ramp)</td></tr>
|
||||
<tr class="memdesc:ga583f0ffd0d29613d8cd172b996bbf0dd"><td class="mdescLeft"> </td><td class="mdescRight">Sets the current gamma ramp for the specified monitor. <a href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga583f0ffd0d29613d8cd172b996bbf0dd"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Typedef Documentation</h2>
|
||||
<a id="ga8d9efd1cde9426692c73fe40437d0ae3" name="ga8d9efd1cde9426692c73fe40437d0ae3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga8d9efd1cde9426692c73fe40437d0ae3">◆ </a></span>GLFWmonitor</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">typedef struct <a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> <a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Opaque monitor object.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_object">Monitor objects</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaabe16caca8dea952504dfdebdf4cd249" name="gaabe16caca8dea952504dfdebdf4cd249"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaabe16caca8dea952504dfdebdf4cd249">◆ </a></span>GLFWmonitorfun</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">typedef void(* GLFWmonitorfun) (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor, int event)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This is the function pointer type for monitor configuration callbacks. A monitor callback function has the following signature: </p><div class="fragment"><div class="line"><span class="keywordtype">void</span> function_name(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor, <span class="keywordtype">int</span> event)</div>
|
||||
<div class="ttc" id="agroup__monitor_html_ga8d9efd1cde9426692c73fe40437d0ae3"><div class="ttname"><a href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></div><div class="ttdeci">struct GLFWmonitor GLFWmonitor</div><div class="ttdoc">Opaque monitor object.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1173</div></div>
|
||||
</div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor that was connected or disconnected. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>One of <code>GLFW_CONNECTED</code> or <code>GLFW_DISCONNECTED</code>. Future releases may add more events.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_event">Monitor configuration changes</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__monitor.html#gab39df645587c8518192aa746c2fb06c3">glfwSetMonitorCallback</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga902c2816ac9b34b757282daab59b2565" name="ga902c2816ac9b34b757282daab59b2565"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga902c2816ac9b34b757282daab59b2565">◆ </a></span>GLFWvidmode</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">typedef struct <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a> <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This describes a single video mode.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_modes">Video modes</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__monitor.html#gad2e24d2843cb7d6c26202cddd530fc1b">glfwGetVideoModes</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Added refresh rate member. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga939cf093cb0af0498b7b54dc2e181404" name="ga939cf093cb0af0498b7b54dc2e181404"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga939cf093cb0af0498b7b54dc2e181404">◆ </a></span>GLFWgammaramp</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">typedef struct <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This describes the gamma ramp for a monitor.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_gamma">Gamma ramp</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__monitor.html#ga76ba90debcf0062b5c4b73052b24f96f">glfwGetGammaRamp</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga70b1156d5d24e9928f145d6c864369d2" name="ga70b1156d5d24e9928f145d6c864369d2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga70b1156d5d24e9928f145d6c864369d2">◆ </a></span>glfwGetMonitors()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> ** glfwGetMonitors </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>count</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns an array of handles for all currently connected monitors. The primary monitor is always first in the returned array. If no monitors were found, this function returns <code>NULL</code>.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">count</td><td>Where to store the number of monitors in the returned array. This is set to zero if an error occurred. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>An array of monitor handles, or <code>NULL</code> if no monitors were found or if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the monitor configuration changes or the library is terminated.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_monitors">Retrieving monitors</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="monitor_guide.html#monitor_event">Monitor configuration changes</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__monitor.html#gac3adb24947eb709e1874028272e5dfc5">glfwGetPrimaryMonitor</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gac3adb24947eb709e1874028272e5dfc5" name="gac3adb24947eb709e1874028272e5dfc5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gac3adb24947eb709e1874028272e5dfc5">◆ </a></span>glfwGetPrimaryMonitor()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * glfwGetPrimaryMonitor </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns the primary monitor. This is usually the monitor where elements like the task bar or global menu bar are located.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The primary monitor, or <code>NULL</code> if no monitors were found or if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>The primary monitor is always first in the array returned by <a class="el" href="group__monitor.html#ga70b1156d5d24e9928f145d6c864369d2">glfwGetMonitors</a>.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_monitors">Retrieving monitors</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__monitor.html#ga70b1156d5d24e9928f145d6c864369d2">glfwGetMonitors</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga102f54e7acc9149edbcf0997152df8c9" name="ga102f54e7acc9149edbcf0997152df8c9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga102f54e7acc9149edbcf0997152df8c9">◆ </a></span>glfwGetMonitorPos()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwGetMonitorPos </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>xpos</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>ypos</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns the position, in screen coordinates, of the upper-left corner of the specified monitor.</p>
|
||||
<p >Any or all of the position arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position arguments will be set to zero.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">xpos</td><td>Where to store the monitor x-coordinate, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">ypos</td><td>Where to store the monitor y-coordinate, or <code>NULL</code>.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_properties">Monitor properties</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0" name="ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0">◆ </a></span>glfwGetMonitorWorkarea()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwGetMonitorWorkarea </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>xpos</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>ypos</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>width</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>height</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns the position, in screen coordinates, of the upper-left corner of the work area of the specified monitor along with the work area size in screen coordinates. The work area is defined as the area of the monitor not occluded by the operating system task bar where present. If no task bar exists then the work area is the monitor resolution in screen coordinates.</p>
|
||||
<p >Any or all of the position and size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> position and size arguments will be set to zero.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">xpos</td><td>Where to store the monitor x-coordinate, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">ypos</td><td>Where to store the monitor y-coordinate, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">width</td><td>Where to store the monitor width, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">height</td><td>Where to store the monitor height, or <code>NULL</code>.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_workarea">Work area</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga7d8bffc6c55539286a6bd20d32a8d7ea" name="ga7d8bffc6c55539286a6bd20d32a8d7ea"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga7d8bffc6c55539286a6bd20d32a8d7ea">◆ </a></span>glfwGetMonitorPhysicalSize()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwGetMonitorPhysicalSize </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>widthMM</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>heightMM</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns the size, in millimetres, of the display area of the specified monitor.</p>
|
||||
<p >Some systems do not provide accurate monitor size information, either because the monitor <a href="https://en.wikipedia.org/wiki/Extended_display_identification_data">EDID</a> data is incorrect or because the driver does not report it accurately.</p>
|
||||
<p >Any or all of the size arguments may be <code>NULL</code>. If an error occurs, all non-<code>NULL</code> size arguments will be set to zero.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">widthMM</td><td>Where to store the width, in millimetres, of the monitor's display area, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">heightMM</td><td>Where to store the height, in millimetres, of the monitor's display area, or <code>NULL</code>.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd><b>Windows:</b> On Windows 8 and earlier the physical size is calculated from the current resolution and system DPI instead of querying the monitor EDID data.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_properties">Monitor properties</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad3152e84465fa620b601265ebfcdb21b" name="gad3152e84465fa620b601265ebfcdb21b"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad3152e84465fa620b601265ebfcdb21b">◆ </a></span>glfwGetMonitorContentScale()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwGetMonitorContentScale </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">float * </td>
|
||||
<td class="paramname"><em>xscale</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">float * </td>
|
||||
<td class="paramname"><em>yscale</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function retrieves the content scale for the specified monitor. The content scale is the ratio between the current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling settings being somewhat correct.</p>
|
||||
<p >The content scale may depend on both the monitor resolution and pixel density and on user settings. It may be very different from the raw DPI calculated from the physical size and current resolution.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">xscale</td><td>Where to store the x-axis content scale, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">yscale</td><td>Where to store the y-axis content scale, or <code>NULL</code>.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_scale">Content scale</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__window.html#gaf5d31de9c19c4f994facea64d2b3106c">glfwGetWindowContentScale</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga7af83e13489d90379588fb331b9e4b68" name="ga7af83e13489d90379588fb331b9e4b68"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga7af83e13489d90379588fb331b9e4b68">◆ </a></span>glfwGetMonitorName()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const char * glfwGetMonitorName </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns a human-readable name, encoded as UTF-8, of the specified monitor. The name typically reflects the make and model of the monitor and is not guaranteed to be unique among the connected monitors.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The UTF-8 encoded name of the monitor, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_properties">Monitor properties</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga702750e24313a686d3637297b6e85fda" name="ga702750e24313a686d3637297b6e85fda"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga702750e24313a686d3637297b6e85fda">◆ </a></span>glfwSetMonitorUserPointer()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwSetMonitorUserPointer </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">void * </td>
|
||||
<td class="paramname"><em>pointer</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function sets the user-defined pointer of the specified monitor. The current value is retained until the monitor is disconnected. The initial value is <code>NULL</code>.</p>
|
||||
<p >This function may be called from the monitor callback, even for a monitor that is being disconnected.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor whose pointer to set. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">pointer</td><td>The new value.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_userptr">User pointer</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__monitor.html#ga1adbfbfb8cd58b23cfee82e574fbbdc5">glfwGetMonitorUserPointer</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1adbfbfb8cd58b23cfee82e574fbbdc5" name="ga1adbfbfb8cd58b23cfee82e574fbbdc5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1adbfbfb8cd58b23cfee82e574fbbdc5">◆ </a></span>glfwGetMonitorUserPointer()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void * glfwGetMonitorUserPointer </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns the current value of the user-defined pointer of the specified monitor. The initial value is <code>NULL</code>.</p>
|
||||
<p >This function may be called from the monitor callback, even for a monitor that is being disconnected.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor whose pointer to return.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_userptr">User pointer</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__monitor.html#ga702750e24313a686d3637297b6e85fda">glfwSetMonitorUserPointer</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gab39df645587c8518192aa746c2fb06c3" name="gab39df645587c8518192aa746c2fb06c3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab39df645587c8518192aa746c2fb06c3">◆ </a></span>glfwSetMonitorCallback()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">GLFWmonitorfun</a> glfwSetMonitorCallback </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">GLFWmonitorfun</a> </td>
|
||||
<td class="paramname"><em>callback</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function sets the monitor configuration callback, or removes the currently set callback. This is called when a monitor is connected to or disconnected from the system.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">callback</td><td>The new callback, or <code>NULL</code> to remove the currently set callback. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The previously set callback, or <code>NULL</code> if no callback was set or the library had not been <a class="el" href="intro_guide.html#intro_init">initialized</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Callback signature</dt><dd><div class="fragment"><div class="line"><span class="keywordtype">void</span> function_name(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor, <span class="keywordtype">int</span> event)</div>
|
||||
</div><!-- fragment --> For more information about the callback parameters, see the <a class="el" href="group__monitor.html#gaabe16caca8dea952504dfdebdf4cd249">function pointer type</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_event">Monitor configuration changes</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gad2e24d2843cb7d6c26202cddd530fc1b" name="gad2e24d2843cb7d6c26202cddd530fc1b"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad2e24d2843cb7d6c26202cddd530fc1b">◆ </a></span>glfwGetVideoModes()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a> * glfwGetVideoModes </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>count</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns an array of all video modes supported by the specified monitor. The returned array is sorted in ascending order, first by color bit depth (the sum of all channel depths), then by resolution area (the product of width and height), then resolution width and finally by refresh rate.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">count</td><td>Where to store the number of video modes in the returned array. This is set to zero if an error occurred. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>An array of video modes, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_modes">Video modes</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 1.0. <b>GLFW 3:</b> Changed to return an array of modes for a specific monitor. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaba376fa7e76634b4788bddc505d6c9d5" name="gaba376fa7e76634b4788bddc505d6c9d5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaba376fa7e76634b4788bddc505d6c9d5">◆ </a></span>glfwGetVideoMode()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a> * glfwGetVideoMode </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns the current video mode of the specified monitor. If you have created a full screen window for that monitor, the return value will depend on whether that window is iconified.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The current mode of the monitor, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is valid until the specified monitor is disconnected or the library is terminated.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_modes">Video modes</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__monitor.html#gad2e24d2843cb7d6c26202cddd530fc1b">glfwGetVideoModes</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. Replaces <code>glfwGetDesktopMode</code>. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga6ac582625c990220785ddd34efa3169a" name="ga6ac582625c990220785ddd34efa3169a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga6ac582625c990220785ddd34efa3169a">◆ </a></span>glfwSetGamma()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwSetGamma </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">float </td>
|
||||
<td class="paramname"><em>gamma</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function generates an appropriately sized gamma ramp from the specified exponent and then calls <a class="el" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a> with it. The value must be a finite number greater than zero.</p>
|
||||
<p >The software controlled gamma ramp is applied <em>in addition</em> to the hardware gamma correction, which today is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior.</p>
|
||||
<p >For gamma correct rendering with OpenGL or OpenGL ES, see the <a class="el" href="window_guide.html#GLFW_SRGB_CAPABLE">GLFW_SRGB_CAPABLE</a> hint.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor whose gamma ramp to set. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">gamma</td><td>The desired exponent.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> Gamma handling is a privileged protocol, this function will thus never be implemented and emits <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_gamma">Gamma ramp</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga76ba90debcf0062b5c4b73052b24f96f" name="ga76ba90debcf0062b5c4b73052b24f96f"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga76ba90debcf0062b5c4b73052b24f96f">◆ </a></span>glfwGetGammaRamp()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> * glfwGetGammaRamp </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns the current gamma ramp of the specified monitor.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor to query. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The current gamma ramp, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd><b>Wayland:</b> Gamma handling is a privileged protocol, this function will thus never be implemented and emits <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a> while returning <code>NULL</code>.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned structure and its arrays are allocated and freed by GLFW. You should not free them yourself. They are valid until the specified monitor is disconnected, this function is called again for that monitor or the library is terminated.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_gamma">Gamma ramp</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga583f0ffd0d29613d8cd172b996bbf0dd" name="ga583f0ffd0d29613d8cd172b996bbf0dd"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga583f0ffd0d29613d8cd172b996bbf0dd">◆ </a></span>glfwSetGammaRamp()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwSetGammaRamp </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> * </td>
|
||||
<td class="paramname"><em>ramp</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function sets the current gamma ramp for the specified monitor. The original gamma ramp for that monitor is saved by GLFW the first time this function is called and is restored by <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>.</p>
|
||||
<p >The software controlled gamma ramp is applied <em>in addition</em> to the hardware gamma correction, which today is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior.</p>
|
||||
<p >For gamma correct rendering with OpenGL or OpenGL ES, see the <a class="el" href="window_guide.html#GLFW_SRGB_CAPABLE">GLFW_SRGB_CAPABLE</a> hint.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">monitor</td><td>The monitor whose gamma ramp to set. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">ramp</td><td>The gamma ramp to use.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>The size of the specified gamma ramp should match the size of the current ramp for that monitor.</dd>
|
||||
<dd>
|
||||
<b>Windows:</b> The gamma ramp size must be 256.</dd>
|
||||
<dd>
|
||||
<b>Wayland:</b> Gamma handling is a privileged protocol, this function will thus never be implemented and emits <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The specified gamma ramp is copied before this function returns.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="monitor_guide.html#monitor_gamma">Gamma ramp</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
805
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__native.html
vendored
Normal file
@ -0,0 +1,805 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Native access</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">Native access</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p ><b>By using the native access functions you assert that you know what you're doing and how to fix problems caused by using them. If you don't, you shouldn't be using them.</b></p>
|
||||
<p >Before the inclusion of <a class="el" href="glfw3native_8h.html">glfw3native.h</a>, you may define zero or more window system API macro and zero or more context creation API macros.</p>
|
||||
<p >The chosen backends must match those the library was compiled for. Failure to do this will cause a link-time error.</p>
|
||||
<p >The available window API macros are:</p><ul>
|
||||
<li><code>GLFW_EXPOSE_NATIVE_WIN32</code></li>
|
||||
<li><code>GLFW_EXPOSE_NATIVE_COCOA</code></li>
|
||||
<li><code>GLFW_EXPOSE_NATIVE_X11</code></li>
|
||||
<li><code>GLFW_EXPOSE_NATIVE_WAYLAND</code></li>
|
||||
</ul>
|
||||
<p >The available context API macros are:</p><ul>
|
||||
<li><code>GLFW_EXPOSE_NATIVE_WGL</code></li>
|
||||
<li><code>GLFW_EXPOSE_NATIVE_NSGL</code></li>
|
||||
<li><code>GLFW_EXPOSE_NATIVE_GLX</code></li>
|
||||
<li><code>GLFW_EXPOSE_NATIVE_EGL</code></li>
|
||||
<li><code>GLFW_EXPOSE_NATIVE_OSMESA</code></li>
|
||||
</ul>
|
||||
<p >These macros select which of the native access functions that are declared and which platform-specific headers to include. It is then up your (by definition platform-specific) code to handle which of these should be defined.</p>
|
||||
<p >If you do not want the platform-specific headers to be included, define <code>GLFW_NATIVE_INCLUDE_NONE</code> before including the <a class="el" href="glfw3native_8h.html">glfw3native.h</a> header.</p>
|
||||
<div class="fragment"><div class="line"><span class="preprocessor">#define GLFW_EXPOSE_NATIVE_WIN32</span></div>
|
||||
<div class="line"><span class="preprocessor">#define GLFW_EXPOSE_NATIVE_WGL</span></div>
|
||||
<div class="line"><span class="preprocessor">#define GLFW_NATIVE_INCLUDE_NONE</span></div>
|
||||
<div class="line"><span class="preprocessor">#include <<a class="code" href="glfw3native_8h.html">GLFW/glfw3native.h</a>></span></div>
|
||||
<div class="ttc" id="aglfw3native_8h_html"><div class="ttname"><a href="glfw3native_8h.html">glfw3native.h</a></div><div class="ttdoc">The header of the native access functions.</div></div>
|
||||
</div><!-- fragment --> <table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:gad4d3e9242536c0ba6be88a98f4c73a41"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41">glfwGetWin32Adapter</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:gad4d3e9242536c0ba6be88a98f4c73a41"><td class="mdescLeft"> </td><td class="mdescRight">Returns the adapter device name of the specified monitor. <a href="group__native.html#gad4d3e9242536c0ba6be88a98f4c73a41">More...</a><br /></td></tr>
|
||||
<tr class="separator:gad4d3e9242536c0ba6be88a98f4c73a41"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766">glfwGetWin32Monitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="mdescLeft"> </td><td class="mdescRight">Returns the display device name of the specified monitor. <a href="group__native.html#gac845f7dbe4c1d7fdd682a3c6fdae6766">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac845f7dbe4c1d7fdd682a3c6fdae6766"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gafe5079aa79038b0079fc09d5f0a8e667"><td class="memItemLeft" align="right" valign="top">HWND </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:gafe5079aa79038b0079fc09d5f0a8e667"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>HWND</code> of the specified window. <a href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">More...</a><br /></td></tr>
|
||||
<tr class="separator:gafe5079aa79038b0079fc09d5f0a8e667"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gadc4010d91d9cc1134d040eeb1202a143"><td class="memItemLeft" align="right" valign="top">HGLRC </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143">glfwGetWGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:gadc4010d91d9cc1134d040eeb1202a143"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>HGLRC</code> of the specified window. <a href="group__native.html#gadc4010d91d9cc1134d040eeb1202a143">More...</a><br /></td></tr>
|
||||
<tr class="separator:gadc4010d91d9cc1134d040eeb1202a143"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf22f429aec4b1aab316142d66d9be3e6"><td class="memItemLeft" align="right" valign="top">CGDirectDisplayID </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6">glfwGetCocoaMonitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:gaf22f429aec4b1aab316142d66d9be3e6"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>CGDirectDisplayID</code> of the specified monitor. <a href="group__native.html#gaf22f429aec4b1aab316142d66d9be3e6">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaf22f429aec4b1aab316142d66d9be3e6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gac3ed9d495d0c2bb9652de5a50c648715"><td class="memItemLeft" align="right" valign="top">id </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715">glfwGetCocoaWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:gac3ed9d495d0c2bb9652de5a50c648715"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>NSWindow</code> of the specified window. <a href="group__native.html#gac3ed9d495d0c2bb9652de5a50c648715">More...</a><br /></td></tr>
|
||||
<tr class="separator:gac3ed9d495d0c2bb9652de5a50c648715"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga559e002e3cd63c979881770cd4dc63bc"><td class="memItemLeft" align="right" valign="top">id </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc">glfwGetNSGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga559e002e3cd63c979881770cd4dc63bc"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>NSOpenGLContext</code> of the specified window. <a href="group__native.html#ga559e002e3cd63c979881770cd4dc63bc">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga559e002e3cd63c979881770cd4dc63bc"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6e7822385cc8a1cc3b18f60352830189"><td class="memItemLeft" align="right" valign="top">Display * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189">glfwGetX11Display</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga6e7822385cc8a1cc3b18f60352830189"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>Display</code> used by GLFW. <a href="group__native.html#ga6e7822385cc8a1cc3b18f60352830189">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga6e7822385cc8a1cc3b18f60352830189"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga088fbfa80f50569402b41be71ad66e40"><td class="memItemLeft" align="right" valign="top">RRCrtc </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga088fbfa80f50569402b41be71ad66e40">glfwGetX11Adapter</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:ga088fbfa80f50569402b41be71ad66e40"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>RRCrtc</code> of the specified monitor. <a href="group__native.html#ga088fbfa80f50569402b41be71ad66e40">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga088fbfa80f50569402b41be71ad66e40"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="memItemLeft" align="right" valign="top">RROutput </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c">glfwGetX11Monitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>RROutput</code> of the specified monitor. <a href="group__native.html#gab2f8cc043905e9fa9b12bfdbbcfe874c">More...</a><br /></td></tr>
|
||||
<tr class="separator:gab2f8cc043905e9fa9b12bfdbbcfe874c"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga90ca676322740842db446999a1b1f21d"><td class="memItemLeft" align="right" valign="top">Window </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga90ca676322740842db446999a1b1f21d">glfwGetX11Window</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga90ca676322740842db446999a1b1f21d"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>Window</code> of the specified window. <a href="group__native.html#ga90ca676322740842db446999a1b1f21d">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga90ca676322740842db446999a1b1f21d"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga55f879ab02d93367f966186b6f0133f7"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">glfwSetX11SelectionString</a> (const char *string)</td></tr>
|
||||
<tr class="memdesc:ga55f879ab02d93367f966186b6f0133f7"><td class="mdescLeft"> </td><td class="mdescRight">Sets the current primary selection to the specified string. <a href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga55f879ab02d93367f966186b6f0133f7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gae084ef64dc0db140b455b1427256d3f7"><td class="memItemLeft" align="right" valign="top">const char * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">glfwGetX11SelectionString</a> (void)</td></tr>
|
||||
<tr class="memdesc:gae084ef64dc0db140b455b1427256d3f7"><td class="mdescLeft"> </td><td class="mdescRight">Returns the contents of the current primary selection as a string. <a href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">More...</a><br /></td></tr>
|
||||
<tr class="separator:gae084ef64dc0db140b455b1427256d3f7"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga62d884114b0abfcdc2930e89f20867e2"><td class="memItemLeft" align="right" valign="top">GLXContext </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2">glfwGetGLXContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga62d884114b0abfcdc2930e89f20867e2"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>GLXContext</code> of the specified window. <a href="group__native.html#ga62d884114b0abfcdc2930e89f20867e2">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga62d884114b0abfcdc2930e89f20867e2"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1ed27b8766e859a21381e8f8ce18d049"><td class="memItemLeft" align="right" valign="top">GLXWindow </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049">glfwGetGLXWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga1ed27b8766e859a21381e8f8ce18d049"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>GLXWindow</code> of the specified window. <a href="group__native.html#ga1ed27b8766e859a21381e8f8ce18d049">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1ed27b8766e859a21381e8f8ce18d049"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gacbe11f93ce20621de82989bbba94e62a"><td class="memItemLeft" align="right" valign="top">struct wl_display * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#gacbe11f93ce20621de82989bbba94e62a">glfwGetWaylandDisplay</a> (void)</td></tr>
|
||||
<tr class="memdesc:gacbe11f93ce20621de82989bbba94e62a"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>struct wl_display*</code> used by GLFW. <a href="group__native.html#gacbe11f93ce20621de82989bbba94e62a">More...</a><br /></td></tr>
|
||||
<tr class="separator:gacbe11f93ce20621de82989bbba94e62a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga4f16066bd4c59e2f99418adfcb43dd16"><td class="memItemLeft" align="right" valign="top">struct wl_output * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16">glfwGetWaylandMonitor</a> (<a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> *monitor)</td></tr>
|
||||
<tr class="memdesc:ga4f16066bd4c59e2f99418adfcb43dd16"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>struct wl_output*</code> of the specified monitor. <a href="group__native.html#ga4f16066bd4c59e2f99418adfcb43dd16">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga4f16066bd4c59e2f99418adfcb43dd16"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga5c597f2841229d9626f0811cca41ceb3"><td class="memItemLeft" align="right" valign="top">struct wl_surface * </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3">glfwGetWaylandWindow</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga5c597f2841229d9626f0811cca41ceb3"><td class="mdescLeft"> </td><td class="mdescRight">Returns the main <code>struct wl_surface*</code> of the specified window. <a href="group__native.html#ga5c597f2841229d9626f0811cca41ceb3">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga5c597f2841229d9626f0811cca41ceb3"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1cd8d973f47aacb5532d368147cc3138"><td class="memItemLeft" align="right" valign="top">EGLDisplay </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138">glfwGetEGLDisplay</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga1cd8d973f47aacb5532d368147cc3138"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>EGLDisplay</code> used by GLFW. <a href="group__native.html#ga1cd8d973f47aacb5532d368147cc3138">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1cd8d973f47aacb5532d368147cc3138"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga671c5072becd085f4ab5771a9c8efcf1"><td class="memItemLeft" align="right" valign="top">EGLContext </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1">glfwGetEGLContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga671c5072becd085f4ab5771a9c8efcf1"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>EGLContext</code> of the specified window. <a href="group__native.html#ga671c5072becd085f4ab5771a9c8efcf1">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga671c5072becd085f4ab5771a9c8efcf1"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga2199b36117a6a695fec8441d8052eee6"><td class="memItemLeft" align="right" valign="top">EGLSurface </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga2199b36117a6a695fec8441d8052eee6">glfwGetEGLSurface</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga2199b36117a6a695fec8441d8052eee6"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>EGLSurface</code> of the specified window. <a href="group__native.html#ga2199b36117a6a695fec8441d8052eee6">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga2199b36117a6a695fec8441d8052eee6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga3b36e3e3dcf308b776427b6bd73cc132"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132">glfwGetOSMesaColorBuffer</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height, int *format, void **buffer)</td></tr>
|
||||
<tr class="memdesc:ga3b36e3e3dcf308b776427b6bd73cc132"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the color buffer associated with the specified window. <a href="group__native.html#ga3b36e3e3dcf308b776427b6bd73cc132">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga3b36e3e3dcf308b776427b6bd73cc132"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53">glfwGetOSMesaDepthBuffer</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, int *width, int *height, int *bytesPerValue, void **buffer)</td></tr>
|
||||
<tr class="memdesc:ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="mdescLeft"> </td><td class="mdescRight">Retrieves the depth buffer associated with the specified window. <a href="group__native.html#ga6b64039ffc88a7a2f57f0956c0c75d53">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga6b64039ffc88a7a2f57f0956c0c75d53"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga9e47700080094eb569cb053afaa88773"><td class="memItemLeft" align="right" valign="top">OSMesaContext </td><td class="memItemRight" valign="bottom"><a class="el" href="group__native.html#ga9e47700080094eb569cb053afaa88773">glfwGetOSMesaContext</a> (<a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window)</td></tr>
|
||||
<tr class="memdesc:ga9e47700080094eb569cb053afaa88773"><td class="mdescLeft"> </td><td class="mdescRight">Returns the <code>OSMesaContext</code> of the specified window. <a href="group__native.html#ga9e47700080094eb569cb053afaa88773">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga9e47700080094eb569cb053afaa88773"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="gad4d3e9242536c0ba6be88a98f4c73a41" name="gad4d3e9242536c0ba6be88a98f4c73a41"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gad4d3e9242536c0ba6be88a98f4c73a41">◆ </a></span>glfwGetWin32Adapter()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const char * glfwGetWin32Adapter </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The UTF-8 encoded adapter device name (for example <code>\\.\DISPLAY1</code>) of the specified monitor, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gac845f7dbe4c1d7fdd682a3c6fdae6766" name="gac845f7dbe4c1d7fdd682a3c6fdae6766"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gac845f7dbe4c1d7fdd682a3c6fdae6766">◆ </a></span>glfwGetWin32Monitor()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const char * glfwGetWin32Monitor </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The UTF-8 encoded display device name (for example <code>\\.\DISPLAY1\Monitor0</code>) of the specified monitor, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gafe5079aa79038b0079fc09d5f0a8e667" name="gafe5079aa79038b0079fc09d5f0a8e667"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gafe5079aa79038b0079fc09d5f0a8e667">◆ </a></span>glfwGetWin32Window()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">HWND glfwGetWin32Window </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>HWND</code> of the specified window, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>The <code>HDC</code> associated with the window can be queried with the <a href="https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc">GetDC</a> function. <div class="fragment"><div class="line">HDC dc = GetDC(<a class="code hl_function" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a>(window));</div>
|
||||
<div class="ttc" id="agroup__native_html_gafe5079aa79038b0079fc09d5f0a8e667"><div class="ttname"><a href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a></div><div class="ttdeci">HWND glfwGetWin32Window(GLFWwindow *window)</div><div class="ttdoc">Returns the HWND of the specified window.</div></div>
|
||||
</div><!-- fragment --> This DC is private and does not need to be released.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gadc4010d91d9cc1134d040eeb1202a143" name="gadc4010d91d9cc1134d040eeb1202a143"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gadc4010d91d9cc1134d040eeb1202a143">◆ </a></span>glfwGetWGLContext()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">HGLRC glfwGetWGLContext </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>HGLRC</code> of the specified window, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>The <code>HDC</code> associated with the window can be queried with the <a href="https://docs.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getdc">GetDC</a> function. <div class="fragment"><div class="line">HDC dc = GetDC(<a class="code hl_function" href="group__native.html#gafe5079aa79038b0079fc09d5f0a8e667">glfwGetWin32Window</a>(window));</div>
|
||||
</div><!-- fragment --> This DC is private and does not need to be released.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaf22f429aec4b1aab316142d66d9be3e6" name="gaf22f429aec4b1aab316142d66d9be3e6"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaf22f429aec4b1aab316142d66d9be3e6">◆ </a></span>glfwGetCocoaMonitor()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">CGDirectDisplayID glfwGetCocoaMonitor </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>CGDirectDisplayID</code> of the specified monitor, or <code>kCGNullDirectDisplay</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gac3ed9d495d0c2bb9652de5a50c648715" name="gac3ed9d495d0c2bb9652de5a50c648715"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gac3ed9d495d0c2bb9652de5a50c648715">◆ </a></span>glfwGetCocoaWindow()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">id glfwGetCocoaWindow </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>NSWindow</code> of the specified window, or <code>nil</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga559e002e3cd63c979881770cd4dc63bc" name="ga559e002e3cd63c979881770cd4dc63bc"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga559e002e3cd63c979881770cd4dc63bc">◆ </a></span>glfwGetNSGLContext()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">id glfwGetNSGLContext </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>NSOpenGLContext</code> of the specified window, or <code>nil</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga6e7822385cc8a1cc3b18f60352830189" name="ga6e7822385cc8a1cc3b18f60352830189"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga6e7822385cc8a1cc3b18f60352830189">◆ </a></span>glfwGetX11Display()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">Display * glfwGetX11Display </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>Display</code> used by GLFW, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga088fbfa80f50569402b41be71ad66e40" name="ga088fbfa80f50569402b41be71ad66e40"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga088fbfa80f50569402b41be71ad66e40">◆ </a></span>glfwGetX11Adapter()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">RRCrtc glfwGetX11Adapter </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>RRCrtc</code> of the specified monitor, or <code>None</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gab2f8cc043905e9fa9b12bfdbbcfe874c" name="gab2f8cc043905e9fa9b12bfdbbcfe874c"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gab2f8cc043905e9fa9b12bfdbbcfe874c">◆ </a></span>glfwGetX11Monitor()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">RROutput glfwGetX11Monitor </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>RROutput</code> of the specified monitor, or <code>None</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.1. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga90ca676322740842db446999a1b1f21d" name="ga90ca676322740842db446999a1b1f21d"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga90ca676322740842db446999a1b1f21d">◆ </a></span>glfwGetX11Window()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">Window glfwGetX11Window </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>Window</code> of the specified window, or <code>None</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga55f879ab02d93367f966186b6f0133f7" name="ga55f879ab02d93367f966186b6f0133f7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga55f879ab02d93367f966186b6f0133f7">◆ </a></span>glfwSetX11SelectionString()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">void glfwSetX11SelectionString </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">const char * </td>
|
||||
<td class="paramname"><em>string</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">string</td><td>A UTF-8 encoded string.</td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The specified string is copied before this function returns.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#clipboard">Clipboard input and output</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7" title="Returns the contents of the current primary selection as a string.">glfwGetX11SelectionString</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd" title="Sets the clipboard to the specified string.">glfwSetClipboardString</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gae084ef64dc0db140b455b1427256d3f7" name="gae084ef64dc0db140b455b1427256d3f7"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gae084ef64dc0db140b455b1427256d3f7">◆ </a></span>glfwGetX11SelectionString()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const char * glfwGetX11SelectionString </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >If the selection is empty or if its contents cannot be converted, <code>NULL</code> is returned and a <a class="el" href="group__errors.html#ga196e125ef261d94184e2b55c05762f14">GLFW_FORMAT_UNAVAILABLE</a> error is generated.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The contents of the selection as a UTF-8 encoded string, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned string is allocated and freed by GLFW. You should not free it yourself. It is valid until the next call to <a class="el" href="group__native.html#gae084ef64dc0db140b455b1427256d3f7">glfwGetX11SelectionString</a> or <a class="el" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7">glfwSetX11SelectionString</a>, or until the library is terminated.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function must only be called from the main thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="input_guide.html#clipboard">Clipboard input and output</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__native.html#ga55f879ab02d93367f966186b6f0133f7" title="Sets the current primary selection to the specified string.">glfwSetX11SelectionString</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__input.html#ga71a5b20808ea92193d65c21b82580355" title="Returns the contents of the clipboard as a string.">glfwGetClipboardString</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga62d884114b0abfcdc2930e89f20867e2" name="ga62d884114b0abfcdc2930e89f20867e2"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga62d884114b0abfcdc2930e89f20867e2">◆ </a></span>glfwGetGLXContext()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">GLXContext glfwGetGLXContext </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>GLXContext</code> of the specified window, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1ed27b8766e859a21381e8f8ce18d049" name="ga1ed27b8766e859a21381e8f8ce18d049"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1ed27b8766e859a21381e8f8ce18d049">◆ </a></span>glfwGetGLXWindow()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">GLXWindow glfwGetGLXWindow </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>GLXWindow</code> of the specified window, or <code>None</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gacbe11f93ce20621de82989bbba94e62a" name="gacbe11f93ce20621de82989bbba94e62a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gacbe11f93ce20621de82989bbba94e62a">◆ </a></span>glfwGetWaylandDisplay()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">struct wl_display * glfwGetWaylandDisplay </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>struct wl_display*</code> used by GLFW, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga4f16066bd4c59e2f99418adfcb43dd16" name="ga4f16066bd4c59e2f99418adfcb43dd16"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga4f16066bd4c59e2f99418adfcb43dd16">◆ </a></span>glfwGetWaylandMonitor()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">struct wl_output * glfwGetWaylandMonitor </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a> * </td>
|
||||
<td class="paramname"><em>monitor</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>struct wl_output*</code> of the specified monitor, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga5c597f2841229d9626f0811cca41ceb3" name="ga5c597f2841229d9626f0811cca41ceb3"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga5c597f2841229d9626f0811cca41ceb3">◆ </a></span>glfwGetWaylandWindow()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">struct wl_surface * glfwGetWaylandWindow </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The main <code>struct wl_surface*</code> of the specified window, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1cd8d973f47aacb5532d368147cc3138" name="ga1cd8d973f47aacb5532d368147cc3138"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1cd8d973f47aacb5532d368147cc3138">◆ </a></span>glfwGetEGLDisplay()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">EGLDisplay glfwGetEGLDisplay </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>EGLDisplay</code> used by GLFW, or <code>EGL_NO_DISPLAY</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>Because EGL is initialized on demand, this function will return <code>EGL_NO_DISPLAY</code> until the first context has been created via EGL.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga671c5072becd085f4ab5771a9c8efcf1" name="ga671c5072becd085f4ab5771a9c8efcf1"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga671c5072becd085f4ab5771a9c8efcf1">◆ </a></span>glfwGetEGLContext()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">EGLContext glfwGetEGLContext </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>EGLContext</code> of the specified window, or <code>EGL_NO_CONTEXT</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga2199b36117a6a695fec8441d8052eee6" name="ga2199b36117a6a695fec8441d8052eee6"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga2199b36117a6a695fec8441d8052eee6">◆ </a></span>glfwGetEGLSurface()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">EGLSurface glfwGetEGLSurface </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>EGLSurface</code> of the specified window, or <code>EGL_NO_SURFACE</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.0. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga3b36e3e3dcf308b776427b6bd73cc132" name="ga3b36e3e3dcf308b776427b6bd73cc132"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga3b36e3e3dcf308b776427b6bd73cc132">◆ </a></span>glfwGetOSMesaColorBuffer()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int glfwGetOSMesaColorBuffer </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>width</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>height</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>format</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">void ** </td>
|
||||
<td class="paramname"><em>buffer</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose color buffer to retrieve. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">width</td><td>Where to store the width of the color buffer, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">height</td><td>Where to store the height of the color buffer, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">format</td><td>Where to store the OSMesa pixel format of the color buffer, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">buffer</td><td>Where to store the address of the color buffer, or <code>NULL</code>. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga6b64039ffc88a7a2f57f0956c0c75d53" name="ga6b64039ffc88a7a2f57f0956c0c75d53"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga6b64039ffc88a7a2f57f0956c0c75d53">◆ </a></span>glfwGetOSMesaDepthBuffer()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int glfwGetOSMesaDepthBuffer </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>width</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>height</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">int * </td>
|
||||
<td class="paramname"><em>bytesPerValue</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">void ** </td>
|
||||
<td class="paramname"><em>buffer</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window whose depth buffer to retrieve. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">width</td><td>Where to store the width of the depth buffer, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">height</td><td>Where to store the height of the depth buffer, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">bytesPerValue</td><td>Where to store the number of bytes per depth buffer element, or <code>NULL</code>. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">buffer</td><td>Where to store the address of the depth buffer, or <code>NULL</code>. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if successful, or <code>GLFW_FALSE</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga9e47700080094eb569cb053afaa88773" name="ga9e47700080094eb569cb053afaa88773"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga9e47700080094eb569cb053afaa88773">◆ </a></span>glfwGetOSMesaContext()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">OSMesaContext glfwGetOSMesaContext </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<dl class="section return"><dt>Returns</dt><dd>The <code>OSMesaContext</code> of the specified window, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#gacff24d2757da752ae4c80bf452356487">GLFW_NO_WINDOW_CONTEXT</a> and <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. Access is not synchronized.</dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.3. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
191
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__shapes.html
vendored
Normal file
@ -0,0 +1,191 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Standard cursor shapes</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#define-members">Macros</a> </div>
|
||||
<div class="headertitle"><div class="title">Standard cursor shapes<div class="ingroups"><a class="el" href="group__input.html">Input reference</a></div></div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >See <a class="el" href="input_guide.html#cursor_standard">standard cursor creation</a> for how these are used. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
|
||||
Macros</h2></td></tr>
|
||||
<tr class="memitem:ga8ab0e717245b85506cb0eaefdea39d0a"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#ga8ab0e717245b85506cb0eaefdea39d0a">GLFW_ARROW_CURSOR</a>   0x00036001</td></tr>
|
||||
<tr class="memdesc:ga8ab0e717245b85506cb0eaefdea39d0a"><td class="mdescLeft"> </td><td class="mdescRight">The regular arrow cursor shape. <a href="group__shapes.html#ga8ab0e717245b85506cb0eaefdea39d0a">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga8ab0e717245b85506cb0eaefdea39d0a"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga36185f4375eaada1b04e431244774c86"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#ga36185f4375eaada1b04e431244774c86">GLFW_IBEAM_CURSOR</a>   0x00036002</td></tr>
|
||||
<tr class="memdesc:ga36185f4375eaada1b04e431244774c86"><td class="mdescLeft"> </td><td class="mdescRight">The text input I-beam cursor shape. <a href="group__shapes.html#ga36185f4375eaada1b04e431244774c86">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga36185f4375eaada1b04e431244774c86"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga8af88c0ea05ab9e8f9ac1530e8873c22"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#ga8af88c0ea05ab9e8f9ac1530e8873c22">GLFW_CROSSHAIR_CURSOR</a>   0x00036003</td></tr>
|
||||
<tr class="memdesc:ga8af88c0ea05ab9e8f9ac1530e8873c22"><td class="mdescLeft"> </td><td class="mdescRight">The crosshair shape. <a href="group__shapes.html#ga8af88c0ea05ab9e8f9ac1530e8873c22">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga8af88c0ea05ab9e8f9ac1530e8873c22"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1db35e20849e0837c82e3dc1fd797263"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#ga1db35e20849e0837c82e3dc1fd797263">GLFW_HAND_CURSOR</a>   0x00036004</td></tr>
|
||||
<tr class="memdesc:ga1db35e20849e0837c82e3dc1fd797263"><td class="mdescLeft"> </td><td class="mdescRight">The hand shape. <a href="group__shapes.html#ga1db35e20849e0837c82e3dc1fd797263">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1db35e20849e0837c82e3dc1fd797263"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gabb3eb0109f11bb808fc34659177ca962"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#gabb3eb0109f11bb808fc34659177ca962">GLFW_HRESIZE_CURSOR</a>   0x00036005</td></tr>
|
||||
<tr class="memdesc:gabb3eb0109f11bb808fc34659177ca962"><td class="mdescLeft"> </td><td class="mdescRight">The horizontal resize arrow shape. <a href="group__shapes.html#gabb3eb0109f11bb808fc34659177ca962">More...</a><br /></td></tr>
|
||||
<tr class="separator:gabb3eb0109f11bb808fc34659177ca962"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaf024f0e1ff8366fb2b5c260509a1fce5"><td class="memItemLeft" align="right" valign="top">#define </td><td class="memItemRight" valign="bottom"><a class="el" href="group__shapes.html#gaf024f0e1ff8366fb2b5c260509a1fce5">GLFW_VRESIZE_CURSOR</a>   0x00036006</td></tr>
|
||||
<tr class="memdesc:gaf024f0e1ff8366fb2b5c260509a1fce5"><td class="mdescLeft"> </td><td class="mdescRight">The vertical resize arrow shape. <a href="group__shapes.html#gaf024f0e1ff8366fb2b5c260509a1fce5">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaf024f0e1ff8366fb2b5c260509a1fce5"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Macro Definition Documentation</h2>
|
||||
<a id="ga8ab0e717245b85506cb0eaefdea39d0a" name="ga8ab0e717245b85506cb0eaefdea39d0a"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga8ab0e717245b85506cb0eaefdea39d0a">◆ </a></span>GLFW_ARROW_CURSOR</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_ARROW_CURSOR   0x00036001</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >The regular arrow cursor. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga36185f4375eaada1b04e431244774c86" name="ga36185f4375eaada1b04e431244774c86"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga36185f4375eaada1b04e431244774c86">◆ </a></span>GLFW_IBEAM_CURSOR</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_IBEAM_CURSOR   0x00036002</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >The text input I-beam cursor shape. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga8af88c0ea05ab9e8f9ac1530e8873c22" name="ga8af88c0ea05ab9e8f9ac1530e8873c22"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga8af88c0ea05ab9e8f9ac1530e8873c22">◆ </a></span>GLFW_CROSSHAIR_CURSOR</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_CROSSHAIR_CURSOR   0x00036003</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >The crosshair shape. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1db35e20849e0837c82e3dc1fd797263" name="ga1db35e20849e0837c82e3dc1fd797263"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1db35e20849e0837c82e3dc1fd797263">◆ </a></span>GLFW_HAND_CURSOR</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_HAND_CURSOR   0x00036004</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >The hand shape. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gabb3eb0109f11bb808fc34659177ca962" name="gabb3eb0109f11bb808fc34659177ca962"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gabb3eb0109f11bb808fc34659177ca962">◆ </a></span>GLFW_HRESIZE_CURSOR</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_HRESIZE_CURSOR   0x00036005</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >The horizontal resize arrow shape. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaf024f0e1ff8366fb2b5c260509a1fce5" name="gaf024f0e1ff8366fb2b5c260509a1fce5"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaf024f0e1ff8366fb2b5c260509a1fce5">◆ </a></span>GLFW_VRESIZE_CURSOR</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">#define GLFW_VRESIZE_CURSOR   0x00036006</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >The vertical resize arrow shape. </p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
352
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__vulkan.html
vendored
Normal file
@ -0,0 +1,352 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Vulkan support reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="summary">
|
||||
<a href="#typedef-members">Typedefs</a> |
|
||||
<a href="#func-members">Functions</a> </div>
|
||||
<div class="headertitle"><div class="title">Vulkan support reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<a name="details" id="details"></a><h2 class="groupheader">Description</h2>
|
||||
<p >This is the reference documentation for Vulkan related functions and types. For more task-oriented information, see the <a class="el" href="vulkan_guide.html">Vulkan guide</a>. </p>
|
||||
<table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="typedef-members" name="typedef-members"></a>
|
||||
Typedefs</h2></td></tr>
|
||||
<tr class="memitem:ga70c01918dc9d233a4fbe0681a43018af"><td class="memItemLeft" align="right" valign="top">typedef void(* </td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af">GLFWvkproc</a>) (void)</td></tr>
|
||||
<tr class="memdesc:ga70c01918dc9d233a4fbe0681a43018af"><td class="mdescLeft"> </td><td class="mdescRight">Vulkan API function pointer type. <a href="group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga70c01918dc9d233a4fbe0681a43018af"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table><table class="memberdecls">
|
||||
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
|
||||
Functions</h2></td></tr>
|
||||
<tr class="memitem:ga2e7f30931e02464b5bc8d0d4b6f9fe2b"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> (void)</td></tr>
|
||||
<tr class="memdesc:ga2e7f30931e02464b5bc8d0d4b6f9fe2b"><td class="mdescLeft"> </td><td class="mdescRight">Returns whether the Vulkan loader and an ICD have been found. <a href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga2e7f30931e02464b5bc8d0d4b6f9fe2b"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga99ad342d82f4a3421e2864978cb6d1d6"><td class="memItemLeft" align="right" valign="top">const char ** </td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> (uint32_t *count)</td></tr>
|
||||
<tr class="memdesc:ga99ad342d82f4a3421e2864978cb6d1d6"><td class="mdescLeft"> </td><td class="mdescRight">Returns the Vulkan instance extensions required by GLFW. <a href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga99ad342d82f4a3421e2864978cb6d1d6"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gadf228fac94c5fd8f12423ec9af9ff1e9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af">GLFWvkproc</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">glfwGetInstanceProcAddress</a> (VkInstance instance, const char *procname)</td></tr>
|
||||
<tr class="memdesc:gadf228fac94c5fd8f12423ec9af9ff1e9"><td class="mdescLeft"> </td><td class="mdescRight">Returns the address of the specified Vulkan instance function. <a href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">More...</a><br /></td></tr>
|
||||
<tr class="separator:gadf228fac94c5fd8f12423ec9af9ff1e9"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:gaff3823355cdd7e2f3f9f4d9ea9518d92"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92">glfwGetPhysicalDevicePresentationSupport</a> (VkInstance instance, VkPhysicalDevice device, uint32_t queuefamily)</td></tr>
|
||||
<tr class="memdesc:gaff3823355cdd7e2f3f9f4d9ea9518d92"><td class="mdescLeft"> </td><td class="mdescRight">Returns whether the specified queue family can present images. <a href="group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92">More...</a><br /></td></tr>
|
||||
<tr class="separator:gaff3823355cdd7e2f3f9f4d9ea9518d92"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
<tr class="memitem:ga1a24536bec3f80b08ead18e28e6ae965"><td class="memItemLeft" align="right" valign="top">VkResult </td><td class="memItemRight" valign="bottom"><a class="el" href="group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965">glfwCreateWindowSurface</a> (VkInstance instance, <a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> *window, const VkAllocationCallbacks *allocator, VkSurfaceKHR *surface)</td></tr>
|
||||
<tr class="memdesc:ga1a24536bec3f80b08ead18e28e6ae965"><td class="mdescLeft"> </td><td class="mdescRight">Creates a Vulkan surface for the specified window. <a href="group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965">More...</a><br /></td></tr>
|
||||
<tr class="separator:ga1a24536bec3f80b08ead18e28e6ae965"><td class="memSeparator" colspan="2"> </td></tr>
|
||||
</table>
|
||||
<h2 class="groupheader">Typedef Documentation</h2>
|
||||
<a id="ga70c01918dc9d233a4fbe0681a43018af" name="ga70c01918dc9d233a4fbe0681a43018af"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga70c01918dc9d233a4fbe0681a43018af">◆ </a></span>GLFWvkproc</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">typedef void(* GLFWvkproc) (void)</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >Generic function pointer used for returning Vulkan API function pointers without forcing a cast from a regular pointer.</p>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_proc">Querying Vulkan function pointers</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">glfwGetInstanceProcAddress</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<h2 class="groupheader">Function Documentation</h2>
|
||||
<a id="ga2e7f30931e02464b5bc8d0d4b6f9fe2b" name="ga2e7f30931e02464b5bc8d0d4b6f9fe2b"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">◆ </a></span>glfwVulkanSupported()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int glfwVulkanSupported </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">void </td>
|
||||
<td class="paramname"></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns whether the Vulkan loader and any minimally functional ICD have been found.</p>
|
||||
<p >The availability of a Vulkan loader and even an ICD does not by itself guarantee that surface creation or even instance creation is possible. Call <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> to check whether the extensions necessary for Vulkan surface creation are available and <a class="el" href="group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92">glfwGetPhysicalDevicePresentationSupport</a> to check whether a queue family of a physical device supports image presentation.</p>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if Vulkan is minimally available, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_support">Querying for Vulkan support</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga99ad342d82f4a3421e2864978cb6d1d6" name="ga99ad342d82f4a3421e2864978cb6d1d6"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga99ad342d82f4a3421e2864978cb6d1d6">◆ </a></span>glfwGetRequiredInstanceExtensions()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">const char ** glfwGetRequiredInstanceExtensions </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">uint32_t * </td>
|
||||
<td class="paramname"><em>count</em></td><td>)</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns an array of names of Vulkan instance extensions required by GLFW for creating Vulkan surfaces for GLFW windows. If successful, the list will always contain <code>VK_KHR_surface</code>, so if you don't require any additional extensions you can pass this list directly to the <code>VkInstanceCreateInfo</code> struct.</p>
|
||||
<p >If Vulkan is not available on the machine, this function returns <code>NULL</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>
|
||||
<p >If Vulkan is available but no set of extensions allowing window surface creation was found, this function returns <code>NULL</code>. You may still use Vulkan for off-screen rendering and compute work.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">count</td><td>Where to store the number of extensions in the returned array. This is set to zero if an error occurred. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>An array of ASCII encoded extension names, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>Additional extensions may be required by future versions of GLFW. You should check if any extensions you wish to enable are already in the returned array, as it is an error to specify an extension more than once in the <code>VkInstanceCreateInfo</code> struct.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned array is allocated and freed by GLFW. You should not free it yourself. It is guaranteed to be valid only until the library is terminated.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_ext">Querying required Vulkan extensions</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965">glfwCreateWindowSurface</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gadf228fac94c5fd8f12423ec9af9ff1e9" name="gadf228fac94c5fd8f12423ec9af9ff1e9"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gadf228fac94c5fd8f12423ec9af9ff1e9">◆ </a></span>glfwGetInstanceProcAddress()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname"><a class="el" href="group__vulkan.html#ga70c01918dc9d233a4fbe0681a43018af">GLFWvkproc</a> glfwGetInstanceProcAddress </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">VkInstance </td>
|
||||
<td class="paramname"><em>instance</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const char * </td>
|
||||
<td class="paramname"><em>procname</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns the address of the specified Vulkan core or extension function for the specified instance. If instance is set to <code>NULL</code> it can return any function exported from the Vulkan loader, including at least the following functions:</p>
|
||||
<ul>
|
||||
<li><code>vkEnumerateInstanceExtensionProperties</code></li>
|
||||
<li><code>vkEnumerateInstanceLayerProperties</code></li>
|
||||
<li><code>vkCreateInstance</code></li>
|
||||
<li><code>vkGetInstanceProcAddr</code></li>
|
||||
</ul>
|
||||
<p >If Vulkan is not available on the machine, this function returns <code>NULL</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>
|
||||
<p >This function is equivalent to calling <code>vkGetInstanceProcAddr</code> with a platform-specific query of the Vulkan loader as a fallback.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The Vulkan instance to query, or <code>NULL</code> to retrieve functions related to instance creation. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">procname</td><td>The ASCII encoded name of the function. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd>The address of the function, or <code>NULL</code> if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> and <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>.</dd></dl>
|
||||
<dl class="section user"><dt>Pointer lifetime</dt><dd>The returned function pointer is valid until the library is terminated.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_proc">Querying Vulkan function pointers</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="gaff3823355cdd7e2f3f9f4d9ea9518d92" name="gaff3823355cdd7e2f3f9f4d9ea9518d92"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#gaff3823355cdd7e2f3f9f4d9ea9518d92">◆ </a></span>glfwGetPhysicalDevicePresentationSupport()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">int glfwGetPhysicalDevicePresentationSupport </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">VkInstance </td>
|
||||
<td class="paramname"><em>instance</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">VkPhysicalDevice </td>
|
||||
<td class="paramname"><em>device</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">uint32_t </td>
|
||||
<td class="paramname"><em>queuefamily</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function returns whether the specified queue family of the specified physical device supports presentation to the platform GLFW was built for.</p>
|
||||
<p >If Vulkan or the required window surface creation instance extensions are not available on the machine, or if the specified instance was not created with the required extensions, this function returns <code>GLFW_FALSE</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available and <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> to check what instance extensions are required.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The instance that the physical device belongs to. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">device</td><td>The physical device that the queue family belongs to. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">queuefamily</td><td>The index of the queue family to query. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>GLFW_TRUE</code> if the queue family supports presentation, or <code>GLFW_FALSE</code> otherwise.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> and <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a>.</dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd><b>macOS:</b> This function currently always returns <code>GLFW_TRUE</code>, as the <code>VK_MVK_macos_surface</code> and <code>VK_EXT_metal_surface</code> extensions do not provide a <code>vkGetPhysicalDevice*PresentationSupport</code> type function.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_present">Querying for Vulkan presentation support</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<a id="ga1a24536bec3f80b08ead18e28e6ae965" name="ga1a24536bec3f80b08ead18e28e6ae965"></a>
|
||||
<h2 class="memtitle"><span class="permalink"><a href="#ga1a24536bec3f80b08ead18e28e6ae965">◆ </a></span>glfwCreateWindowSurface()</h2>
|
||||
|
||||
<div class="memitem">
|
||||
<div class="memproto">
|
||||
<table class="memname">
|
||||
<tr>
|
||||
<td class="memname">VkResult glfwCreateWindowSurface </td>
|
||||
<td>(</td>
|
||||
<td class="paramtype">VkInstance </td>
|
||||
<td class="paramname"><em>instance</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype"><a class="el" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a> * </td>
|
||||
<td class="paramname"><em>window</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">const VkAllocationCallbacks * </td>
|
||||
<td class="paramname"><em>allocator</em>, </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="paramkey"></td>
|
||||
<td></td>
|
||||
<td class="paramtype">VkSurfaceKHR * </td>
|
||||
<td class="paramname"><em>surface</em> </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td>)</td>
|
||||
<td></td><td></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div><div class="memdoc">
|
||||
<p >This function creates a Vulkan surface for the specified window.</p>
|
||||
<p >If the Vulkan loader or at least one minimally functional ICD were not found, this function returns <code>VK_ERROR_INITIALIZATION_FAILED</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> to check whether Vulkan is at least minimally available.</p>
|
||||
<p >If the required window surface creation instance extensions are not available or if the specified instance was not created with these extensions enabled, this function returns <code>VK_ERROR_EXTENSION_NOT_PRESENT</code> and generates a <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a> error. Call <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> to check what instance extensions are required.</p>
|
||||
<p >The window surface cannot be shared with another API so the window must have been created with the <a class="el" href="window_guide.html#GLFW_CLIENT_API_attrib">client api hint</a> set to <code>GLFW_NO_API</code> otherwise it generates a <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a> error and returns <code>VK_ERROR_NATIVE_WINDOW_IN_USE_KHR</code>.</p>
|
||||
<p >The window surface must be destroyed before the specified Vulkan instance. It is the responsibility of the caller to destroy the window surface. GLFW does not destroy it for you. Call <code>vkDestroySurfaceKHR</code> to destroy the surface.</p>
|
||||
<dl class="params"><dt>Parameters</dt><dd>
|
||||
<table class="params">
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">instance</td><td>The Vulkan instance to create the surface in. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">window</td><td>The window to create the surface for. </td></tr>
|
||||
<tr><td class="paramdir">[in]</td><td class="paramname">allocator</td><td>The allocator to use, or <code>NULL</code> to use the default allocator. </td></tr>
|
||||
<tr><td class="paramdir">[out]</td><td class="paramname">surface</td><td>Where to store the handle of the surface. This is set to <code>VK_NULL_HANDLE</code> if an error occurred. </td></tr>
|
||||
</table>
|
||||
</dd>
|
||||
</dl>
|
||||
<dl class="section return"><dt>Returns</dt><dd><code>VK_SUCCESS</code> if successful, or a Vulkan error code if an <a class="el" href="intro_guide.html#error_handling">error</a> occurred.</dd></dl>
|
||||
<dl class="section user"><dt>Errors</dt><dd>Possible errors include <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a>, <a class="el" href="group__errors.html#ga56882b290db23261cc6c053c40c2d08e">GLFW_API_UNAVAILABLE</a>, <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a> and <a class="el" href="group__errors.html#gaaf2ef9aa8202c2b82ac2d921e554c687">GLFW_INVALID_VALUE</a></dd></dl>
|
||||
<dl class="section remark"><dt>Remarks</dt><dd>If an error occurs before the creation call is made, GLFW returns the Vulkan error code most appropriate for the error. Appropriate use of <a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a> and <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a> should eliminate almost all occurrences of these errors.</dd>
|
||||
<dd>
|
||||
<b>macOS:</b> GLFW prefers the <code>VK_EXT_metal_surface</code> extension, with the <code>VK_MVK_macos_surface</code> extension as a fallback. The name of the selected extension, if any, is included in the array returned by <a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a>.</dd>
|
||||
<dd>
|
||||
<b>macOS:</b> This function creates and sets a <code>CAMetalLayer</code> instance for the window content view, which is required for MoltenVK to function.</dd></dl>
|
||||
<dl class="section user"><dt>Thread safety</dt><dd>This function may be called from any thread. For synchronization details of Vulkan objects, see the Vulkan specification.</dd></dl>
|
||||
<dl class="section see"><dt>See also</dt><dd><a class="el" href="vulkan_guide.html#vulkan_surface">Creating a Vulkan window surface</a> </dd>
|
||||
<dd>
|
||||
<a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a></dd></dl>
|
||||
<dl class="section since"><dt>Since</dt><dd>Added in version 3.2. </dd></dl>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
3427
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/group__window.html
vendored
Normal file
93
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/index.html
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Main Page</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div><div class="contents">
|
||||
<div class="textblock"><h1><a class="anchor" id="main_intro"></a>
|
||||
Introduction</h1>
|
||||
<p >GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc.</p>
|
||||
<p ><a class="el" href="news.html#news_33">Release notes for version 3.3</a> list new features, caveats and deprecations.</p>
|
||||
<p ><a class="el" href="quick_guide.html">Getting started</a> is a guide for users new to GLFW. It takes you through how to write a small but complete program.</p>
|
||||
<p >There are guides for each section of the API:</p>
|
||||
<ul>
|
||||
<li><a class="el" href="intro_guide.html">Introduction to the API</a> – initialization, error handling and high-level design</li>
|
||||
<li><a class="el" href="window_guide.html">Window guide</a> – creating and working with windows and framebuffers</li>
|
||||
<li><a class="el" href="context_guide.html">Context guide</a> – working with OpenGL and OpenGL ES contexts</li>
|
||||
<li><a class="el" href="vulkan_guide.html">Vulkan guide</a> - working with Vulkan objects and extensions</li>
|
||||
<li><a class="el" href="monitor_guide.html">Monitor guide</a> – enumerating and working with monitors and video modes</li>
|
||||
<li><a class="el" href="input_guide.html">Input guide</a> – receiving events, polling and processing input</li>
|
||||
</ul>
|
||||
<p >Once you have written a program, see <a class="el" href="compile_guide.html">Compiling GLFW</a> and <a class="el" href="build_guide.html">Building applications</a>.</p>
|
||||
<p >The <a href="modules.html">reference documentation</a> provides more detailed information about specific functions.</p>
|
||||
<p ><a class="el" href="moving_guide.html">Moving from GLFW 2 to 3</a> explains what has changed and how to update existing code to use the new API.</p>
|
||||
<p >There is a section on <a class="el" href="intro_guide.html#guarantees_limitations">Guarantees and limitations</a> for pointer lifetimes, reentrancy, thread safety, event order and backward and forward compatibility.</p>
|
||||
<p >The <a href="https://www.glfw.org/faq.html">FAQ</a> answers many common questions about the design, implementation and use of GLFW.</p>
|
||||
<p >Finally, <a class="el" href="compat_guide.html">Standards conformance</a> explains what APIs, standards and protocols GLFW uses and what happens when they are not present on a given machine.</p>
|
||||
<p >This documentation was generated with Doxygen. The sources for it are available in both the <a href="https://www.glfw.org/download.html">source distribution</a> and <a href="https://github.com/glfw/glfw">GitHub repository</a>. </p>
|
||||
</div></div><!-- PageDoc -->
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
74
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/input_8dox.html
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: input.dox File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">input.dox File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
562
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/input_guide.html
vendored
Normal file
@ -0,0 +1,562 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Input guide</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Input guide </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="toc"><h3>Table of Contents</h3>
|
||||
<ul><li class="level1"><a href="#events">Event processing</a></li>
|
||||
<li class="level1"><a href="#input_keyboard">Keyboard input</a><ul><li class="level2"><a href="#input_key">Key input</a></li>
|
||||
<li class="level2"><a href="#input_char">Text input</a></li>
|
||||
<li class="level2"><a href="#input_key_name">Key names</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level1"><a href="#input_mouse">Mouse input</a><ul><li class="level2"><a href="#cursor_pos">Cursor position</a></li>
|
||||
<li class="level2"><a href="#cursor_mode">Cursor mode</a></li>
|
||||
<li class="level2"><a href="#raw_mouse_motion">Raw mouse motion</a></li>
|
||||
<li class="level2"><a href="#cursor_object">Cursor objects</a><ul><li class="level3"><a href="#cursor_custom">Custom cursor creation</a></li>
|
||||
<li class="level3"><a href="#cursor_standard">Standard cursor creation</a></li>
|
||||
<li class="level3"><a href="#cursor_destruction">Cursor destruction</a></li>
|
||||
<li class="level3"><a href="#cursor_set">Cursor setting</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level2"><a href="#cursor_enter">Cursor enter/leave events</a></li>
|
||||
<li class="level2"><a href="#input_mouse_button">Mouse button input</a></li>
|
||||
<li class="level2"><a href="#scrolling">Scroll input</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level1"><a href="#joystick">Joystick input</a><ul><li class="level2"><a href="#joystick_axis">Joystick axis states</a></li>
|
||||
<li class="level2"><a href="#joystick_button">Joystick button states</a></li>
|
||||
<li class="level2"><a href="#joystick_hat">Joystick hat states</a></li>
|
||||
<li class="level2"><a href="#joystick_name">Joystick name</a></li>
|
||||
<li class="level2"><a href="#joystick_userptr">Joystick user pointer</a></li>
|
||||
<li class="level2"><a href="#joystick_event">Joystick configuration changes</a></li>
|
||||
<li class="level2"><a href="#gamepad">Gamepad input</a></li>
|
||||
<li class="level2"><a href="#gamepad_mapping">Gamepad mappings</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level1"><a href="#time">Time input</a></li>
|
||||
<li class="level1"><a href="#clipboard">Clipboard input and output</a></li>
|
||||
<li class="level1"><a href="#path_drop">Path drop input</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="textblock"><p >This guide introduces the input related functions of GLFW. For details on a specific function in this category, see the <a class="el" href="group__input.html">Input reference</a>. There are also guides for the other areas of GLFW.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="intro_guide.html">Introduction to the API</a></li>
|
||||
<li><a class="el" href="window_guide.html">Window guide</a></li>
|
||||
<li><a class="el" href="context_guide.html">Context guide</a></li>
|
||||
<li><a class="el" href="vulkan_guide.html">Vulkan guide</a></li>
|
||||
<li><a class="el" href="monitor_guide.html">Monitor guide</a></li>
|
||||
</ul>
|
||||
<p >GLFW provides many kinds of input. While some can only be polled, like time, or only received via callbacks, like scrolling, many provide both callbacks and polling. Callbacks are more work to use than polling but is less CPU intensive and guarantees that you do not miss state changes.</p>
|
||||
<p >All input callbacks receive a window handle. By using the <a class="el" href="window_guide.html#window_userptr">window user pointer</a>, you can access non-global structures or objects from your callbacks.</p>
|
||||
<p >To get a better feel for how the various events callbacks behave, run the <code>events</code> test program. It register every callback supported by GLFW and prints out all arguments provided for every event, along with time and sequence information.</p>
|
||||
<h1><a class="anchor" id="events"></a>
|
||||
Event processing</h1>
|
||||
<p >GLFW needs to poll the window system for events both to provide input to the application and to prove to the window system that the application hasn't locked up. Event processing is normally done each frame after <a class="el" href="window_guide.html#buffer_swap">buffer swapping</a>. Even when you have no windows, event polling needs to be done in order to receive monitor and joystick connection events.</p>
|
||||
<p >There are three functions for processing pending events. <a class="el" href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">glfwPollEvents</a>, processes only those events that have already been received and then returns immediately.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">glfwPollEvents</a>();</div>
|
||||
<div class="ttc" id="agroup__window_html_ga37bd57223967b4211d60ca1a0bf3c832"><div class="ttname"><a href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">glfwPollEvents</a></div><div class="ttdeci">void glfwPollEvents(void)</div><div class="ttdoc">Processes all pending events.</div></div>
|
||||
</div><!-- fragment --><p >This is the best choice when rendering continuously, like most games do.</p>
|
||||
<p >If you only need to update the contents of the window when you receive new input, <a class="el" href="group__window.html#ga554e37d781f0a997656c26b2c56c835e">glfwWaitEvents</a> is a better choice.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga554e37d781f0a997656c26b2c56c835e">glfwWaitEvents</a>();</div>
|
||||
<div class="ttc" id="agroup__window_html_ga554e37d781f0a997656c26b2c56c835e"><div class="ttname"><a href="group__window.html#ga554e37d781f0a997656c26b2c56c835e">glfwWaitEvents</a></div><div class="ttdeci">void glfwWaitEvents(void)</div><div class="ttdoc">Waits until events are queued and processes them.</div></div>
|
||||
</div><!-- fragment --><p >It puts the thread to sleep until at least one event has been received and then processes all received events. This saves a great deal of CPU cycles and is useful for, for example, editing tools.</p>
|
||||
<p >If you want to wait for events but have UI elements or other tasks that need periodic updates, <a class="el" href="group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf">glfwWaitEventsTimeout</a> lets you specify a timeout.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf">glfwWaitEventsTimeout</a>(0.7);</div>
|
||||
<div class="ttc" id="agroup__window_html_ga605a178db92f1a7f1a925563ef3ea2cf"><div class="ttname"><a href="group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf">glfwWaitEventsTimeout</a></div><div class="ttdeci">void glfwWaitEventsTimeout(double timeout)</div><div class="ttdoc">Waits with timeout until events are queued and processes them.</div></div>
|
||||
</div><!-- fragment --><p >It puts the thread to sleep until at least one event has been received, or until the specified number of seconds have elapsed. It then processes any received events.</p>
|
||||
<p >If the main thread is sleeping in <a class="el" href="group__window.html#ga554e37d781f0a997656c26b2c56c835e">glfwWaitEvents</a>, you can wake it from another thread by posting an empty event to the event queue with <a class="el" href="group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9">glfwPostEmptyEvent</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9">glfwPostEmptyEvent</a>();</div>
|
||||
<div class="ttc" id="agroup__window_html_gab5997a25187e9fd5c6f2ecbbc8dfd7e9"><div class="ttname"><a href="group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9">glfwPostEmptyEvent</a></div><div class="ttdeci">void glfwPostEmptyEvent(void)</div><div class="ttdoc">Posts an empty event to the event queue.</div></div>
|
||||
</div><!-- fragment --><p >Do not assume that callbacks will <em>only</em> be called in response to the above functions. While it is necessary to process events in one or more of the ways above, window systems that require GLFW to register callbacks of its own can pass events to GLFW in response to many window system function calls. GLFW will pass those events on to the application callbacks before returning.</p>
|
||||
<p >For example, on Windows the system function that <a class="el" href="group__window.html#ga371911f12c74c504dd8d47d832d095cb">glfwSetWindowSize</a> is implemented with will send window size events directly to the event callback that every window has and that GLFW implements for its windows. If you have set a <a class="el" href="window_guide.html#window_size">window size callback</a> GLFW will call it in turn with the new size before everything returns back out of the <a class="el" href="group__window.html#ga371911f12c74c504dd8d47d832d095cb">glfwSetWindowSize</a> call.</p>
|
||||
<h1><a class="anchor" id="input_keyboard"></a>
|
||||
Keyboard input</h1>
|
||||
<p >GLFW divides keyboard input into two categories; key events and character events. Key events relate to actual physical keyboard keys, whereas character events relate to the Unicode code points generated by pressing some of them.</p>
|
||||
<p >Keys and characters do not map 1:1. A single key press may produce several characters, and a single character may require several keys to produce. This may not be the case on your machine, but your users are likely not all using the same keyboard layout, input method or even operating system as you.</p>
|
||||
<h2><a class="anchor" id="input_key"></a>
|
||||
Key input</h2>
|
||||
<p >If you wish to be notified when a physical key is pressed or released or when it repeats, set a key callback.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#ga1caf18159767e761185e49a3be019f8d">glfwSetKeyCallback</a>(window, key_callback);</div>
|
||||
<div class="ttc" id="agroup__input_html_ga1caf18159767e761185e49a3be019f8d"><div class="ttname"><a href="group__input.html#ga1caf18159767e761185e49a3be019f8d">glfwSetKeyCallback</a></div><div class="ttdeci">GLFWkeyfun glfwSetKeyCallback(GLFWwindow *window, GLFWkeyfun callback)</div><div class="ttdoc">Sets the key callback.</div></div>
|
||||
</div><!-- fragment --><p >The callback function receives the <a class="el" href="group__keys.html">keyboard key</a>, platform-specific scancode, key action and <a class="el" href="group__mods.html">modifier bits</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> key_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span> key, <span class="keywordtype">int</span> scancode, <span class="keywordtype">int</span> action, <span class="keywordtype">int</span> mods)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">if</span> (key == <a class="code hl_define" href="group__keys.html#gabf48fcc3afbe69349df432b470c96ef2">GLFW_KEY_E</a> && action == <a class="code hl_define" href="group__input.html#ga2485743d0b59df3791c45951c4195265">GLFW_PRESS</a>)</div>
|
||||
<div class="line"> activate_airship();</div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="agroup__input_html_ga2485743d0b59df3791c45951c4195265"><div class="ttname"><a href="group__input.html#ga2485743d0b59df3791c45951c4195265">GLFW_PRESS</a></div><div class="ttdeci">#define GLFW_PRESS</div><div class="ttdoc">The key or mouse button was pressed.</div><div class="ttdef"><b>Definition:</b> glfw3.h:338</div></div>
|
||||
<div class="ttc" id="agroup__keys_html_gabf48fcc3afbe69349df432b470c96ef2"><div class="ttname"><a href="group__keys.html#gabf48fcc3afbe69349df432b470c96ef2">GLFW_KEY_E</a></div><div class="ttdeci">#define GLFW_KEY_E</div><div class="ttdef"><b>Definition:</b> glfw3.h:416</div></div>
|
||||
<div class="ttc" id="agroup__window_html_ga3c96d80d363e67d13a41b5d1821f3242"><div class="ttname"><a href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a></div><div class="ttdeci">struct GLFWwindow GLFWwindow</div><div class="ttdoc">Opaque window object.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1185</div></div>
|
||||
</div><!-- fragment --><p >The action is one of <code>GLFW_PRESS</code>, <code>GLFW_REPEAT</code> or <code>GLFW_RELEASE</code>. Events with <code>GLFW_PRESS</code> and <code>GLFW_RELEASE</code> actions are emitted for every key press. Most keys will also emit events with <code>GLFW_REPEAT</code> actions while a key is held down.</p>
|
||||
<p >Key events with <code>GLFW_REPEAT</code> actions are intended for text input. They are emitted at the rate set in the user's keyboard settings. At most one key is repeated even if several keys are held down. <code>GLFW_REPEAT</code> actions should not be relied on to know which keys are being held down or to drive animation. Instead you should either save the state of relevant keys based on <code>GLFW_PRESS</code> and <code>GLFW_RELEASE</code> actions, or call <a class="el" href="group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2">glfwGetKey</a>, which provides basic cached key state.</p>
|
||||
<p >The key will be one of the existing <a class="el" href="group__keys.html">key tokens</a>, or <code>GLFW_KEY_UNKNOWN</code> if GLFW lacks a token for it, for example <em>E-mail</em> and <em>Play</em> keys.</p>
|
||||
<p >The scancode is unique for every key, regardless of whether it has a key token. Scancodes are platform-specific but consistent over time, so keys will have different scancodes depending on the platform but they are safe to save to disk. You can query the scancode for any <a class="el" href="group__keys.html">named key</a> on the current platform with <a class="el" href="group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a">glfwGetKeyScancode</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">int</span> scancode = <a class="code hl_function" href="group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a">glfwGetKeyScancode</a>(<a class="code hl_define" href="group__keys.html#gac1c42c0bf4192cea713c55598b06b744">GLFW_KEY_X</a>);</div>
|
||||
<div class="line">set_key_mapping(scancode, swap_weapons);</div>
|
||||
<div class="ttc" id="agroup__input_html_ga67ddd1b7dcbbaff03e4a76c0ea67103a"><div class="ttname"><a href="group__input.html#ga67ddd1b7dcbbaff03e4a76c0ea67103a">glfwGetKeyScancode</a></div><div class="ttdeci">int glfwGetKeyScancode(int key)</div><div class="ttdoc">Returns the platform-specific scancode of the specified key.</div></div>
|
||||
<div class="ttc" id="agroup__keys_html_gac1c42c0bf4192cea713c55598b06b744"><div class="ttname"><a href="group__keys.html#gac1c42c0bf4192cea713c55598b06b744">GLFW_KEY_X</a></div><div class="ttdeci">#define GLFW_KEY_X</div><div class="ttdef"><b>Definition:</b> glfw3.h:435</div></div>
|
||||
</div><!-- fragment --><p >The last reported state for every <a class="el" href="group__keys.html">named key</a> is also saved in per-window state arrays that can be polled with <a class="el" href="group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2">glfwGetKey</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> state = <a class="code hl_function" href="group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2">glfwGetKey</a>(window, <a class="code hl_define" href="group__keys.html#gabf48fcc3afbe69349df432b470c96ef2">GLFW_KEY_E</a>);</div>
|
||||
<div class="line"><span class="keywordflow">if</span> (state == <a class="code hl_define" href="group__input.html#ga2485743d0b59df3791c45951c4195265">GLFW_PRESS</a>)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> activate_airship();</div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="agroup__input_html_gadd341da06bc8d418b4dc3a3518af9ad2"><div class="ttname"><a href="group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2">glfwGetKey</a></div><div class="ttdeci">int glfwGetKey(GLFWwindow *window, int key)</div><div class="ttdoc">Returns the last reported state of a keyboard key for the specified window.</div></div>
|
||||
</div><!-- fragment --><p >The returned state is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>
|
||||
<p >This function only returns cached key event state. It does not poll the system for the current physical state of the key.</p>
|
||||
<p ><a class="anchor" id="GLFW_STICKY_KEYS"></a>Whenever you poll state, you risk missing the state change you are looking for. If a pressed key is released again before you poll its state, you will have missed the key press. The recommended solution for this is to use a key callback, but there is also the <code>GLFW_STICKY_KEYS</code> input mode.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a>(window, <a class="code hl_define" href="glfw3_8h.html#ae3bbe2315b7691ab088159eb6c9110fc">GLFW_STICKY_KEYS</a>, <a class="code hl_define" href="group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba">GLFW_TRUE</a>);</div>
|
||||
<div class="ttc" id="aglfw3_8h_html_ae3bbe2315b7691ab088159eb6c9110fc"><div class="ttname"><a href="glfw3_8h.html#ae3bbe2315b7691ab088159eb6c9110fc">GLFW_STICKY_KEYS</a></div><div class="ttdeci">#define GLFW_STICKY_KEYS</div><div class="ttdef"><b>Definition:</b> glfw3.h:1049</div></div>
|
||||
<div class="ttc" id="agroup__init_html_ga2744fbb29b5631bb28802dbe0cf36eba"><div class="ttname"><a href="group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba">GLFW_TRUE</a></div><div class="ttdeci">#define GLFW_TRUE</div><div class="ttdoc">One.</div><div class="ttdef"><b>Definition:</b> glfw3.h:312</div></div>
|
||||
<div class="ttc" id="agroup__input_html_gaa92336e173da9c8834558b54ee80563b"><div class="ttname"><a href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a></div><div class="ttdeci">void glfwSetInputMode(GLFWwindow *window, int mode, int value)</div><div class="ttdoc">Sets an input option for the specified window.</div></div>
|
||||
</div><!-- fragment --><p >When sticky keys mode is enabled, the pollable state of a key will remain <code>GLFW_PRESS</code> until the state of that key is polled with <a class="el" href="group__input.html#gadd341da06bc8d418b4dc3a3518af9ad2">glfwGetKey</a>. Once it has been polled, if a key release event had been processed in the meantime, the state will reset to <code>GLFW_RELEASE</code>, otherwise it will remain <code>GLFW_PRESS</code>.</p>
|
||||
<p ><a class="anchor" id="GLFW_LOCK_KEY_MODS"></a>If you wish to know what the state of the Caps Lock and Num Lock keys was when input events were generated, set the <code>GLFW_LOCK_KEY_MODS</code> input mode.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a>(window, <a class="code hl_define" href="glfw3_8h.html#a07b84de0b52143e1958f88a7d9105947">GLFW_LOCK_KEY_MODS</a>, <a class="code hl_define" href="group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba">GLFW_TRUE</a>);</div>
|
||||
<div class="ttc" id="aglfw3_8h_html_a07b84de0b52143e1958f88a7d9105947"><div class="ttname"><a href="glfw3_8h.html#a07b84de0b52143e1958f88a7d9105947">GLFW_LOCK_KEY_MODS</a></div><div class="ttdeci">#define GLFW_LOCK_KEY_MODS</div><div class="ttdef"><b>Definition:</b> glfw3.h:1051</div></div>
|
||||
</div><!-- fragment --><p >When this input mode is enabled, any callback that receives <a class="el" href="group__mods.html">modifier bits</a> will have the <a class="el" href="group__mods.html#gaefeef8fcf825a6e43e241b337897200f">GLFW_MOD_CAPS_LOCK</a> bit set if Caps Lock was on when the event occurred and the <a class="el" href="group__mods.html#ga64e020b8a42af8376e944baf61feecbe">GLFW_MOD_NUM_LOCK</a> bit set if Num Lock was on.</p>
|
||||
<p >The <code>GLFW_KEY_LAST</code> constant holds the highest value of any <a class="el" href="group__keys.html">named key</a>.</p>
|
||||
<h2><a class="anchor" id="input_char"></a>
|
||||
Text input</h2>
|
||||
<p >GLFW supports text input in the form of a stream of <a href="https://en.wikipedia.org/wiki/Unicode">Unicode code points</a>, as produced by the operating system text input system. Unlike key input, text input obeys keyboard layouts and modifier keys and supports composing characters using <a href="https://en.wikipedia.org/wiki/Dead_key">dead keys</a>. Once received, you can encode the code points into UTF-8 or any other encoding you prefer.</p>
|
||||
<p >Because an <code>unsigned int</code> is 32 bits long on all platforms supported by GLFW, you can treat the code point argument as native endian UTF-32.</p>
|
||||
<p >If you wish to offer regular text input, set a character callback.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gab25c4a220fd8f5717718dbc487828996">glfwSetCharCallback</a>(window, character_callback);</div>
|
||||
<div class="ttc" id="agroup__input_html_gab25c4a220fd8f5717718dbc487828996"><div class="ttname"><a href="group__input.html#gab25c4a220fd8f5717718dbc487828996">glfwSetCharCallback</a></div><div class="ttdeci">GLFWcharfun glfwSetCharCallback(GLFWwindow *window, GLFWcharfun callback)</div><div class="ttdoc">Sets the Unicode character callback.</div></div>
|
||||
</div><!-- fragment --><p >The callback function receives Unicode code points for key events that would have led to regular text input and generally behaves as a standard text field on that platform.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> character_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> codepoint)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="input_key_name"></a>
|
||||
Key names</h2>
|
||||
<p >If you wish to refer to keys by name, you can query the keyboard layout dependent name of printable keys with <a class="el" href="group__input.html#gaeaed62e69c3bd62b7ff8f7b19913ce4f">glfwGetKeyName</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* key_name = <a class="code hl_function" href="group__input.html#gaeaed62e69c3bd62b7ff8f7b19913ce4f">glfwGetKeyName</a>(<a class="code hl_define" href="group__keys.html#gaa06a712e6202661fc03da5bdb7b6e545">GLFW_KEY_W</a>, 0);</div>
|
||||
<div class="line">show_tutorial_hint(<span class="stringliteral">"Press %s to move forward"</span>, key_name);</div>
|
||||
<div class="ttc" id="agroup__input_html_gaeaed62e69c3bd62b7ff8f7b19913ce4f"><div class="ttname"><a href="group__input.html#gaeaed62e69c3bd62b7ff8f7b19913ce4f">glfwGetKeyName</a></div><div class="ttdeci">const char * glfwGetKeyName(int key, int scancode)</div><div class="ttdoc">Returns the layout-specific name of the specified printable key.</div></div>
|
||||
<div class="ttc" id="agroup__keys_html_gaa06a712e6202661fc03da5bdb7b6e545"><div class="ttname"><a href="group__keys.html#gaa06a712e6202661fc03da5bdb7b6e545">GLFW_KEY_W</a></div><div class="ttdeci">#define GLFW_KEY_W</div><div class="ttdef"><b>Definition:</b> glfw3.h:434</div></div>
|
||||
</div><!-- fragment --><p >This function can handle both <a class="el" href="input_guide.html#input_key">keys and scancodes</a>. If the specified key is <code>GLFW_KEY_UNKNOWN</code> then the scancode is used, otherwise it is ignored. This matches the behavior of the key callback, meaning the callback arguments can always be passed unmodified to this function.</p>
|
||||
<h1><a class="anchor" id="input_mouse"></a>
|
||||
Mouse input</h1>
|
||||
<p >Mouse input comes in many forms, including mouse motion, button presses and scrolling offsets. The cursor appearance can also be changed, either to a custom image or a standard cursor shape from the system theme.</p>
|
||||
<h2><a class="anchor" id="cursor_pos"></a>
|
||||
Cursor position</h2>
|
||||
<p >If you wish to be notified when the cursor moves over the window, set a cursor position callback.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gac1f879ab7435d54d4d79bb469fe225d7">glfwSetCursorPosCallback</a>(window, cursor_position_callback);</div>
|
||||
<div class="ttc" id="agroup__input_html_gac1f879ab7435d54d4d79bb469fe225d7"><div class="ttname"><a href="group__input.html#gac1f879ab7435d54d4d79bb469fe225d7">glfwSetCursorPosCallback</a></div><div class="ttdeci">GLFWcursorposfun glfwSetCursorPosCallback(GLFWwindow *window, GLFWcursorposfun callback)</div><div class="ttdoc">Sets the cursor position callback.</div></div>
|
||||
</div><!-- fragment --><p >The callback functions receives the cursor position, measured in screen coordinates but relative to the top-left corner of the window content area. On platforms that provide it, the full sub-pixel cursor position is passed on.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">static</span> <span class="keywordtype">void</span> cursor_position_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">double</span> xpos, <span class="keywordtype">double</span> ypos)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p >The cursor position is also saved per-window and can be polled with <a class="el" href="group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc">glfwGetCursorPos</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">double</span> xpos, ypos;</div>
|
||||
<div class="line"><a class="code hl_function" href="group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc">glfwGetCursorPos</a>(window, &xpos, &ypos);</div>
|
||||
<div class="ttc" id="agroup__input_html_ga01d37b6c40133676b9cea60ca1d7c0cc"><div class="ttname"><a href="group__input.html#ga01d37b6c40133676b9cea60ca1d7c0cc">glfwGetCursorPos</a></div><div class="ttdeci">void glfwGetCursorPos(GLFWwindow *window, double *xpos, double *ypos)</div><div class="ttdoc">Retrieves the position of the cursor relative to the content area of the window.</div></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="cursor_mode"></a>
|
||||
Cursor mode</h2>
|
||||
<p ><a class="anchor" id="GLFW_CURSOR"></a>The <code>GLFW_CURSOR</code> input mode provides several cursor modes for special forms of mouse motion input. By default, the cursor mode is <code>GLFW_CURSOR_NORMAL</code>, meaning the regular arrow cursor (or another cursor set with <a class="el" href="group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e">glfwSetCursor</a>) is used and cursor motion is not limited.</p>
|
||||
<p >If you wish to implement mouse motion based camera controls or other input schemes that require unlimited mouse movement, set the cursor mode to <code>GLFW_CURSOR_DISABLED</code>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a>(window, <a class="code hl_define" href="glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c">GLFW_CURSOR</a>, <a class="code hl_define" href="glfw3_8h.html#a2315b99a329ce53e6a13a9d46fd5ca88">GLFW_CURSOR_DISABLED</a>);</div>
|
||||
<div class="ttc" id="aglfw3_8h_html_a2315b99a329ce53e6a13a9d46fd5ca88"><div class="ttname"><a href="glfw3_8h.html#a2315b99a329ce53e6a13a9d46fd5ca88">GLFW_CURSOR_DISABLED</a></div><div class="ttdeci">#define GLFW_CURSOR_DISABLED</div><div class="ttdef"><b>Definition:</b> glfw3.h:1056</div></div>
|
||||
<div class="ttc" id="aglfw3_8h_html_aade31da5b884a84a7625c6b059b9132c"><div class="ttname"><a href="glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c">GLFW_CURSOR</a></div><div class="ttdeci">#define GLFW_CURSOR</div><div class="ttdef"><b>Definition:</b> glfw3.h:1048</div></div>
|
||||
</div><!-- fragment --><p >This will hide the cursor and lock it to the specified window. GLFW will then take care of all the details of cursor re-centering and offset calculation and providing the application with a virtual cursor position. This virtual position is provided normally via both the cursor position callback and through polling.</p>
|
||||
<dl class="section note"><dt>Note</dt><dd>You should not implement your own version of this functionality using other features of GLFW. It is not supported and will not work as robustly as <code>GLFW_CURSOR_DISABLED</code>.</dd></dl>
|
||||
<p>If you only wish the cursor to become hidden when it is over a window but still want it to behave normally, set the cursor mode to <code>GLFW_CURSOR_HIDDEN</code>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a>(window, <a class="code hl_define" href="glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c">GLFW_CURSOR</a>, <a class="code hl_define" href="glfw3_8h.html#ac4d5cb9d78de8573349c58763d53bf11">GLFW_CURSOR_HIDDEN</a>);</div>
|
||||
<div class="ttc" id="aglfw3_8h_html_ac4d5cb9d78de8573349c58763d53bf11"><div class="ttname"><a href="glfw3_8h.html#ac4d5cb9d78de8573349c58763d53bf11">GLFW_CURSOR_HIDDEN</a></div><div class="ttdeci">#define GLFW_CURSOR_HIDDEN</div><div class="ttdef"><b>Definition:</b> glfw3.h:1055</div></div>
|
||||
</div><!-- fragment --><p >This mode puts no limit on the motion of the cursor.</p>
|
||||
<p >To exit out of either of these special modes, restore the <code>GLFW_CURSOR_NORMAL</code> cursor mode.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a>(window, <a class="code hl_define" href="glfw3_8h.html#aade31da5b884a84a7625c6b059b9132c">GLFW_CURSOR</a>, <a class="code hl_define" href="glfw3_8h.html#ae04dd25c8577e19fa8c97368561f6c68">GLFW_CURSOR_NORMAL</a>);</div>
|
||||
<div class="ttc" id="aglfw3_8h_html_ae04dd25c8577e19fa8c97368561f6c68"><div class="ttname"><a href="glfw3_8h.html#ae04dd25c8577e19fa8c97368561f6c68">GLFW_CURSOR_NORMAL</a></div><div class="ttdeci">#define GLFW_CURSOR_NORMAL</div><div class="ttdef"><b>Definition:</b> glfw3.h:1054</div></div>
|
||||
</div><!-- fragment --><p ><a class="anchor" id="GLFW_RAW_MOUSE_MOTION"></a></p>
|
||||
<h2><a class="anchor" id="raw_mouse_motion"></a>
|
||||
Raw mouse motion</h2>
|
||||
<p >When the cursor is disabled, raw (unscaled and unaccelerated) mouse motion can be enabled if available.</p>
|
||||
<p >Raw mouse motion is closer to the actual motion of the mouse across a surface. It is not affected by the scaling and acceleration applied to the motion of the desktop cursor. That processing is suitable for a cursor while raw motion is better for controlling for example a 3D camera. Because of this, raw mouse motion is only provided when the cursor is disabled.</p>
|
||||
<p >Call <a class="el" href="group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2">glfwRawMouseMotionSupported</a> to check if the current machine provides raw motion and set the <code>GLFW_RAW_MOUSE_MOTION</code> input mode to enable it. It is disabled by default.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (<a class="code hl_function" href="group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2">glfwRawMouseMotionSupported</a>())</div>
|
||||
<div class="line"> <a class="code hl_function" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a>(window, <a class="code hl_define" href="glfw3_8h.html#aeeda1be76a44a1fc97c1282e06281fbb">GLFW_RAW_MOUSE_MOTION</a>, <a class="code hl_define" href="group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba">GLFW_TRUE</a>);</div>
|
||||
<div class="ttc" id="aglfw3_8h_html_aeeda1be76a44a1fc97c1282e06281fbb"><div class="ttname"><a href="glfw3_8h.html#aeeda1be76a44a1fc97c1282e06281fbb">GLFW_RAW_MOUSE_MOTION</a></div><div class="ttdeci">#define GLFW_RAW_MOUSE_MOTION</div><div class="ttdef"><b>Definition:</b> glfw3.h:1052</div></div>
|
||||
<div class="ttc" id="agroup__input_html_gae4ee0dbd0d256183e1ea4026d897e1c2"><div class="ttname"><a href="group__input.html#gae4ee0dbd0d256183e1ea4026d897e1c2">glfwRawMouseMotionSupported</a></div><div class="ttdeci">int glfwRawMouseMotionSupported(void)</div><div class="ttdoc">Returns whether raw mouse motion is supported.</div></div>
|
||||
</div><!-- fragment --><p >If supported, raw mouse motion can be enabled or disabled per-window and at any time but it will only be provided when the cursor is disabled.</p>
|
||||
<h2><a class="anchor" id="cursor_object"></a>
|
||||
Cursor objects</h2>
|
||||
<p >GLFW supports creating both custom and system theme cursor images, encapsulated as <a class="el" href="group__input.html#ga89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a> objects. They are created with <a class="el" href="group__input.html#ga556f604f73af156c0db0e97c081373c3">glfwCreateCursor</a> or <a class="el" href="group__input.html#gaf2fb2eb2c9dd842d1cef8a34e3c6403e">glfwCreateStandardCursor</a> and destroyed with <a class="el" href="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a">glfwDestroyCursor</a>, or <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>, if any remain.</p>
|
||||
<h3><a class="anchor" id="cursor_custom"></a>
|
||||
Custom cursor creation</h3>
|
||||
<p >A custom cursor is created with <a class="el" href="group__input.html#ga556f604f73af156c0db0e97c081373c3">glfwCreateCursor</a>, which returns a handle to the created cursor object. For example, this creates a 16x16 white square cursor with the hot-spot in the upper-left corner:</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> pixels[16 * 16 * 4];</div>
|
||||
<div class="line">memset(pixels, 0xff, <span class="keyword">sizeof</span>(pixels));</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><a class="code hl_struct" href="structGLFWimage.html">GLFWimage</a> image;</div>
|
||||
<div class="line">image.<a class="code hl_variable" href="structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835">width</a> = 16;</div>
|
||||
<div class="line">image.<a class="code hl_variable" href="structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec">height</a> = 16;</div>
|
||||
<div class="line">image.<a class="code hl_variable" href="structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb">pixels</a> = pixels;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><a class="code hl_typedef" href="group__input.html#ga89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a>* cursor = <a class="code hl_function" href="group__input.html#ga556f604f73af156c0db0e97c081373c3">glfwCreateCursor</a>(&image, 0, 0);</div>
|
||||
<div class="ttc" id="agroup__input_html_ga556f604f73af156c0db0e97c081373c3"><div class="ttname"><a href="group__input.html#ga556f604f73af156c0db0e97c081373c3">glfwCreateCursor</a></div><div class="ttdeci">GLFWcursor * glfwCreateCursor(const GLFWimage *image, int xhot, int yhot)</div><div class="ttdoc">Creates a custom cursor.</div></div>
|
||||
<div class="ttc" id="agroup__input_html_ga89261ae18c75e863aaf2656ecdd238f4"><div class="ttname"><a href="group__input.html#ga89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a></div><div class="ttdeci">struct GLFWcursor GLFWcursor</div><div class="ttdoc">Opaque cursor object.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1197</div></div>
|
||||
<div class="ttc" id="astructGLFWimage_html"><div class="ttname"><a href="structGLFWimage.html">GLFWimage</a></div><div class="ttdoc">Image data.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1721</div></div>
|
||||
<div class="ttc" id="astructGLFWimage_html_a0b7d95368f0c80d5e5c9875057c7dbec"><div class="ttname"><a href="structGLFWimage.html#a0b7d95368f0c80d5e5c9875057c7dbec">GLFWimage::height</a></div><div class="ttdeci">int height</div><div class="ttdef"><b>Definition:</b> glfw3.h:1727</div></div>
|
||||
<div class="ttc" id="astructGLFWimage_html_a0c532a5c2bb715555279b7817daba0fb"><div class="ttname"><a href="structGLFWimage.html#a0c532a5c2bb715555279b7817daba0fb">GLFWimage::pixels</a></div><div class="ttdeci">unsigned char * pixels</div><div class="ttdef"><b>Definition:</b> glfw3.h:1730</div></div>
|
||||
<div class="ttc" id="astructGLFWimage_html_af6a71cc999fe6d3aea31dd7e9687d835"><div class="ttname"><a href="structGLFWimage.html#af6a71cc999fe6d3aea31dd7e9687d835">GLFWimage::width</a></div><div class="ttdeci">int width</div><div class="ttdef"><b>Definition:</b> glfw3.h:1724</div></div>
|
||||
</div><!-- fragment --><p >If cursor creation fails, <code>NULL</code> will be returned, so it is necessary to check the return value.</p>
|
||||
<p >The image data is 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. The pixels are arranged canonically as sequential rows, starting from the top-left corner.</p>
|
||||
<h3><a class="anchor" id="cursor_standard"></a>
|
||||
Standard cursor creation</h3>
|
||||
<p >A cursor with a <a class="el" href="group__shapes.html">standard shape</a> from the current system cursor theme can be can be created with <a class="el" href="group__input.html#gaf2fb2eb2c9dd842d1cef8a34e3c6403e">glfwCreateStandardCursor</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_typedef" href="group__input.html#ga89261ae18c75e863aaf2656ecdd238f4">GLFWcursor</a>* cursor = <a class="code hl_function" href="group__input.html#gaf2fb2eb2c9dd842d1cef8a34e3c6403e">glfwCreateStandardCursor</a>(<a class="code hl_define" href="group__shapes.html#gabb3eb0109f11bb808fc34659177ca962">GLFW_HRESIZE_CURSOR</a>);</div>
|
||||
<div class="ttc" id="agroup__input_html_gaf2fb2eb2c9dd842d1cef8a34e3c6403e"><div class="ttname"><a href="group__input.html#gaf2fb2eb2c9dd842d1cef8a34e3c6403e">glfwCreateStandardCursor</a></div><div class="ttdeci">GLFWcursor * glfwCreateStandardCursor(int shape)</div><div class="ttdoc">Creates a cursor with a standard shape.</div></div>
|
||||
<div class="ttc" id="agroup__shapes_html_gabb3eb0109f11bb808fc34659177ca962"><div class="ttname"><a href="group__shapes.html#gabb3eb0109f11bb808fc34659177ca962">GLFW_HRESIZE_CURSOR</a></div><div class="ttdeci">#define GLFW_HRESIZE_CURSOR</div><div class="ttdoc">The horizontal resize arrow shape.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1098</div></div>
|
||||
</div><!-- fragment --><p >These cursor objects behave in the exact same way as those created with <a class="el" href="group__input.html#ga556f604f73af156c0db0e97c081373c3">glfwCreateCursor</a> except that the system cursor theme provides the actual image.</p>
|
||||
<h3><a class="anchor" id="cursor_destruction"></a>
|
||||
Cursor destruction</h3>
|
||||
<p >When a cursor is no longer needed, destroy it with <a class="el" href="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a">glfwDestroyCursor</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a">glfwDestroyCursor</a>(cursor);</div>
|
||||
<div class="ttc" id="agroup__input_html_ga81b952cd1764274d0db7fb3c5a79ba6a"><div class="ttname"><a href="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a">glfwDestroyCursor</a></div><div class="ttdeci">void glfwDestroyCursor(GLFWcursor *cursor)</div><div class="ttdoc">Destroys a cursor.</div></div>
|
||||
</div><!-- fragment --><p >Cursor destruction always succeeds. If the cursor is current for any window, that window will revert to the default cursor. This does not affect the cursor mode. All remaining cursors are destroyed when <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> is called.</p>
|
||||
<h3><a class="anchor" id="cursor_set"></a>
|
||||
Cursor setting</h3>
|
||||
<p >A cursor can be set as current for a window with <a class="el" href="group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e">glfwSetCursor</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e">glfwSetCursor</a>(window, cursor);</div>
|
||||
<div class="ttc" id="agroup__input_html_gad3b4f38c8d5dae036bc8fa959e18343e"><div class="ttname"><a href="group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e">glfwSetCursor</a></div><div class="ttdeci">void glfwSetCursor(GLFWwindow *window, GLFWcursor *cursor)</div><div class="ttdoc">Sets the cursor for the window.</div></div>
|
||||
</div><!-- fragment --><p >Once set, the cursor image will be used as long as the system cursor is over the content area of the window and the <a class="el" href="input_guide.html#cursor_mode">cursor mode</a> is set to <code>GLFW_CURSOR_NORMAL</code>.</p>
|
||||
<p >A single cursor may be set for any number of windows.</p>
|
||||
<p >To revert to the default cursor, set the cursor of that window to <code>NULL</code>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gad3b4f38c8d5dae036bc8fa959e18343e">glfwSetCursor</a>(window, NULL);</div>
|
||||
</div><!-- fragment --><p >When a cursor is destroyed, any window that has it set will revert to the default cursor. This does not affect the cursor mode.</p>
|
||||
<h2><a class="anchor" id="cursor_enter"></a>
|
||||
Cursor enter/leave events</h2>
|
||||
<p >If you wish to be notified when the cursor enters or leaves the content area of a window, set a cursor enter/leave callback.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gad27f8ad0142c038a281466c0966817d8">glfwSetCursorEnterCallback</a>(window, cursor_enter_callback);</div>
|
||||
<div class="ttc" id="agroup__input_html_gad27f8ad0142c038a281466c0966817d8"><div class="ttname"><a href="group__input.html#gad27f8ad0142c038a281466c0966817d8">glfwSetCursorEnterCallback</a></div><div class="ttdeci">GLFWcursorenterfun glfwSetCursorEnterCallback(GLFWwindow *window, GLFWcursorenterfun callback)</div><div class="ttdoc">Sets the cursor enter/leave callback.</div></div>
|
||||
</div><!-- fragment --><p >The callback function receives the new classification of the cursor.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> cursor_enter_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span> entered)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">if</span> (entered)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// The cursor entered the content area of the window</span></div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordflow">else</span></div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// The cursor left the content area of the window</span></div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p >You can query whether the cursor is currently inside the content area of the window with the <a class="el" href="window_guide.html#GLFW_HOVERED_attrib">GLFW_HOVERED</a> window attribute.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (<a class="code hl_function" href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a>(window, <a class="code hl_define" href="group__window.html#ga8665c71c6fa3d22425c6a0e8a3f89d8a">GLFW_HOVERED</a>))</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> highlight_interface();</div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="agroup__window_html_ga8665c71c6fa3d22425c6a0e8a3f89d8a"><div class="ttname"><a href="group__window.html#ga8665c71c6fa3d22425c6a0e8a3f89d8a">GLFW_HOVERED</a></div><div class="ttdeci">#define GLFW_HOVERED</div><div class="ttdoc">Mouse cursor hover window attribute.</div><div class="ttdef"><b>Definition:</b> glfw3.h:855</div></div>
|
||||
<div class="ttc" id="agroup__window_html_gacccb29947ea4b16860ebef42c2cb9337"><div class="ttname"><a href="group__window.html#gacccb29947ea4b16860ebef42c2cb9337">glfwGetWindowAttrib</a></div><div class="ttdeci">int glfwGetWindowAttrib(GLFWwindow *window, int attrib)</div><div class="ttdoc">Returns an attribute of the specified window.</div></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="input_mouse_button"></a>
|
||||
Mouse button input</h2>
|
||||
<p >If you wish to be notified when a mouse button is pressed or released, set a mouse button callback.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#ga6ab84420974d812bee700e45284a723c">glfwSetMouseButtonCallback</a>(window, mouse_button_callback);</div>
|
||||
<div class="ttc" id="agroup__input_html_ga6ab84420974d812bee700e45284a723c"><div class="ttname"><a href="group__input.html#ga6ab84420974d812bee700e45284a723c">glfwSetMouseButtonCallback</a></div><div class="ttdeci">GLFWmousebuttonfun glfwSetMouseButtonCallback(GLFWwindow *window, GLFWmousebuttonfun callback)</div><div class="ttdoc">Sets the mouse button callback.</div></div>
|
||||
</div><!-- fragment --><p >The callback function receives the <a class="el" href="group__buttons.html">mouse button</a>, button action and <a class="el" href="group__mods.html">modifier bits</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> mouse_button_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span> button, <span class="keywordtype">int</span> action, <span class="keywordtype">int</span> mods)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">if</span> (button == <a class="code hl_define" href="group__buttons.html#ga3e2f2cf3c4942df73cc094247d275e74">GLFW_MOUSE_BUTTON_RIGHT</a> && action == <a class="code hl_define" href="group__input.html#ga2485743d0b59df3791c45951c4195265">GLFW_PRESS</a>)</div>
|
||||
<div class="line"> popup_menu();</div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="agroup__buttons_html_ga3e2f2cf3c4942df73cc094247d275e74"><div class="ttname"><a href="group__buttons.html#ga3e2f2cf3c4942df73cc094247d275e74">GLFW_MOUSE_BUTTON_RIGHT</a></div><div class="ttdeci">#define GLFW_MOUSE_BUTTON_RIGHT</div><div class="ttdef"><b>Definition:</b> glfw3.h:581</div></div>
|
||||
</div><!-- fragment --><p >The action is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>
|
||||
<p >Mouse button states for <a class="el" href="group__buttons.html">named buttons</a> are also saved in per-window state arrays that can be polled with <a class="el" href="group__input.html#gac1473feacb5996c01a7a5a33b5066704">glfwGetMouseButton</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> state = <a class="code hl_function" href="group__input.html#gac1473feacb5996c01a7a5a33b5066704">glfwGetMouseButton</a>(window, <a class="code hl_define" href="group__buttons.html#gaf37100431dcd5082d48f95ee8bc8cd56">GLFW_MOUSE_BUTTON_LEFT</a>);</div>
|
||||
<div class="line"><span class="keywordflow">if</span> (state == <a class="code hl_define" href="group__input.html#ga2485743d0b59df3791c45951c4195265">GLFW_PRESS</a>)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> upgrade_cow();</div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="agroup__buttons_html_gaf37100431dcd5082d48f95ee8bc8cd56"><div class="ttname"><a href="group__buttons.html#gaf37100431dcd5082d48f95ee8bc8cd56">GLFW_MOUSE_BUTTON_LEFT</a></div><div class="ttdeci">#define GLFW_MOUSE_BUTTON_LEFT</div><div class="ttdef"><b>Definition:</b> glfw3.h:580</div></div>
|
||||
<div class="ttc" id="agroup__input_html_gac1473feacb5996c01a7a5a33b5066704"><div class="ttname"><a href="group__input.html#gac1473feacb5996c01a7a5a33b5066704">glfwGetMouseButton</a></div><div class="ttdeci">int glfwGetMouseButton(GLFWwindow *window, int button)</div><div class="ttdoc">Returns the last reported state of a mouse button for the specified window.</div></div>
|
||||
</div><!-- fragment --><p >The returned state is one of <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>
|
||||
<p >This function only returns cached mouse button event state. It does not poll the system for the current state of the mouse button.</p>
|
||||
<p ><a class="anchor" id="GLFW_STICKY_MOUSE_BUTTONS"></a>Whenever you poll state, you risk missing the state change you are looking for. If a pressed mouse button is released again before you poll its state, you will have missed the button press. The recommended solution for this is to use a mouse button callback, but there is also the <code>GLFW_STICKY_MOUSE_BUTTONS</code> input mode.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gaa92336e173da9c8834558b54ee80563b">glfwSetInputMode</a>(window, <a class="code hl_define" href="glfw3_8h.html#a4d7ce8ce71030c3b04e2b78145bc59d1">GLFW_STICKY_MOUSE_BUTTONS</a>, <a class="code hl_define" href="group__init.html#ga2744fbb29b5631bb28802dbe0cf36eba">GLFW_TRUE</a>);</div>
|
||||
<div class="ttc" id="aglfw3_8h_html_a4d7ce8ce71030c3b04e2b78145bc59d1"><div class="ttname"><a href="glfw3_8h.html#a4d7ce8ce71030c3b04e2b78145bc59d1">GLFW_STICKY_MOUSE_BUTTONS</a></div><div class="ttdeci">#define GLFW_STICKY_MOUSE_BUTTONS</div><div class="ttdef"><b>Definition:</b> glfw3.h:1050</div></div>
|
||||
</div><!-- fragment --><p >When sticky mouse buttons mode is enabled, the pollable state of a mouse button will remain <code>GLFW_PRESS</code> until the state of that button is polled with <a class="el" href="group__input.html#gac1473feacb5996c01a7a5a33b5066704">glfwGetMouseButton</a>. Once it has been polled, if a mouse button release event had been processed in the meantime, the state will reset to <code>GLFW_RELEASE</code>, otherwise it will remain <code>GLFW_PRESS</code>.</p>
|
||||
<p >The <code>GLFW_MOUSE_BUTTON_LAST</code> constant holds the highest value of any <a class="el" href="group__buttons.html">named button</a>.</p>
|
||||
<h2><a class="anchor" id="scrolling"></a>
|
||||
Scroll input</h2>
|
||||
<p >If you wish to be notified when the user scrolls, whether with a mouse wheel or touchpad gesture, set a scroll callback.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#ga571e45a030ae4061f746ed56cb76aede">glfwSetScrollCallback</a>(window, scroll_callback);</div>
|
||||
<div class="ttc" id="agroup__input_html_ga571e45a030ae4061f746ed56cb76aede"><div class="ttname"><a href="group__input.html#ga571e45a030ae4061f746ed56cb76aede">glfwSetScrollCallback</a></div><div class="ttdeci">GLFWscrollfun glfwSetScrollCallback(GLFWwindow *window, GLFWscrollfun callback)</div><div class="ttdoc">Sets the scroll callback.</div></div>
|
||||
</div><!-- fragment --><p >The callback function receives two-dimensional scroll offsets.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> scroll_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">double</span> xoffset, <span class="keywordtype">double</span> yoffset)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p >A normal mouse wheel, being vertical, provides offsets along the Y-axis.</p>
|
||||
<h1><a class="anchor" id="joystick"></a>
|
||||
Joystick input</h1>
|
||||
<p >The joystick functions expose connected joysticks and controllers, with both referred to as joysticks. It supports up to sixteen joysticks, ranging from <code>GLFW_JOYSTICK_1</code>, <code>GLFW_JOYSTICK_2</code> up to and including <code>GLFW_JOYSTICK_16</code> or <code>GLFW_JOYSTICK_LAST</code>. You can test whether a <a class="el" href="group__joysticks.html">joystick</a> is present with <a class="el" href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> present = <a class="code hl_function" href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a>(<a class="code hl_define" href="group__joysticks.html#ga34a0443d059e9f22272cd4669073f73d">GLFW_JOYSTICK_1</a>);</div>
|
||||
<div class="ttc" id="agroup__input_html_gaed0966cee139d815317f9ffcba64c9f1"><div class="ttname"><a href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a></div><div class="ttdeci">int glfwJoystickPresent(int jid)</div><div class="ttdoc">Returns whether the specified joystick is present.</div></div>
|
||||
<div class="ttc" id="agroup__joysticks_html_ga34a0443d059e9f22272cd4669073f73d"><div class="ttname"><a href="group__joysticks.html#ga34a0443d059e9f22272cd4669073f73d">GLFW_JOYSTICK_1</a></div><div class="ttdeci">#define GLFW_JOYSTICK_1</div><div class="ttdef"><b>Definition:</b> glfw3.h:592</div></div>
|
||||
</div><!-- fragment --><p >Each joystick has zero or more axes, zero or more buttons, zero or more hats, a human-readable name, a user pointer and an SDL compatible GUID.</p>
|
||||
<p >When GLFW is initialized, detected joysticks are added to the beginning of the array. Once a joystick is detected, it keeps its assigned ID until it is disconnected or the library is terminated, so as joysticks are connected and disconnected, there may appear gaps in the IDs.</p>
|
||||
<p >Joystick axis, button and hat state is updated when polled and does not require a window to be created or events to be processed. However, if you want joystick connection and disconnection events reliably delivered to the <a class="el" href="input_guide.html#joystick_event">joystick callback</a> then you must <a class="el" href="input_guide.html#events">process events</a>.</p>
|
||||
<p >To see all the properties of all connected joysticks in real-time, run the <code>joysticks</code> test program.</p>
|
||||
<h2><a class="anchor" id="joystick_axis"></a>
|
||||
Joystick axis states</h2>
|
||||
<p >The positions of all axes of a joystick are returned by <a class="el" href="group__input.html#gaeb1c0191d3140a233a682987c61eb408">glfwGetJoystickAxes</a>. See the reference documentation for the lifetime of the returned array.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> count;</div>
|
||||
<div class="line"><span class="keyword">const</span> <span class="keywordtype">float</span>* axes = <a class="code hl_function" href="group__input.html#gaeb1c0191d3140a233a682987c61eb408">glfwGetJoystickAxes</a>(<a class="code hl_define" href="group__joysticks.html#gae43281bc66d3fa5089fb50c3e7a28695">GLFW_JOYSTICK_5</a>, &count);</div>
|
||||
<div class="ttc" id="agroup__input_html_gaeb1c0191d3140a233a682987c61eb408"><div class="ttname"><a href="group__input.html#gaeb1c0191d3140a233a682987c61eb408">glfwGetJoystickAxes</a></div><div class="ttdeci">const float * glfwGetJoystickAxes(int jid, int *count)</div><div class="ttdoc">Returns the values of all axes of the specified joystick.</div></div>
|
||||
<div class="ttc" id="agroup__joysticks_html_gae43281bc66d3fa5089fb50c3e7a28695"><div class="ttname"><a href="group__joysticks.html#gae43281bc66d3fa5089fb50c3e7a28695">GLFW_JOYSTICK_5</a></div><div class="ttdeci">#define GLFW_JOYSTICK_5</div><div class="ttdef"><b>Definition:</b> glfw3.h:596</div></div>
|
||||
</div><!-- fragment --><p >Each element in the returned array is a value between -1.0 and 1.0.</p>
|
||||
<h2><a class="anchor" id="joystick_button"></a>
|
||||
Joystick button states</h2>
|
||||
<p >The states of all buttons of a joystick are returned by <a class="el" href="group__input.html#ga5ffe34739d3dc97efe432ed2d81d9938">glfwGetJoystickButtons</a>. See the reference documentation for the lifetime of the returned array.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> count;</div>
|
||||
<div class="line"><span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* buttons = <a class="code hl_function" href="group__input.html#ga5ffe34739d3dc97efe432ed2d81d9938">glfwGetJoystickButtons</a>(<a class="code hl_define" href="group__joysticks.html#gae6f3eedfeb42424c2f5e3161efb0b654">GLFW_JOYSTICK_3</a>, &count);</div>
|
||||
<div class="ttc" id="agroup__input_html_ga5ffe34739d3dc97efe432ed2d81d9938"><div class="ttname"><a href="group__input.html#ga5ffe34739d3dc97efe432ed2d81d9938">glfwGetJoystickButtons</a></div><div class="ttdeci">const unsigned char * glfwGetJoystickButtons(int jid, int *count)</div><div class="ttdoc">Returns the state of all buttons of the specified joystick.</div></div>
|
||||
<div class="ttc" id="agroup__joysticks_html_gae6f3eedfeb42424c2f5e3161efb0b654"><div class="ttname"><a href="group__joysticks.html#gae6f3eedfeb42424c2f5e3161efb0b654">GLFW_JOYSTICK_3</a></div><div class="ttdeci">#define GLFW_JOYSTICK_3</div><div class="ttdef"><b>Definition:</b> glfw3.h:594</div></div>
|
||||
</div><!-- fragment --><p >Each element in the returned array is either <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code>.</p>
|
||||
<p >For backward compatibility with earlier versions that did not have <a class="el" href="group__input.html#ga06e660841b3e79c54da4f54a932c5a2c">glfwGetJoystickHats</a>, the button array by default also includes all hats. See the reference documentation for <a class="el" href="group__input.html#ga5ffe34739d3dc97efe432ed2d81d9938">glfwGetJoystickButtons</a> for details.</p>
|
||||
<h2><a class="anchor" id="joystick_hat"></a>
|
||||
Joystick hat states</h2>
|
||||
<p >The states of all hats are returned by <a class="el" href="group__input.html#ga06e660841b3e79c54da4f54a932c5a2c">glfwGetJoystickHats</a>. See the reference documentation for the lifetime of the returned array.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> count;</div>
|
||||
<div class="line"><span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>* hats = <a class="code hl_function" href="group__input.html#ga06e660841b3e79c54da4f54a932c5a2c">glfwGetJoystickHats</a>(<a class="code hl_define" href="group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87">GLFW_JOYSTICK_7</a>, &count);</div>
|
||||
<div class="ttc" id="agroup__input_html_ga06e660841b3e79c54da4f54a932c5a2c"><div class="ttname"><a href="group__input.html#ga06e660841b3e79c54da4f54a932c5a2c">glfwGetJoystickHats</a></div><div class="ttdeci">const unsigned char * glfwGetJoystickHats(int jid, int *count)</div><div class="ttdoc">Returns the state of all hats of the specified joystick.</div></div>
|
||||
<div class="ttc" id="agroup__joysticks_html_ga20a9f4f3aaefed9ea5e66072fc588b87"><div class="ttname"><a href="group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87">GLFW_JOYSTICK_7</a></div><div class="ttdeci">#define GLFW_JOYSTICK_7</div><div class="ttdef"><b>Definition:</b> glfw3.h:598</div></div>
|
||||
</div><!-- fragment --><p >Each element in the returned array is one of the following:</p>
|
||||
<table class="markdownTable">
|
||||
<tr class="markdownTableHead">
|
||||
<th class="markdownTableHeadNone">Name </th><th class="markdownTableHeadNone">Value </th></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone"><code>GLFW_HAT_CENTERED</code> </td><td class="markdownTableBodyNone">0 </td></tr>
|
||||
<tr class="markdownTableRowEven">
|
||||
<td class="markdownTableBodyNone"><code>GLFW_HAT_UP</code> </td><td class="markdownTableBodyNone">1 </td></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone"><code>GLFW_HAT_RIGHT</code> </td><td class="markdownTableBodyNone">2 </td></tr>
|
||||
<tr class="markdownTableRowEven">
|
||||
<td class="markdownTableBodyNone"><code>GLFW_HAT_DOWN</code> </td><td class="markdownTableBodyNone">4 </td></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone"><code>GLFW_HAT_LEFT</code> </td><td class="markdownTableBodyNone">8 </td></tr>
|
||||
<tr class="markdownTableRowEven">
|
||||
<td class="markdownTableBodyNone"><code>GLFW_HAT_RIGHT_UP</code> </td><td class="markdownTableBodyNone"><code>GLFW_HAT_RIGHT</code> | <code>GLFW_HAT_UP</code> </td></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone"><code>GLFW_HAT_RIGHT_DOWN</code> </td><td class="markdownTableBodyNone"><code>GLFW_HAT_RIGHT</code> | <code>GLFW_HAT_DOWN</code> </td></tr>
|
||||
<tr class="markdownTableRowEven">
|
||||
<td class="markdownTableBodyNone"><code>GLFW_HAT_LEFT_UP</code> </td><td class="markdownTableBodyNone"><code>GLFW_HAT_LEFT</code> | <code>GLFW_HAT_UP</code> </td></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone"><code>GLFW_HAT_LEFT_DOWN</code> </td><td class="markdownTableBodyNone"><code>GLFW_HAT_LEFT</code> | <code>GLFW_HAT_DOWN</code> </td></tr>
|
||||
</table>
|
||||
<p >The diagonal directions are bitwise combinations of the primary (up, right, down and left) directions and you can test for these individually by ANDing it with the corresponding direction.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (hats[2] & <a class="code hl_define" href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a>)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// State of hat 2 could be right-up, right or right-down</span></div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="agroup__hat__state_html_ga252586e3bbde75f4b0e07ad3124867f5"><div class="ttname"><a href="group__hat__state.html#ga252586e3bbde75f4b0e07ad3124867f5">GLFW_HAT_RIGHT</a></div><div class="ttdeci">#define GLFW_HAT_RIGHT</div><div class="ttdef"><b>Definition:</b> glfw3.h:357</div></div>
|
||||
</div><!-- fragment --><p >For backward compatibility with earlier versions that did not have <a class="el" href="group__input.html#ga06e660841b3e79c54da4f54a932c5a2c">glfwGetJoystickHats</a>, all hats are by default also included in the button array. See the reference documentation for <a class="el" href="group__input.html#ga5ffe34739d3dc97efe432ed2d81d9938">glfwGetJoystickButtons</a> for details.</p>
|
||||
<h2><a class="anchor" id="joystick_name"></a>
|
||||
Joystick name</h2>
|
||||
<p >The human-readable, UTF-8 encoded name of a joystick is returned by <a class="el" href="group__input.html#gac6a8e769e18e0bcfa9097793fc2c3978">glfwGetJoystickName</a>. See the reference documentation for the lifetime of the returned string.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* name = <a class="code hl_function" href="group__input.html#gac6a8e769e18e0bcfa9097793fc2c3978">glfwGetJoystickName</a>(<a class="code hl_define" href="group__joysticks.html#ga97ddbcad02b7f48d74fad4ddb08fff59">GLFW_JOYSTICK_4</a>);</div>
|
||||
<div class="ttc" id="agroup__input_html_gac6a8e769e18e0bcfa9097793fc2c3978"><div class="ttname"><a href="group__input.html#gac6a8e769e18e0bcfa9097793fc2c3978">glfwGetJoystickName</a></div><div class="ttdeci">const char * glfwGetJoystickName(int jid)</div><div class="ttdoc">Returns the name of the specified joystick.</div></div>
|
||||
<div class="ttc" id="agroup__joysticks_html_ga97ddbcad02b7f48d74fad4ddb08fff59"><div class="ttname"><a href="group__joysticks.html#ga97ddbcad02b7f48d74fad4ddb08fff59">GLFW_JOYSTICK_4</a></div><div class="ttdeci">#define GLFW_JOYSTICK_4</div><div class="ttdef"><b>Definition:</b> glfw3.h:595</div></div>
|
||||
</div><!-- fragment --><p >Joystick names are not guaranteed to be unique. Two joysticks of the same model and make may have the same name. Only the <a class="el" href="group__joysticks.html">joystick ID</a> is guaranteed to be unique, and only until that joystick is disconnected.</p>
|
||||
<h2><a class="anchor" id="joystick_userptr"></a>
|
||||
Joystick user pointer</h2>
|
||||
<p >Each joystick has a user pointer that can be set with <a class="el" href="group__input.html#ga6b2f72d64d636b48a727b437cbb7489e">glfwSetJoystickUserPointer</a> and queried with <a class="el" href="group__input.html#ga18cefd7265d1fa04f3fd38a6746db5f3">glfwGetJoystickUserPointer</a>. This can be used for any purpose you need and will not be modified by GLFW. The value will be kept until the joystick is disconnected or until the library is terminated.</p>
|
||||
<p >The initial value of the pointer is <code>NULL</code>.</p>
|
||||
<h2><a class="anchor" id="joystick_event"></a>
|
||||
Joystick configuration changes</h2>
|
||||
<p >If you wish to be notified when a joystick is connected or disconnected, set a joystick callback.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c">glfwSetJoystickCallback</a>(joystick_callback);</div>
|
||||
<div class="ttc" id="agroup__input_html_ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c"><div class="ttname"><a href="group__input.html#ga2f60a0e5b7bd8d1b7344dc0a7cb32b4c">glfwSetJoystickCallback</a></div><div class="ttdeci">GLFWjoystickfun glfwSetJoystickCallback(GLFWjoystickfun callback)</div><div class="ttdoc">Sets the joystick configuration callback.</div></div>
|
||||
</div><!-- fragment --><p >The callback function receives the ID of the joystick that has been connected and disconnected and the event that occurred.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> joystick_callback(<span class="keywordtype">int</span> jid, <span class="keywordtype">int</span> event)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">if</span> (event == <a class="code hl_define" href="glfw3_8h.html#abe11513fd1ffbee5bb9b173f06028b9e">GLFW_CONNECTED</a>)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// The joystick was connected</span></div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (event == <a class="code hl_define" href="glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32">GLFW_DISCONNECTED</a>)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// The joystick was disconnected</span></div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="aglfw3_8h_html_aab64b25921ef21d89252d6f0a71bfc32"><div class="ttname"><a href="glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32">GLFW_DISCONNECTED</a></div><div class="ttdeci">#define GLFW_DISCONNECTED</div><div class="ttdef"><b>Definition:</b> glfw3.h:1107</div></div>
|
||||
<div class="ttc" id="aglfw3_8h_html_abe11513fd1ffbee5bb9b173f06028b9e"><div class="ttname"><a href="glfw3_8h.html#abe11513fd1ffbee5bb9b173f06028b9e">GLFW_CONNECTED</a></div><div class="ttdeci">#define GLFW_CONNECTED</div><div class="ttdef"><b>Definition:</b> glfw3.h:1106</div></div>
|
||||
</div><!-- fragment --><p >For joystick connection and disconnection events to be delivered on all platforms, you need to call one of the <a class="el" href="input_guide.html#events">event processing</a> functions. Joystick disconnection may also be detected and the callback called by joystick functions. The function will then return whatever it returns for a disconnected joystick.</p>
|
||||
<p >Only <a class="el" href="group__input.html#gac6a8e769e18e0bcfa9097793fc2c3978">glfwGetJoystickName</a> and <a class="el" href="group__input.html#ga18cefd7265d1fa04f3fd38a6746db5f3">glfwGetJoystickUserPointer</a> will return useful values for a disconnected joystick and only before the monitor callback returns.</p>
|
||||
<h2><a class="anchor" id="gamepad"></a>
|
||||
Gamepad input</h2>
|
||||
<p >The joystick functions provide unlabeled axes, buttons and hats, with no indication of where they are located on the device. Their order may also vary between platforms even with the same device.</p>
|
||||
<p >To solve this problem the SDL community crowdsourced the <a href="https://github.com/gabomdq/SDL_GameControllerDB">SDL_GameControllerDB</a> project, a database of mappings from many different devices to an Xbox-like gamepad.</p>
|
||||
<p >GLFW supports this mapping format and contains a copy of the mappings available at the time of release. See <a class="el" href="input_guide.html#gamepad_mapping">Gamepad mappings</a> for how to update this at runtime. Mappings will be assigned to joysticks automatically any time a joystick is connected or the mappings are updated.</p>
|
||||
<p >You can check whether a joystick is both present and has a gamepad mapping with <a class="el" href="group__input.html#gad0f676860f329d80f7e47e9f06a96f00">glfwJoystickIsGamepad</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (<a class="code hl_function" href="group__input.html#gad0f676860f329d80f7e47e9f06a96f00">glfwJoystickIsGamepad</a>(<a class="code hl_define" href="group__joysticks.html#ga6eab65ec88e65e0850ef8413504cb50c">GLFW_JOYSTICK_2</a>))</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Use as gamepad</span></div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="agroup__input_html_gad0f676860f329d80f7e47e9f06a96f00"><div class="ttname"><a href="group__input.html#gad0f676860f329d80f7e47e9f06a96f00">glfwJoystickIsGamepad</a></div><div class="ttdeci">int glfwJoystickIsGamepad(int jid)</div><div class="ttdoc">Returns whether the specified joystick has a gamepad mapping.</div></div>
|
||||
<div class="ttc" id="agroup__joysticks_html_ga6eab65ec88e65e0850ef8413504cb50c"><div class="ttname"><a href="group__joysticks.html#ga6eab65ec88e65e0850ef8413504cb50c">GLFW_JOYSTICK_2</a></div><div class="ttdeci">#define GLFW_JOYSTICK_2</div><div class="ttdef"><b>Definition:</b> glfw3.h:593</div></div>
|
||||
</div><!-- fragment --><p >If you are only interested in gamepad input you can use this function instead of <a class="el" href="group__input.html#gaed0966cee139d815317f9ffcba64c9f1">glfwJoystickPresent</a>.</p>
|
||||
<p >You can query the human-readable name provided by the gamepad mapping with <a class="el" href="group__input.html#ga8aea73a1a25cc6c0486a617019f56728">glfwGetGamepadName</a>. This may or may not be the same as the <a class="el" href="input_guide.html#joystick_name">joystick name</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* name = <a class="code hl_function" href="group__input.html#ga8aea73a1a25cc6c0486a617019f56728">glfwGetGamepadName</a>(<a class="code hl_define" href="group__joysticks.html#ga20a9f4f3aaefed9ea5e66072fc588b87">GLFW_JOYSTICK_7</a>);</div>
|
||||
<div class="ttc" id="agroup__input_html_ga8aea73a1a25cc6c0486a617019f56728"><div class="ttname"><a href="group__input.html#ga8aea73a1a25cc6c0486a617019f56728">glfwGetGamepadName</a></div><div class="ttdeci">const char * glfwGetGamepadName(int jid)</div><div class="ttdoc">Returns the human-readable gamepad name for the specified joystick.</div></div>
|
||||
</div><!-- fragment --><p >To retrieve the gamepad state of a joystick, call <a class="el" href="group__input.html#gadccddea8bce6113fa459de379ddaf051">glfwGetGamepadState</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_struct" href="structGLFWgamepadstate.html">GLFWgamepadstate</a> state;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordflow">if</span> (<a class="code hl_function" href="group__input.html#gadccddea8bce6113fa459de379ddaf051">glfwGetGamepadState</a>(<a class="code hl_define" href="group__joysticks.html#gae6f3eedfeb42424c2f5e3161efb0b654">GLFW_JOYSTICK_3</a>, &state))</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">if</span> (state.<a class="code hl_variable" href="structGLFWgamepadstate.html#a27e9896b51c65df15fba2c7139bfdb9a">buttons</a>[<a class="code hl_define" href="group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810">GLFW_GAMEPAD_BUTTON_A</a>])</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> input_jump();</div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"> input_speed(state.<a class="code hl_variable" href="structGLFWgamepadstate.html#a8b2c8939b1d31458de5359998375c189">axes</a>[<a class="code hl_define" href="group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a>]);</div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="agroup__gamepad__axes_html_ga121a7d5d20589a423cd1634dd6ee6eab"><div class="ttname"><a href="group__gamepad__axes.html#ga121a7d5d20589a423cd1634dd6ee6eab">GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</a></div><div class="ttdeci">#define GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</div><div class="ttdef"><b>Definition:</b> glfw3.h:653</div></div>
|
||||
<div class="ttc" id="agroup__gamepad__buttons_html_gae055a12fbf4b48b5954c8e1cd129b810"><div class="ttname"><a href="group__gamepad__buttons.html#gae055a12fbf4b48b5954c8e1cd129b810">GLFW_GAMEPAD_BUTTON_A</a></div><div class="ttdeci">#define GLFW_GAMEPAD_BUTTON_A</div><div class="ttdef"><b>Definition:</b> glfw3.h:618</div></div>
|
||||
<div class="ttc" id="agroup__input_html_gadccddea8bce6113fa459de379ddaf051"><div class="ttname"><a href="group__input.html#gadccddea8bce6113fa459de379ddaf051">glfwGetGamepadState</a></div><div class="ttdeci">int glfwGetGamepadState(int jid, GLFWgamepadstate *state)</div><div class="ttdoc">Retrieves the state of the specified joystick remapped as a gamepad.</div></div>
|
||||
<div class="ttc" id="astructGLFWgamepadstate_html"><div class="ttname"><a href="structGLFWgamepadstate.html">GLFWgamepadstate</a></div><div class="ttdoc">Gamepad input state.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1745</div></div>
|
||||
<div class="ttc" id="astructGLFWgamepadstate_html_a27e9896b51c65df15fba2c7139bfdb9a"><div class="ttname"><a href="structGLFWgamepadstate.html#a27e9896b51c65df15fba2c7139bfdb9a">GLFWgamepadstate::buttons</a></div><div class="ttdeci">unsigned char buttons[15]</div><div class="ttdef"><b>Definition:</b> glfw3.h:1749</div></div>
|
||||
<div class="ttc" id="astructGLFWgamepadstate_html_a8b2c8939b1d31458de5359998375c189"><div class="ttname"><a href="structGLFWgamepadstate.html#a8b2c8939b1d31458de5359998375c189">GLFWgamepadstate::axes</a></div><div class="ttdeci">float axes[6]</div><div class="ttdef"><b>Definition:</b> glfw3.h:1753</div></div>
|
||||
</div><!-- fragment --><p >The <a class="el" href="structGLFWgamepadstate.html">GLFWgamepadstate</a> struct has two arrays; one for button states and one for axis states. The values for each button and axis are the same as for the <a class="el" href="group__input.html#ga5ffe34739d3dc97efe432ed2d81d9938">glfwGetJoystickButtons</a> and <a class="el" href="group__input.html#gaeb1c0191d3140a233a682987c61eb408">glfwGetJoystickAxes</a> functions, i.e. <code>GLFW_PRESS</code> or <code>GLFW_RELEASE</code> for buttons and -1.0 to 1.0 inclusive for axes.</p>
|
||||
<p >The sizes of the arrays and the positions within each array are fixed.</p>
|
||||
<p >The <a class="el" href="group__gamepad__buttons.html">button indices</a> are <code>GLFW_GAMEPAD_BUTTON_A</code>, <code>GLFW_GAMEPAD_BUTTON_B</code>, <code>GLFW_GAMEPAD_BUTTON_X</code>, <code>GLFW_GAMEPAD_BUTTON_Y</code>, <code>GLFW_GAMEPAD_BUTTON_LEFT_BUMPER</code>, <code>GLFW_GAMEPAD_BUTTON_RIGHT_BUMPER</code>, <code>GLFW_GAMEPAD_BUTTON_BACK</code>, <code>GLFW_GAMEPAD_BUTTON_START</code>, <code>GLFW_GAMEPAD_BUTTON_GUIDE</code>, <code>GLFW_GAMEPAD_BUTTON_LEFT_THUMB</code>, <code>GLFW_GAMEPAD_BUTTON_RIGHT_THUMB</code>, <code>GLFW_GAMEPAD_BUTTON_DPAD_UP</code>, <code>GLFW_GAMEPAD_BUTTON_DPAD_RIGHT</code>, <code>GLFW_GAMEPAD_BUTTON_DPAD_DOWN</code> and <code>GLFW_GAMEPAD_BUTTON_DPAD_LEFT</code>.</p>
|
||||
<p >For those who prefer, there are also the <code>GLFW_GAMEPAD_BUTTON_CROSS</code>, <code>GLFW_GAMEPAD_BUTTON_CIRCLE</code>, <code>GLFW_GAMEPAD_BUTTON_SQUARE</code> and <code>GLFW_GAMEPAD_BUTTON_TRIANGLE</code> aliases for the A, B, X and Y button indices.</p>
|
||||
<p >The <a class="el" href="group__gamepad__axes.html">axis indices</a> are <code>GLFW_GAMEPAD_AXIS_LEFT_X</code>, <code>GLFW_GAMEPAD_AXIS_LEFT_Y</code>, <code>GLFW_GAMEPAD_AXIS_RIGHT_X</code>, <code>GLFW_GAMEPAD_AXIS_RIGHT_Y</code>, <code>GLFW_GAMEPAD_AXIS_LEFT_TRIGGER</code> and <code>GLFW_GAMEPAD_AXIS_RIGHT_TRIGGER</code>.</p>
|
||||
<p >The <code>GLFW_GAMEPAD_BUTTON_LAST</code> and <code>GLFW_GAMEPAD_AXIS_LAST</code> constants equal the largest available index for each array.</p>
|
||||
<h2><a class="anchor" id="gamepad_mapping"></a>
|
||||
Gamepad mappings</h2>
|
||||
<p >GLFW contains a copy of the mappings available in <a href="https://github.com/gabomdq/SDL_GameControllerDB">SDL_GameControllerDB</a> at the time of release. Newer ones can be added at runtime with <a class="el" href="group__input.html#gaed5104612f2fa8e66aa6e846652ad00f">glfwUpdateGamepadMappings</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* mappings = load_file_contents(<span class="stringliteral">"game/data/gamecontrollerdb.txt"</span>);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><a class="code hl_function" href="group__input.html#gaed5104612f2fa8e66aa6e846652ad00f">glfwUpdateGamepadMappings</a>(mappings);</div>
|
||||
<div class="ttc" id="agroup__input_html_gaed5104612f2fa8e66aa6e846652ad00f"><div class="ttname"><a href="group__input.html#gaed5104612f2fa8e66aa6e846652ad00f">glfwUpdateGamepadMappings</a></div><div class="ttdeci">int glfwUpdateGamepadMappings(const char *string)</div><div class="ttdoc">Adds the specified SDL_GameControllerDB gamepad mappings.</div></div>
|
||||
</div><!-- fragment --><p >This function supports everything from single lines up to and including the unmodified contents of the whole <code>gamecontrollerdb.txt</code> file.</p>
|
||||
<p >If you are compiling GLFW from source with CMake you can update the built-in mappings by building the <em>update_mappings</em> target. This runs the <code>GenerateMappings.cmake</code> CMake script, which downloads <code>gamecontrollerdb.txt</code> and regenerates the <code>mappings.h</code> header file.</p>
|
||||
<p >Below is a description of the mapping format. Please keep in mind that <b>this description is not authoritative</b>. The format is defined by the SDL and SDL_GameControllerDB projects and their documentation and code takes precedence.</p>
|
||||
<p >Each mapping is a single line of comma-separated values describing the GUID, name and layout of the gamepad. Lines that do not begin with a hexadecimal digit are ignored.</p>
|
||||
<p >The first value is always the gamepad GUID, a 32 character long hexadecimal string that typically identifies its make, model, revision and the type of connection to the computer. When this information is not available, the GUID is generated using the gamepad name. GLFW uses the SDL 2.0.5+ GUID format but can convert from the older formats.</p>
|
||||
<p >The second value is always the human-readable name of the gamepad.</p>
|
||||
<p >All subsequent values are in the form <code><field>:<value></code> and describe the layout of the mapping. These fields may not all be present and may occur in any order.</p>
|
||||
<p >The button fields are <code>a</code>, <code>b</code>, <code>x</code>, <code>y</code>, <code>back</code>, <code>start</code>, <code>guide</code>, <code>dpup</code>, <code>dpright</code>, <code>dpdown</code>, <code>dpleft</code>, <code>leftshoulder</code>, <code>rightshoulder</code>, <code>leftstick</code> and <code>rightstick</code>.</p>
|
||||
<p >The axis fields are <code>leftx</code>, <code>lefty</code>, <code>rightx</code>, <code>righty</code>, <code>lefttrigger</code> and <code>righttrigger</code>.</p>
|
||||
<p >The value of an axis or button field can be a joystick button, a joystick axis, a hat bitmask or empty. Joystick buttons are specified as <code>bN</code>, for example <code>b2</code> for the third button. Joystick axes are specified as <code>aN</code>, for example <code>a7</code> for the eighth button. Joystick hat bit masks are specified as <code>hN.N</code>, for example <code>h0.8</code> for left on the first hat. More than one bit may be set in the mask.</p>
|
||||
<p >Before an axis there may be a <code>+</code> or <code>-</code> range modifier, for example <code>+a3</code> for the positive half of the fourth axis. This restricts input to only the positive or negative halves of the joystick axis. After an axis or half-axis there may be the <code>~</code> inversion modifier, for example <code>a2~</code> or <code>-a7~</code>. This negates the values of the gamepad axis.</p>
|
||||
<p >The hat bit mask match the <a class="el" href="group__hat__state.html">hat states</a> in the joystick functions.</p>
|
||||
<p >There is also the special <code>platform</code> field that specifies which platform the mapping is valid for. Possible values are <code>Windows</code>, <code>Mac OS X</code> and <code>Linux</code>.</p>
|
||||
<p >Below is an example of what a gamepad mapping might look like. It is the one built into GLFW for Xbox controllers accessed via the XInput API on Windows. This example has been broken into several lines to fit on the page, but real gamepad mappings must be a single line.</p>
|
||||
<div class="fragment"><div class="line">78696e70757401000000000000000000,XInput Gamepad (GLFW),platform:Windows,a:b0,</div>
|
||||
<div class="line">b:b1,x:b2,y:b3,leftshoulder:b4,rightshoulder:b5,back:b6,start:b7,leftstick:b8,</div>
|
||||
<div class="line">rightstick:b9,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:a4,</div>
|
||||
<div class="line">righttrigger:a5,dpup:h0.1,dpright:h0.2,dpdown:h0.4,dpleft:h0.8,</div>
|
||||
</div><!-- fragment --><dl class="section note"><dt>Note</dt><dd>GLFW does not yet support the output range and modifiers <code>+</code> and <code>-</code> that were recently added to SDL. The input modifiers <code>+</code>, <code>-</code> and <code>~</code> are supported and described above.</dd></dl>
|
||||
<h1><a class="anchor" id="time"></a>
|
||||
Time input</h1>
|
||||
<p >GLFW provides high-resolution time input, in seconds, with <a class="el" href="group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a">glfwGetTime</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">double</span> seconds = <a class="code hl_function" href="group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a">glfwGetTime</a>();</div>
|
||||
<div class="ttc" id="agroup__input_html_gaa6cf4e7a77158a3b8fd00328b1720a4a"><div class="ttname"><a href="group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a">glfwGetTime</a></div><div class="ttdeci">double glfwGetTime(void)</div><div class="ttdoc">Returns the GLFW time.</div></div>
|
||||
</div><!-- fragment --><p >It returns the number of seconds since the library was initialized with <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>. The platform-specific time sources used typically have micro- or nanosecond resolution.</p>
|
||||
<p >You can modify the base time with <a class="el" href="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">glfwSetTime</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">glfwSetTime</a>(4.0);</div>
|
||||
<div class="ttc" id="agroup__input_html_gaf59589ef6e8b8c8b5ad184b25afd4dc0"><div class="ttname"><a href="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">glfwSetTime</a></div><div class="ttdeci">void glfwSetTime(double time)</div><div class="ttdoc">Sets the GLFW time.</div></div>
|
||||
</div><!-- fragment --><p >This sets the time to the specified time, in seconds, and it continues to count from there.</p>
|
||||
<p >You can also access the raw timer used to implement the functions above, with <a class="el" href="group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa">glfwGetTimerValue</a>.</p>
|
||||
<div class="fragment"><div class="line">uint64_t value = <a class="code hl_function" href="group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa">glfwGetTimerValue</a>();</div>
|
||||
<div class="ttc" id="agroup__input_html_ga09b2bd37d328e0b9456c7ec575cc26aa"><div class="ttname"><a href="group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa">glfwGetTimerValue</a></div><div class="ttdeci">uint64_t glfwGetTimerValue(void)</div><div class="ttdoc">Returns the current value of the raw timer.</div></div>
|
||||
</div><!-- fragment --><p >This value is in 1 / frequency seconds. The frequency of the raw timer varies depending on the operating system and hardware. You can query the frequency, in Hz, with <a class="el" href="group__input.html#ga3289ee876572f6e91f06df3a24824443">glfwGetTimerFrequency</a>.</p>
|
||||
<div class="fragment"><div class="line">uint64_t frequency = <a class="code hl_function" href="group__input.html#ga3289ee876572f6e91f06df3a24824443">glfwGetTimerFrequency</a>();</div>
|
||||
<div class="ttc" id="agroup__input_html_ga3289ee876572f6e91f06df3a24824443"><div class="ttname"><a href="group__input.html#ga3289ee876572f6e91f06df3a24824443">glfwGetTimerFrequency</a></div><div class="ttdeci">uint64_t glfwGetTimerFrequency(void)</div><div class="ttdoc">Returns the frequency, in Hz, of the raw timer.</div></div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="clipboard"></a>
|
||||
Clipboard input and output</h1>
|
||||
<p >If the system clipboard contains a UTF-8 encoded string or if it can be converted to one, you can retrieve it with <a class="el" href="group__input.html#ga71a5b20808ea92193d65c21b82580355">glfwGetClipboardString</a>. See the reference documentation for the lifetime of the returned string.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* text = <a class="code hl_function" href="group__input.html#ga71a5b20808ea92193d65c21b82580355">glfwGetClipboardString</a>(NULL);</div>
|
||||
<div class="line"><span class="keywordflow">if</span> (text)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> insert_text(text);</div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="agroup__input_html_ga71a5b20808ea92193d65c21b82580355"><div class="ttname"><a href="group__input.html#ga71a5b20808ea92193d65c21b82580355">glfwGetClipboardString</a></div><div class="ttdeci">const char * glfwGetClipboardString(GLFWwindow *window)</div><div class="ttdoc">Returns the contents of the clipboard as a string.</div></div>
|
||||
</div><!-- fragment --><p >If the clipboard is empty or if its contents could not be converted, <code>NULL</code> is returned.</p>
|
||||
<p >The contents of the system clipboard can be set to a UTF-8 encoded string with <a class="el" href="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd">glfwSetClipboardString</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd">glfwSetClipboardString</a>(NULL, <span class="stringliteral">"A string with words in it"</span>);</div>
|
||||
<div class="ttc" id="agroup__input_html_gaba1f022c5eb07dfac421df34cdcd31dd"><div class="ttname"><a href="group__input.html#gaba1f022c5eb07dfac421df34cdcd31dd">glfwSetClipboardString</a></div><div class="ttdeci">void glfwSetClipboardString(GLFWwindow *window, const char *string)</div><div class="ttdoc">Sets the clipboard to the specified string.</div></div>
|
||||
</div><!-- fragment --><h1><a class="anchor" id="path_drop"></a>
|
||||
Path drop input</h1>
|
||||
<p >If you wish to receive the paths of files and/or directories dropped on a window, set a file drop callback.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b">glfwSetDropCallback</a>(window, drop_callback);</div>
|
||||
<div class="ttc" id="agroup__input_html_gab773f0ee0a07cff77a210cea40bc1f6b"><div class="ttname"><a href="group__input.html#gab773f0ee0a07cff77a210cea40bc1f6b">glfwSetDropCallback</a></div><div class="ttdeci">GLFWdropfun glfwSetDropCallback(GLFWwindow *window, GLFWdropfun callback)</div><div class="ttdoc">Sets the path drop callback.</div></div>
|
||||
</div><!-- fragment --><p >The callback function receives an array of paths encoded as UTF-8.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> drop_callback(<a class="code hl_typedef" href="group__window.html#ga3c96d80d363e67d13a41b5d1821f3242">GLFWwindow</a>* window, <span class="keywordtype">int</span> count, <span class="keyword">const</span> <span class="keywordtype">char</span>** paths)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordtype">int</span> i;</div>
|
||||
<div class="line"> <span class="keywordflow">for</span> (i = 0; i < count; i++)</div>
|
||||
<div class="line"> handle_dropped_file(paths[i]);</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p >The path array and its strings are only valid until the file drop callback returns, as they may have been generated specifically for that event. You need to make a deep copy of the array if you want to keep the paths. </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
74
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/internal_8dox.html
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: internal.dox File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">internal.dox File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
125
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/internals_guide.html
vendored
Normal file
@ -0,0 +1,125 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Internal structure</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Internal structure </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="toc"><h3>Table of Contents</h3>
|
||||
<ul><li class="level1"><a href="#internals_public">Public interface</a></li>
|
||||
<li class="level1"><a href="#internals_native">Native interface</a></li>
|
||||
<li class="level1"><a href="#internals_internal">Internal interface</a></li>
|
||||
<li class="level1"><a href="#internals_platform">Platform interface</a></li>
|
||||
<li class="level1"><a href="#internals_event">Event interface</a></li>
|
||||
<li class="level1"><a href="#internals_static">Static functions</a></li>
|
||||
<li class="level1"><a href="#internals_config">Configuration macros</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="textblock"><p >There are several interfaces inside GLFW. Each interface has its own area of responsibility and its own naming conventions.</p>
|
||||
<h1><a class="anchor" id="internals_public"></a>
|
||||
Public interface</h1>
|
||||
<p >The most well-known is the public interface, described in the <a class="el" href="glfw3_8h.html" title="The header of the GLFW 3 API.">glfw3.h</a> header file. This is implemented in source files shared by all platforms and these files contain no platform-specific code. This code usually ends up calling the platform and internal interfaces to do the actual work.</p>
|
||||
<p >The public interface uses the OpenGL naming conventions except with GLFW and glfw instead of GL and gl. For struct members, where OpenGL sets no precedent, it use headless camel case.</p>
|
||||
<p >Examples: <code>glfwCreateWindow</code>, <code>GLFWwindow</code>, <code>GLFW_RED_BITS</code></p>
|
||||
<h1><a class="anchor" id="internals_native"></a>
|
||||
Native interface</h1>
|
||||
<p >The <a class="el" href="group__native.html">native interface</a> is a small set of publicly available but platform-specific functions, described in the <a class="el" href="glfw3native_8h.html" title="The header of the native access functions.">glfw3native.h</a> header file and used to gain access to the underlying window, context and (on some platforms) display handles used by the platform interface.</p>
|
||||
<p >The function names of the native interface are similar to those of the public interface, but embeds the name of the interface that the returned handle is from.</p>
|
||||
<p >Examples: <code>glfwGetX11Window</code>, <code>glfwGetWGLContext</code></p>
|
||||
<h1><a class="anchor" id="internals_internal"></a>
|
||||
Internal interface</h1>
|
||||
<p >The internal interface consists of utility functions used by all other interfaces. It is shared code implemented in the same shared source files as the public and event interfaces. The internal interface is described in the internal.h header file.</p>
|
||||
<p >The internal interface is in charge of GLFW's global data, which it stores in a <code>_GLFWlibrary</code> struct named <code>_glfw</code>.</p>
|
||||
<p >The internal interface uses the same style as the public interface, except all global names have a leading underscore.</p>
|
||||
<p >Examples: <code>_glfwIsValidContextConfig</code>, <code>_GLFWwindow</code>, <code>_glfw.monitorCount</code></p>
|
||||
<h1><a class="anchor" id="internals_platform"></a>
|
||||
Platform interface</h1>
|
||||
<p >The platform interface implements all platform-specific operations as a service to the public interface. This includes event processing. The platform interface is never directly called by application code and never directly calls application-provided callbacks. It is also prohibited from modifying the platform-independent part of the internal structs. Instead, it calls the event interface when events interesting to GLFW are received.</p>
|
||||
<p >The platform interface mirrors those parts of the public interface that needs to perform platform-specific operations on some or all platforms. The are also named the same except that the glfw function prefix is replaced by _glfwPlatform.</p>
|
||||
<p >Examples: <code>_glfwPlatformCreateWindow</code></p>
|
||||
<p >The platform interface also defines structs that contain platform-specific global and per-object state. Their names mirror those of the internal interface, except that an interface-specific suffix is added.</p>
|
||||
<p >Examples: <code>_GLFWwindowX11</code>, <code>_GLFWcontextWGL</code></p>
|
||||
<p >These structs are incorporated as members into the internal interface structs using special macros that name them after the specific interface used. This prevents shared code from accidentally using these members.</p>
|
||||
<p >Examples: <code>window->win32.handle</code>, <code>_glfw.x11.display</code></p>
|
||||
<h1><a class="anchor" id="internals_event"></a>
|
||||
Event interface</h1>
|
||||
<p >The event interface is implemented in the same shared source files as the public interface and is responsible for delivering the events it receives to the application, either via callbacks, via window state changes or both.</p>
|
||||
<p >The function names of the event interface use a <code>_glfwInput</code> prefix and the ObjectEvent pattern.</p>
|
||||
<p >Examples: <code>_glfwInputWindowFocus</code>, <code>_glfwInputCursorPos</code></p>
|
||||
<h1><a class="anchor" id="internals_static"></a>
|
||||
Static functions</h1>
|
||||
<p >Static functions may be used by any interface and have no prefixes or suffixes. These use headless camel case.</p>
|
||||
<p >Examples: <code>isValidElementForJoystick</code></p>
|
||||
<h1><a class="anchor" id="internals_config"></a>
|
||||
Configuration macros</h1>
|
||||
<p >GLFW uses a number of configuration macros to select at compile time which interfaces and code paths to use. They are defined in the glfw_config.h header file, which is generated from the <code>glfw_config.h.in</code> file by CMake.</p>
|
||||
<p >Configuration macros the same style as tokens in the public interface, except with a leading underscore.</p>
|
||||
<p >Examples: <code>_GLFW_WIN32</code>, <code>_GLFW_BUILD_DLL</code> </p>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
74
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/intro_8dox.html
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: intro.dox File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">intro.dox File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
329
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/intro_guide.html
vendored
Normal file
@ -0,0 +1,329 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Introduction to the API</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Introduction to the API </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="toc"><h3>Table of Contents</h3>
|
||||
<ul><li class="level1"><a href="#intro_init">Initialization and termination</a><ul><li class="level2"><a href="#intro_init_init">Initializing GLFW</a></li>
|
||||
<li class="level2"><a href="#init_hints">Initialization hints</a><ul><li class="level3"><a href="#init_hints_shared">Shared init hints</a></li>
|
||||
<li class="level3"><a href="#init_hints_osx">macOS specific init hints</a></li>
|
||||
<li class="level3"><a href="#init_hints_values">Supported and default values</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level2"><a href="#intro_init_terminate">Terminating GLFW</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level1"><a href="#error_handling">Error handling</a></li>
|
||||
<li class="level1"><a href="#coordinate_systems">Coordinate systems</a></li>
|
||||
<li class="level1"><a href="#guarantees_limitations">Guarantees and limitations</a><ul><li class="level2"><a href="#lifetime">Pointer lifetimes</a></li>
|
||||
<li class="level2"><a href="#reentrancy">Reentrancy</a></li>
|
||||
<li class="level2"><a href="#thread_safety">Thread safety</a></li>
|
||||
<li class="level2"><a href="#compatibility">Version compatibility</a></li>
|
||||
<li class="level2"><a href="#event_order">Event order</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level1"><a href="#intro_version">Version management</a><ul><li class="level2"><a href="#intro_version_compile">Compile-time version</a></li>
|
||||
<li class="level2"><a href="#intro_version_runtime">Run-time version</a></li>
|
||||
<li class="level2"><a href="#intro_version_string">Version string</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="textblock"><p >This guide introduces the basic concepts of GLFW and describes initialization, error handling and API guarantees and limitations. For a broad but shallow tutorial, see <a class="el" href="quick_guide.html">Getting started</a> instead. For details on a specific function in this category, see the <a class="el" href="group__init.html">Initialization, version and error reference</a>.</p>
|
||||
<p >There are also guides for the other areas of GLFW.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="window_guide.html">Window guide</a></li>
|
||||
<li><a class="el" href="context_guide.html">Context guide</a></li>
|
||||
<li><a class="el" href="vulkan_guide.html">Vulkan guide</a></li>
|
||||
<li><a class="el" href="monitor_guide.html">Monitor guide</a></li>
|
||||
<li><a class="el" href="input_guide.html">Input guide</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="intro_init"></a>
|
||||
Initialization and termination</h1>
|
||||
<p >Before most GLFW functions may be called, the library must be initialized. This initialization checks what features are available on the machine, enumerates monitors and joysticks, initializes the timer and performs any required platform-specific initialization.</p>
|
||||
<p >Only the following functions may be called before the library has been successfully initialized, and only from the main thread.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a></li>
|
||||
<li><a class="el" href="group__init.html#ga026abd003c8e6501981ab1662062f1c0">glfwGetVersionString</a></li>
|
||||
<li><a class="el" href="group__init.html#ga944986b4ec0b928d488141f92982aa18">glfwGetError</a></li>
|
||||
<li><a class="el" href="group__init.html#gaff45816610d53f0b83656092a4034f40">glfwSetErrorCallback</a></li>
|
||||
<li><a class="el" href="group__init.html#ga110fd1d3f0412822b4f1908c026f724a">glfwInitHint</a></li>
|
||||
<li><a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a></li>
|
||||
<li><a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a></li>
|
||||
</ul>
|
||||
<p >Calling any other function before successful initialization will cause a <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> error.</p>
|
||||
<h2><a class="anchor" id="intro_init_init"></a>
|
||||
Initializing GLFW</h2>
|
||||
<p >The library is initialized with <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>, which returns <code>GLFW_FALSE</code> if an error occurred.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordflow">if</span> (!<a class="code hl_function" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a>())</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Handle initialization failure</span></div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="agroup__init_html_ga317aac130a235ab08c6db0834907d85e"><div class="ttname"><a href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a></div><div class="ttdeci">int glfwInit(void)</div><div class="ttdoc">Initializes the GLFW library.</div></div>
|
||||
</div><!-- fragment --><p >If any part of initialization fails, any parts that succeeded are terminated as if <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a> had been called. The library only needs to be initialized once and additional calls to an already initialized library will return <code>GLFW_TRUE</code> immediately.</p>
|
||||
<p >Once the library has been successfully initialized, it should be terminated before the application exits. Modern systems are very good at freeing resources allocated by programs that exit, but GLFW sometimes has to change global system settings and these might not be restored without termination.</p>
|
||||
<h2><a class="anchor" id="init_hints"></a>
|
||||
Initialization hints</h2>
|
||||
<p >Initialization hints are set before <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> and affect how the library behaves until termination. Hints are set with <a class="el" href="group__init.html#ga110fd1d3f0412822b4f1908c026f724a">glfwInitHint</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__init.html#ga110fd1d3f0412822b4f1908c026f724a">glfwInitHint</a>(<a class="code hl_define" href="group__init.html#gab9c0534709fda03ec8959201da3a9a18">GLFW_JOYSTICK_HAT_BUTTONS</a>, <a class="code hl_define" href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a>);</div>
|
||||
<div class="ttc" id="agroup__init_html_ga110fd1d3f0412822b4f1908c026f724a"><div class="ttname"><a href="group__init.html#ga110fd1d3f0412822b4f1908c026f724a">glfwInitHint</a></div><div class="ttdeci">void glfwInitHint(int hint, int value)</div><div class="ttdoc">Sets the specified init hint to the desired value.</div></div>
|
||||
<div class="ttc" id="agroup__init_html_gab9c0534709fda03ec8959201da3a9a18"><div class="ttname"><a href="group__init.html#gab9c0534709fda03ec8959201da3a9a18">GLFW_JOYSTICK_HAT_BUTTONS</a></div><div class="ttdeci">#define GLFW_JOYSTICK_HAT_BUTTONS</div><div class="ttdoc">Joystick hat buttons init hint.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1115</div></div>
|
||||
<div class="ttc" id="agroup__init_html_gac877fe3b627d21ef3a0a23e0a73ba8c5"><div class="ttname"><a href="group__init.html#gac877fe3b627d21ef3a0a23e0a73ba8c5">GLFW_FALSE</a></div><div class="ttdeci">#define GLFW_FALSE</div><div class="ttdoc">Zero.</div><div class="ttdef"><b>Definition:</b> glfw3.h:321</div></div>
|
||||
</div><!-- fragment --><p >The values you set hints to are never reset by GLFW, but they only take effect during initialization. Once GLFW has been initialized, any values you set will be ignored until the library is terminated and initialized again.</p>
|
||||
<p >Some hints are platform specific. These may be set on any platform but they will only affect their specific platform. Other platforms will ignore them. Setting these hints requires no platform specific headers or functions.</p>
|
||||
<h3><a class="anchor" id="init_hints_shared"></a>
|
||||
Shared init hints</h3>
|
||||
<p ><a class="anchor" id="GLFW_JOYSTICK_HAT_BUTTONS"></a><b>GLFW_JOYSTICK_HAT_BUTTONS</b> specifies whether to also expose joystick hats as buttons, for compatibility with earlier versions of GLFW that did not have <a class="el" href="group__input.html#ga06e660841b3e79c54da4f54a932c5a2c">glfwGetJoystickHats</a>. Possible values are <code>GLFW_TRUE</code> and <code>GLFW_FALSE</code>.</p>
|
||||
<h3><a class="anchor" id="init_hints_osx"></a>
|
||||
macOS specific init hints</h3>
|
||||
<p ><a class="anchor" id="GLFW_COCOA_CHDIR_RESOURCES_hint"></a><b>GLFW_COCOA_CHDIR_RESOURCES</b> specifies whether to set the current directory to the application to the <code>Contents/Resources</code> subdirectory of the application's bundle, if present. Set this with <a class="el" href="group__init.html#ga110fd1d3f0412822b4f1908c026f724a">glfwInitHint</a>.</p>
|
||||
<p ><a class="anchor" id="GLFW_COCOA_MENUBAR_hint"></a><b>GLFW_COCOA_MENUBAR</b> specifies whether to create a basic menu bar, either from a nib or manually, when the first window is created, which is when AppKit is initialized. Set this with <a class="el" href="group__init.html#ga110fd1d3f0412822b4f1908c026f724a">glfwInitHint</a>.</p>
|
||||
<h3><a class="anchor" id="init_hints_values"></a>
|
||||
Supported and default values</h3>
|
||||
<table class="markdownTable">
|
||||
<tr class="markdownTableHead">
|
||||
<th class="markdownTableHeadNone">Initialization hint </th><th class="markdownTableHeadNone">Default value </th><th class="markdownTableHeadNone">Supported values </th></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone"><a class="el" href="intro_guide.html#GLFW_JOYSTICK_HAT_BUTTONS">GLFW_JOYSTICK_HAT_BUTTONS</a> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
||||
<tr class="markdownTableRowEven">
|
||||
<td class="markdownTableBodyNone"><a class="el" href="group__init.html#gab937983147a3158d45f88fad7129d9f2">GLFW_COCOA_CHDIR_RESOURCES</a> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
||||
<tr class="markdownTableRowOdd">
|
||||
<td class="markdownTableBodyNone"><a class="el" href="group__init.html#ga71e0b4ce2f2696a84a9b8c5e12dc70cf">GLFW_COCOA_MENUBAR</a> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> </td><td class="markdownTableBodyNone"><code>GLFW_TRUE</code> or <code>GLFW_FALSE</code> </td></tr>
|
||||
</table>
|
||||
<h2><a class="anchor" id="intro_init_terminate"></a>
|
||||
Terminating GLFW</h2>
|
||||
<p >Before your application exits, you should terminate the GLFW library if it has been initialized. This is done with <a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a>();</div>
|
||||
<div class="ttc" id="agroup__init_html_gaaae48c0a18607ea4a4ba951d939f0901"><div class="ttname"><a href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a></div><div class="ttdeci">void glfwTerminate(void)</div><div class="ttdoc">Terminates the GLFW library.</div></div>
|
||||
</div><!-- fragment --><p >This will destroy any remaining window, monitor and cursor objects, restore any modified gamma ramps, re-enable the screensaver if it had been disabled and free any other resources allocated by GLFW.</p>
|
||||
<p >Once the library is terminated, it is as if it had never been initialized and you will need to initialize it again before being able to use GLFW. If the library was not initialized or had already been terminated, it return immediately.</p>
|
||||
<h1><a class="anchor" id="error_handling"></a>
|
||||
Error handling</h1>
|
||||
<p >Some GLFW functions have return values that indicate an error, but this is often not very helpful when trying to figure out what happened or why it occurred. Other functions have no return value reserved for errors, so error notification needs a separate channel. Finally, far from all GLFW functions have return values.</p>
|
||||
<p >The last <a class="el" href="group__errors.html">error code</a> for the calling thread can be queried at any time with <a class="el" href="group__init.html#ga944986b4ec0b928d488141f92982aa18">glfwGetError</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> code = <a class="code hl_function" href="group__init.html#ga944986b4ec0b928d488141f92982aa18">glfwGetError</a>(NULL);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordflow">if</span> (code != <a class="code hl_define" href="group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4">GLFW_NO_ERROR</a>)</div>
|
||||
<div class="line"> handle_error(code);</div>
|
||||
<div class="ttc" id="agroup__errors_html_gafa30deee5db4d69c4c93d116ed87dbf4"><div class="ttname"><a href="group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4">GLFW_NO_ERROR</a></div><div class="ttdeci">#define GLFW_NO_ERROR</div><div class="ttdoc">No error has occurred.</div><div class="ttdef"><b>Definition:</b> glfw3.h:670</div></div>
|
||||
<div class="ttc" id="agroup__init_html_ga944986b4ec0b928d488141f92982aa18"><div class="ttname"><a href="group__init.html#ga944986b4ec0b928d488141f92982aa18">glfwGetError</a></div><div class="ttdeci">int glfwGetError(const char **description)</div><div class="ttdoc">Returns and clears the last error for the calling thread.</div></div>
|
||||
</div><!-- fragment --><p >If no error has occurred since the last call, <a class="el" href="group__errors.html#gafa30deee5db4d69c4c93d116ed87dbf4">GLFW_NO_ERROR</a> (zero) is returned. The error is cleared before the function returns.</p>
|
||||
<p >The error code indicates the general category of the error. Some error codes, such as <a class="el" href="group__errors.html#ga2374ee02c177f12e1fa76ff3ed15e14a">GLFW_NOT_INITIALIZED</a> has only a single meaning, whereas others like <a class="el" href="group__errors.html#gad44162d78100ea5e87cdd38426b8c7a1">GLFW_PLATFORM_ERROR</a> are used for many different errors.</p>
|
||||
<p >GLFW often has more information about an error than its general category. You can retrieve a UTF-8 encoded human-readable description along with the error code. If no error has occurred since the last call, the description is set to <code>NULL</code>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* description;</div>
|
||||
<div class="line"><span class="keywordtype">int</span> code = <a class="code hl_function" href="group__init.html#ga944986b4ec0b928d488141f92982aa18">glfwGetError</a>(&description);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordflow">if</span> (description)</div>
|
||||
<div class="line"> display_error_message(code, description);</div>
|
||||
</div><!-- fragment --><p >The retrieved description string is only valid until the next error occurs. This means you must make a copy of it if you want to keep it.</p>
|
||||
<p >You can also set an error callback, which will be called each time an error occurs. It is set with <a class="el" href="group__init.html#gaff45816610d53f0b83656092a4034f40">glfwSetErrorCallback</a>.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__init.html#gaff45816610d53f0b83656092a4034f40">glfwSetErrorCallback</a>(error_callback);</div>
|
||||
<div class="ttc" id="agroup__init_html_gaff45816610d53f0b83656092a4034f40"><div class="ttname"><a href="group__init.html#gaff45816610d53f0b83656092a4034f40">glfwSetErrorCallback</a></div><div class="ttdeci">GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun callback)</div><div class="ttdoc">Sets the error callback.</div></div>
|
||||
</div><!-- fragment --><p >The error callback receives the same error code and human-readable description returned by <a class="el" href="group__init.html#ga944986b4ec0b928d488141f92982aa18">glfwGetError</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> error_callback(<span class="keywordtype">int</span> code, <span class="keyword">const</span> <span class="keywordtype">char</span>* description)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> display_error_message(code, description);</div>
|
||||
<div class="line">}</div>
|
||||
</div><!-- fragment --><p >The error callback is called after the error is stored, so calling <a class="el" href="group__init.html#ga944986b4ec0b928d488141f92982aa18">glfwGetError</a> from within the error callback returns the same values as the callback argument.</p>
|
||||
<p >The description string passed to the callback is only valid until the error callback returns. This means you must make a copy of it if you want to keep it.</p>
|
||||
<p ><b>Reported errors are never fatal.</b> As long as GLFW was successfully initialized, it will remain initialized and in a safe state until terminated regardless of how many errors occur. If an error occurs during initialization that causes <a class="el" href="group__init.html#ga317aac130a235ab08c6db0834907d85e">glfwInit</a> to fail, any part of the library that was initialized will be safely terminated.</p>
|
||||
<p >Do not rely on a currently invalid call to generate a specific error, as in the future that same call may generate a different error or become valid.</p>
|
||||
<h1><a class="anchor" id="coordinate_systems"></a>
|
||||
Coordinate systems</h1>
|
||||
<p >GLFW has two primary coordinate systems: the <em>virtual screen</em> and the window <em>content area</em> or <em>content area</em>. Both use the same unit: <em>virtual screen coordinates</em>, or just <em>screen coordinates</em>, which don't necessarily correspond to pixels.</p>
|
||||
<p ><img src="spaces.svg" alt="" style="pointer-events: none;" width="90%" class="inline"/></p>
|
||||
<p >Both the virtual screen and the content area coordinate systems have the X-axis pointing to the right and the Y-axis pointing down.</p>
|
||||
<p >Window and monitor positions are specified as the position of the upper-left corners of their content areas relative to the virtual screen, while cursor positions are specified relative to a window's content area.</p>
|
||||
<p >Because the origin of the window's content area coordinate system is also the point from which the window position is specified, you can translate content area coordinates to the virtual screen by adding the window position. The window frame, when present, extends out from the content area but does not affect the window position.</p>
|
||||
<p >Almost all positions and sizes in GLFW are measured in screen coordinates relative to one of the two origins above. This includes cursor positions, window positions and sizes, window frame sizes, monitor positions and video mode resolutions.</p>
|
||||
<p >Two exceptions are the <a class="el" href="monitor_guide.html#monitor_size">monitor physical size</a>, which is measured in millimetres, and <a class="el" href="window_guide.html#window_fbsize">framebuffer size</a>, which is measured in pixels.</p>
|
||||
<p >Pixels and screen coordinates may map 1:1 on your machine, but they won't on every other machine, for example on a Mac with a Retina display. The ratio between screen coordinates and pixels may also change at run-time depending on which monitor the window is currently considered to be on.</p>
|
||||
<h1><a class="anchor" id="guarantees_limitations"></a>
|
||||
Guarantees and limitations</h1>
|
||||
<p >This section describes the conditions under which GLFW can be expected to function, barring bugs in the operating system or drivers. Use of GLFW outside of these limits may work on some platforms, or on some machines, or some of the time, or on some versions of GLFW, but it may break at any time and this will not be considered a bug.</p>
|
||||
<h2><a class="anchor" id="lifetime"></a>
|
||||
Pointer lifetimes</h2>
|
||||
<p >GLFW will never free any pointer you provide to it and you must never free any pointer it provides to you.</p>
|
||||
<p >Many GLFW functions return pointers to dynamically allocated structures, strings or arrays, and some callbacks are provided with strings or arrays. These are always managed by GLFW and should never be freed by the application. The lifetime of these pointers is documented for each GLFW function and callback. If you need to keep this data, you must copy it before its lifetime expires.</p>
|
||||
<p >Many GLFW functions accept pointers to structures or strings allocated by the application. These are never freed by GLFW and are always the responsibility of the application. If GLFW needs to keep the data in these structures or strings, it is copied before the function returns.</p>
|
||||
<p >Pointer lifetimes are guaranteed not to be shortened in future minor or patch releases.</p>
|
||||
<h2><a class="anchor" id="reentrancy"></a>
|
||||
Reentrancy</h2>
|
||||
<p >GLFW event processing and object destruction are not reentrant. This means that the following functions must not be called from any callback function:</p>
|
||||
<ul>
|
||||
<li><a class="el" href="group__window.html#gacdf43e51376051d2c091662e9fe3d7b2">glfwDestroyWindow</a></li>
|
||||
<li><a class="el" href="group__input.html#ga81b952cd1764274d0db7fb3c5a79ba6a">glfwDestroyCursor</a></li>
|
||||
<li><a class="el" href="group__window.html#ga37bd57223967b4211d60ca1a0bf3c832">glfwPollEvents</a></li>
|
||||
<li><a class="el" href="group__window.html#ga554e37d781f0a997656c26b2c56c835e">glfwWaitEvents</a></li>
|
||||
<li><a class="el" href="group__window.html#ga605a178db92f1a7f1a925563ef3ea2cf">glfwWaitEventsTimeout</a></li>
|
||||
<li><a class="el" href="group__init.html#gaaae48c0a18607ea4a4ba951d939f0901">glfwTerminate</a></li>
|
||||
</ul>
|
||||
<p >These functions may be made reentrant in future minor or patch releases, but functions not on this list will not be made non-reentrant.</p>
|
||||
<h2><a class="anchor" id="thread_safety"></a>
|
||||
Thread safety</h2>
|
||||
<p >Most GLFW functions must only be called from the main thread (the thread that calls main), but some may be called from any thread once the library has been initialized. Before initialization the whole library is thread-unsafe.</p>
|
||||
<p >The reference documentation for every GLFW function states whether it is limited to the main thread.</p>
|
||||
<p >Initialization, termination, event processing and the creation and destruction of windows, cursors and OpenGL and OpenGL ES contexts are all restricted to the main thread due to limitations of one or several platforms.</p>
|
||||
<p >Because event processing must be performed on the main thread, all callbacks except for the error callback will only be called on that thread. The error callback may be called on any thread, as any GLFW function may generate errors.</p>
|
||||
<p >The error code and description may be queried from any thread.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="group__init.html#ga944986b4ec0b928d488141f92982aa18">glfwGetError</a></li>
|
||||
</ul>
|
||||
<p >Empty events may be posted from any thread.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="group__window.html#gab5997a25187e9fd5c6f2ecbbc8dfd7e9">glfwPostEmptyEvent</a></li>
|
||||
</ul>
|
||||
<p >The window user pointer and close flag may be read and written from any thread, but this is not synchronized by GLFW.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="group__window.html#gae77a4add0d2023ca21ff1443ced01653">glfwGetWindowUserPointer</a></li>
|
||||
<li><a class="el" href="group__window.html#ga3d2fc6026e690ab31a13f78bc9fd3651">glfwSetWindowUserPointer</a></li>
|
||||
<li><a class="el" href="group__window.html#ga24e02fbfefbb81fc45320989f8140ab5">glfwWindowShouldClose</a></li>
|
||||
<li><a class="el" href="group__window.html#ga49c449dde2a6f87d996f4daaa09d6708">glfwSetWindowShouldClose</a></li>
|
||||
</ul>
|
||||
<p >These functions for working with OpenGL and OpenGL ES contexts may be called from any thread, but the window object is not synchronized by GLFW.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="group__context.html#ga1c04dc242268f827290fe40aa1c91157">glfwMakeContextCurrent</a></li>
|
||||
<li><a class="el" href="group__context.html#gad94e80185397a6cf5fe2ab30567af71c">glfwGetCurrentContext</a></li>
|
||||
<li><a class="el" href="group__window.html#ga15a5a1ee5b3c2ca6b15ca209a12efd14">glfwSwapBuffers</a></li>
|
||||
<li><a class="el" href="group__context.html#ga6d4e0cdf151b5e579bd67f13202994ed">glfwSwapInterval</a></li>
|
||||
<li><a class="el" href="group__context.html#ga87425065c011cef1ebd6aac75e059dfa">glfwExtensionSupported</a></li>
|
||||
<li><a class="el" href="group__context.html#ga35f1837e6f666781842483937612f163">glfwGetProcAddress</a></li>
|
||||
</ul>
|
||||
<p >The raw timer functions may be called from any thread.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="group__input.html#ga3289ee876572f6e91f06df3a24824443">glfwGetTimerFrequency</a></li>
|
||||
<li><a class="el" href="group__input.html#ga09b2bd37d328e0b9456c7ec575cc26aa">glfwGetTimerValue</a></li>
|
||||
</ul>
|
||||
<p >The regular timer may be used from any thread, but reading and writing the timer offset is not synchronized by GLFW.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="group__input.html#gaa6cf4e7a77158a3b8fd00328b1720a4a">glfwGetTime</a></li>
|
||||
<li><a class="el" href="group__input.html#gaf59589ef6e8b8c8b5ad184b25afd4dc0">glfwSetTime</a></li>
|
||||
</ul>
|
||||
<p >Library version information may be queried from any thread.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a></li>
|
||||
<li><a class="el" href="group__init.html#ga026abd003c8e6501981ab1662062f1c0">glfwGetVersionString</a></li>
|
||||
</ul>
|
||||
<p >All Vulkan related functions may be called from any thread.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="group__vulkan.html#ga2e7f30931e02464b5bc8d0d4b6f9fe2b">glfwVulkanSupported</a></li>
|
||||
<li><a class="el" href="group__vulkan.html#ga99ad342d82f4a3421e2864978cb6d1d6">glfwGetRequiredInstanceExtensions</a></li>
|
||||
<li><a class="el" href="group__vulkan.html#gadf228fac94c5fd8f12423ec9af9ff1e9">glfwGetInstanceProcAddress</a></li>
|
||||
<li><a class="el" href="group__vulkan.html#gaff3823355cdd7e2f3f9f4d9ea9518d92">glfwGetPhysicalDevicePresentationSupport</a></li>
|
||||
<li><a class="el" href="group__vulkan.html#ga1a24536bec3f80b08ead18e28e6ae965">glfwCreateWindowSurface</a></li>
|
||||
</ul>
|
||||
<p >GLFW uses synchronization objects internally only to manage the per-thread context and error states. Additional synchronization is left to the application.</p>
|
||||
<p >Functions that may currently be called from any thread will always remain so, but functions that are currently limited to the main thread may be updated to allow calls from any thread in future releases.</p>
|
||||
<h2><a class="anchor" id="compatibility"></a>
|
||||
Version compatibility</h2>
|
||||
<p >GLFW uses <a href="https://semver.org/">Semantic Versioning</a>. This guarantees source and binary backward compatibility with earlier minor versions of the API. This means that you can drop in a newer version of the library and existing programs will continue to compile and existing binaries will continue to run.</p>
|
||||
<p >Once a function or constant has been added, the signature of that function or value of that constant will remain unchanged until the next major version of GLFW. No compatibility of any kind is guaranteed between major versions.</p>
|
||||
<p >Undocumented behavior, i.e. behavior that is not described in the documentation, may change at any time until it is documented.</p>
|
||||
<p >If the reference documentation and the implementation differ, the reference documentation will almost always take precedence and the implementation will be fixed in the next release. The reference documentation will also take precedence over anything stated in a guide.</p>
|
||||
<h2><a class="anchor" id="event_order"></a>
|
||||
Event order</h2>
|
||||
<p >The order of arrival of related events is not guaranteed to be consistent across platforms. The exception is synthetic key and mouse button release events, which are always delivered after the window defocus event.</p>
|
||||
<h1><a class="anchor" id="intro_version"></a>
|
||||
Version management</h1>
|
||||
<p >GLFW provides mechanisms for identifying what version of GLFW your application was compiled against as well as what version it is currently running against. If you are loading GLFW dynamically (not just linking dynamically), you can use this to verify that the library binary is compatible with your application.</p>
|
||||
<h2><a class="anchor" id="intro_version_compile"></a>
|
||||
Compile-time version</h2>
|
||||
<p >The compile-time version of GLFW is provided by the GLFW header with the <code>GLFW_VERSION_MAJOR</code>, <code>GLFW_VERSION_MINOR</code> and <code>GLFW_VERSION_REVISION</code> macros.</p>
|
||||
<div class="fragment"><div class="line">printf(<span class="stringliteral">"Compiled against GLFW %i.%i.%i\n"</span>,</div>
|
||||
<div class="line"> <a class="code hl_define" href="group__init.html#ga6337d9ea43b22fc529b2bba066b4a576">GLFW_VERSION_MAJOR</a>,</div>
|
||||
<div class="line"> <a class="code hl_define" href="group__init.html#gaf80d40f0aea7088ff337606e9c48f7a3">GLFW_VERSION_MINOR</a>,</div>
|
||||
<div class="line"> <a class="code hl_define" href="group__init.html#gab72ae2e2035d9ea461abc3495eac0502">GLFW_VERSION_REVISION</a>);</div>
|
||||
<div class="ttc" id="agroup__init_html_ga6337d9ea43b22fc529b2bba066b4a576"><div class="ttname"><a href="group__init.html#ga6337d9ea43b22fc529b2bba066b4a576">GLFW_VERSION_MAJOR</a></div><div class="ttdeci">#define GLFW_VERSION_MAJOR</div><div class="ttdoc">The major version number of the GLFW header.</div><div class="ttdef"><b>Definition:</b> glfw3.h:287</div></div>
|
||||
<div class="ttc" id="agroup__init_html_gab72ae2e2035d9ea461abc3495eac0502"><div class="ttname"><a href="group__init.html#gab72ae2e2035d9ea461abc3495eac0502">GLFW_VERSION_REVISION</a></div><div class="ttdeci">#define GLFW_VERSION_REVISION</div><div class="ttdoc">The revision number of the GLFW header.</div><div class="ttdef"><b>Definition:</b> glfw3.h:301</div></div>
|
||||
<div class="ttc" id="agroup__init_html_gaf80d40f0aea7088ff337606e9c48f7a3"><div class="ttname"><a href="group__init.html#gaf80d40f0aea7088ff337606e9c48f7a3">GLFW_VERSION_MINOR</a></div><div class="ttdeci">#define GLFW_VERSION_MINOR</div><div class="ttdoc">The minor version number of the GLFW header.</div><div class="ttdef"><b>Definition:</b> glfw3.h:294</div></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="intro_version_runtime"></a>
|
||||
Run-time version</h2>
|
||||
<p >The run-time version can be retrieved with <a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a>, a function that may be called regardless of whether GLFW is initialized.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> major, minor, revision;</div>
|
||||
<div class="line"><a class="code hl_function" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a>(&major, &minor, &revision);</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line">printf(<span class="stringliteral">"Running against GLFW %i.%i.%i\n"</span>, major, minor, revision);</div>
|
||||
<div class="ttc" id="agroup__init_html_ga9f8ffaacf3c269cc48eafbf8b9b71197"><div class="ttname"><a href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a></div><div class="ttdeci">void glfwGetVersion(int *major, int *minor, int *rev)</div><div class="ttdoc">Retrieves the version of the GLFW library.</div></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="intro_version_string"></a>
|
||||
Version string</h2>
|
||||
<p >GLFW 3 also provides a compile-time generated version string that describes the version, platform, compiler and any platform-specific compile-time options. This is primarily intended for submitting bug reports, to allow developers to see which code paths are enabled in a binary.</p>
|
||||
<p >The version string is returned by <a class="el" href="group__init.html#ga026abd003c8e6501981ab1662062f1c0">glfwGetVersionString</a>, a function that may be called regardless of whether GLFW is initialized.</p>
|
||||
<p ><b>Do not use the version string</b> to parse the GLFW library version. The <a class="el" href="group__init.html#ga9f8ffaacf3c269cc48eafbf8b9b71197">glfwGetVersion</a> function already provides the version of the running library binary.</p>
|
||||
<p >The format of the string is as follows:</p><ul>
|
||||
<li>The version of GLFW</li>
|
||||
<li>The name of the window system API</li>
|
||||
<li>The name of the context creation API</li>
|
||||
<li>Any additional options or APIs</li>
|
||||
</ul>
|
||||
<p >For example, when compiling GLFW 3.0 with MinGW using the Win32 and WGL back ends, the version string may look something like this:</p>
|
||||
<div class="fragment"><div class="line">3.0.0 Win32 WGL MinGW</div>
|
||||
</div><!-- fragment --> </div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
35
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/jquery.js
vendored
Normal file
74
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/main_8dox.html
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: main.dox File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">main.dox File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
135
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/menu.js
vendored
Normal file
@ -0,0 +1,135 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
|
||||
function makeTree(data,relPath) {
|
||||
var result='';
|
||||
if ('children' in data) {
|
||||
result+='<ul>';
|
||||
for (var i in data.children) {
|
||||
var url;
|
||||
var link;
|
||||
link = data.children[i].url;
|
||||
if (link.substring(0,1)=='^') {
|
||||
url = link.substring(1);
|
||||
} else {
|
||||
url = relPath+link;
|
||||
}
|
||||
result+='<li><a href="'+url+'">'+
|
||||
data.children[i].text+'</a>'+
|
||||
makeTree(data.children[i],relPath)+'</li>';
|
||||
}
|
||||
result+='</ul>';
|
||||
}
|
||||
return result;
|
||||
}
|
||||
var searchBox;
|
||||
if (searchEnabled) {
|
||||
if (serverSide) {
|
||||
searchBox='<div id="MSearchBox" class="MSearchBoxInactive">'+
|
||||
'<div class="left">'+
|
||||
'<form id="FSearchBox" action="'+relPath+searchPage+
|
||||
'" method="get"><img id="MSearchSelect" src="'+
|
||||
relPath+'search/mag.svg" alt=""/>'+
|
||||
'<input type="text" id="MSearchField" name="query" value="'+search+
|
||||
'" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)"'+
|
||||
' onblur="searchBox.OnSearchFieldFocus(false)">'+
|
||||
'</form>'+
|
||||
'</div>'+
|
||||
'<div class="right"></div>'+
|
||||
'</div>';
|
||||
} else {
|
||||
searchBox='<div id="MSearchBox" class="MSearchBoxInactive">'+
|
||||
'<span class="left">'+
|
||||
'<img id="MSearchSelect" src="'+relPath+
|
||||
'search/mag_sel.svg" onmouseover="return searchBox.OnSearchSelectShow()"'+
|
||||
' onmouseout="return searchBox.OnSearchSelectHide()" alt=""/>'+
|
||||
'<input type="text" id="MSearchField" value="'+search+
|
||||
'" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" '+
|
||||
'onblur="searchBox.OnSearchFieldFocus(false)" '+
|
||||
'onkeyup="searchBox.OnSearchFieldChange(event)"/>'+
|
||||
'</span>'+
|
||||
'<span class="right"><a id="MSearchClose" '+
|
||||
'href="javascript:searchBox.CloseResultsWindow()">'+
|
||||
'<img id="MSearchCloseImg" border="0" src="'+relPath+
|
||||
'search/close.svg" alt=""/></a>'
|
||||
'</span>'
|
||||
'</div>';
|
||||
}
|
||||
}
|
||||
|
||||
$('#main-nav').before('<div class="sm sm-dox"><input id="main-menu-state" type="checkbox"/>'+
|
||||
'<label class="main-menu-btn" for="main-menu-state">'+
|
||||
'<span class="main-menu-btn-icon"></span> '+
|
||||
'Toggle main menu visibility</label>'+
|
||||
'<span id="searchBoxPos1" style="position:absolute;right:8px;top:8px;height:36px;"></span>'+
|
||||
'</div>');
|
||||
$('#main-nav').append(makeTree(menudata,relPath));
|
||||
$('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
|
||||
if (searchBox) {
|
||||
$('#main-menu').append('<li id="searchBoxPos2" style="float:right"></li>');
|
||||
}
|
||||
var $mainMenuState = $('#main-menu-state');
|
||||
var prevWidth = 0;
|
||||
if ($mainMenuState.length) {
|
||||
function initResizableIfExists() {
|
||||
if (typeof initResizable==='function') initResizable();
|
||||
}
|
||||
// animate mobile menu
|
||||
$mainMenuState.change(function(e) {
|
||||
var $menu = $('#main-menu');
|
||||
var options = { duration: 250, step: initResizableIfExists };
|
||||
if (this.checked) {
|
||||
options['complete'] = function() { $menu.css('display', 'block') };
|
||||
$menu.hide().slideDown(options);
|
||||
} else {
|
||||
options['complete'] = function() { $menu.css('display', 'none') };
|
||||
$menu.show().slideUp(options);
|
||||
}
|
||||
});
|
||||
// set default menu visibility
|
||||
function resetState() {
|
||||
var $menu = $('#main-menu');
|
||||
var $mainMenuState = $('#main-menu-state');
|
||||
var newWidth = $(window).outerWidth();
|
||||
if (newWidth!=prevWidth) {
|
||||
if ($(window).outerWidth()<768) {
|
||||
$mainMenuState.prop('checked',false); $menu.hide();
|
||||
$('#searchBoxPos1').html(searchBox);
|
||||
$('#searchBoxPos2').hide();
|
||||
} else {
|
||||
$menu.show();
|
||||
$('#searchBoxPos1').empty();
|
||||
$('#searchBoxPos2').html(searchBox);
|
||||
$('#searchBoxPos2').show();
|
||||
}
|
||||
prevWidth = newWidth;
|
||||
}
|
||||
}
|
||||
$(window).ready(function() { resetState(); initResizableIfExists(); });
|
||||
$(window).resize(resetState);
|
||||
}
|
||||
$('#main-menu').smartmenus();
|
||||
}
|
||||
/* @license-end */
|
||||
30
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/menudata.js
vendored
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
@licstart The following is the entire license notice for the JavaScript code in this file.
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 1997-2020 by Dimitri van Heesch
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the "Software"), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute,
|
||||
sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or
|
||||
substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
|
||||
BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
|
||||
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
@licend The above is the entire license notice for the JavaScript code in this file
|
||||
*/
|
||||
var menudata={children:[
|
||||
{text:"Introduction",url:"index.html"},
|
||||
{text:"Tutorial",url:"quick_guide.html"},
|
||||
{text:"Guides",url:"pages.html"},
|
||||
{text:"Reference",url:"modules.html"},
|
||||
{text:"Files",url:"files.html"}]}
|
||||
94
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/modules.html
vendored
Normal file
@ -0,0 +1,94 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
</div><!-- top -->
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="textblock">Here is a list of all modules:</div><div class="directory">
|
||||
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span>]</div><table class="directory">
|
||||
<tr id="row_0_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a class="el" href="group__context.html" target="_self">Context reference</a></td><td class="desc">Functions and types related to OpenGL and OpenGL ES contexts </td></tr>
|
||||
<tr id="row_1_"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_1_" class="arrow" onclick="toggleFolder('1_')">▼</span><a class="el" href="group__init.html" target="_self">Initialization, version and error reference</a></td><td class="desc">Functions and types related to initialization and error handling </td></tr>
|
||||
<tr id="row_1_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a class="el" href="group__errors.html" target="_self">Error codes</a></td><td class="desc">Error codes </td></tr>
|
||||
<tr id="row_2_"><td class="entry"><span style="width:0px;display:inline-block;"> </span><span id="arr_2_" class="arrow" onclick="toggleFolder('2_')">▼</span><a class="el" href="group__input.html" target="_self">Input reference</a></td><td class="desc">Functions and types related to input handling </td></tr>
|
||||
<tr id="row_2_0_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a class="el" href="group__gamepad__axes.html" target="_self">Gamepad axes</a></td><td class="desc">Gamepad axes </td></tr>
|
||||
<tr id="row_2_1_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a class="el" href="group__gamepad__buttons.html" target="_self">Gamepad buttons</a></td><td class="desc">Gamepad buttons </td></tr>
|
||||
<tr id="row_2_2_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a class="el" href="group__hat__state.html" target="_self">Joystick hat states</a></td><td class="desc">Joystick hat states </td></tr>
|
||||
<tr id="row_2_3_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a class="el" href="group__joysticks.html" target="_self">Joysticks</a></td><td class="desc">Joystick IDs </td></tr>
|
||||
<tr id="row_2_4_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a class="el" href="group__keys.html" target="_self">Keyboard keys</a></td><td class="desc">Keyboard key IDs </td></tr>
|
||||
<tr id="row_2_5_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a class="el" href="group__mods.html" target="_self">Modifier key flags</a></td><td class="desc">Modifier key flags </td></tr>
|
||||
<tr id="row_2_6_" class="even"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a class="el" href="group__buttons.html" target="_self">Mouse buttons</a></td><td class="desc">Mouse button IDs </td></tr>
|
||||
<tr id="row_2_7_"><td class="entry"><span style="width:32px;display:inline-block;"> </span><a class="el" href="group__shapes.html" target="_self">Standard cursor shapes</a></td><td class="desc">Standard system cursor shapes </td></tr>
|
||||
<tr id="row_3_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a class="el" href="group__monitor.html" target="_self">Monitor reference</a></td><td class="desc">Functions and types related to monitors </td></tr>
|
||||
<tr id="row_4_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a class="el" href="group__native.html" target="_self">Native access</a></td><td class="desc">Functions related to accessing native handles </td></tr>
|
||||
<tr id="row_5_" class="even"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a class="el" href="group__vulkan.html" target="_self">Vulkan support reference</a></td><td class="desc">Functions and types related to Vulkan </td></tr>
|
||||
<tr id="row_6_"><td class="entry"><span style="width:16px;display:inline-block;"> </span><a class="el" href="group__window.html" target="_self">Window reference</a></td><td class="desc">Functions and types related to windows </td></tr>
|
||||
</table>
|
||||
</div><!-- directory -->
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
74
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/monitor_8dox.html
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: monitor.dox File Reference</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div class="header">
|
||||
<div class="headertitle"><div class="title">monitor.dox File Reference</div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
</div><!-- contents -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||
222
external/windows_deps/glfw-3.3.8.bin.WIN64/docs/html/monitor_guide.html
vendored
Normal file
@ -0,0 +1,222 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
|
||||
<meta name="generator" content="Doxygen 1.9.4"/>
|
||||
<title>GLFW: Monitor guide</title>
|
||||
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="jquery.js"></script>
|
||||
<script type="text/javascript" src="dynsections.js"></script>
|
||||
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
||||
<script type="text/javascript" src="search/searchdata.js"></script>
|
||||
<script type="text/javascript" src="search/search.js"></script>
|
||||
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
||||
<link href="extra.css" rel="stylesheet" type="text/css"/>
|
||||
</head>
|
||||
<body>
|
||||
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
||||
<div id="titlearea">
|
||||
<div class="glfwheader">
|
||||
<a href="https://www.glfw.org/" id="glfwhome">GLFW</a>
|
||||
<ul class="glfwnavbar">
|
||||
<li><a href="https://www.glfw.org/documentation.html">Documentation</a></li>
|
||||
<li><a href="https://www.glfw.org/download.html">Download</a></li>
|
||||
<li><a href="https://www.glfw.org/community.html">Community</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end header part -->
|
||||
<!-- Generated by Doxygen 1.9.4 -->
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
||||
/* @license-end */
|
||||
</script>
|
||||
<script type="text/javascript" src="menudata.js"></script>
|
||||
<script type="text/javascript" src="menu.js"></script>
|
||||
<script type="text/javascript">
|
||||
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
||||
$(function() {
|
||||
initMenu('',true,false,'search.php','Search');
|
||||
$(document).ready(function() { init_search(); });
|
||||
});
|
||||
/* @license-end */
|
||||
</script>
|
||||
<div id="main-nav"></div>
|
||||
<!-- window showing the filter options -->
|
||||
<div id="MSearchSelectWindow"
|
||||
onmouseover="return searchBox.OnSearchSelectShow()"
|
||||
onmouseout="return searchBox.OnSearchSelectHide()"
|
||||
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
||||
</div>
|
||||
|
||||
<!-- iframe showing the search results (closed by default) -->
|
||||
<div id="MSearchResultsWindow">
|
||||
<iframe src="javascript:void(0)" frameborder="0"
|
||||
name="MSearchResults" id="MSearchResults">
|
||||
</iframe>
|
||||
</div>
|
||||
|
||||
</div><!-- top -->
|
||||
<div><div class="header">
|
||||
<div class="headertitle"><div class="title">Monitor guide </div></div>
|
||||
</div><!--header-->
|
||||
<div class="contents">
|
||||
<div class="toc"><h3>Table of Contents</h3>
|
||||
<ul><li class="level1"><a href="#monitor_object">Monitor objects</a><ul><li class="level2"><a href="#monitor_monitors">Retrieving monitors</a></li>
|
||||
<li class="level2"><a href="#monitor_event">Monitor configuration changes</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="level1"><a href="#monitor_properties">Monitor properties</a><ul><li class="level2"><a href="#monitor_modes">Video modes</a></li>
|
||||
<li class="level2"><a href="#monitor_size">Physical size</a></li>
|
||||
<li class="level2"><a href="#monitor_scale">Content scale</a></li>
|
||||
<li class="level2"><a href="#monitor_pos">Virtual position</a></li>
|
||||
<li class="level2"><a href="#monitor_workarea">Work area</a></li>
|
||||
<li class="level2"><a href="#monitor_name">Human-readable name</a></li>
|
||||
<li class="level2"><a href="#monitor_userptr">User pointer</a></li>
|
||||
<li class="level2"><a href="#monitor_gamma">Gamma ramp</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="textblock"><p >This guide introduces the monitor related functions of GLFW. For details on a specific function in this category, see the <a class="el" href="group__monitor.html">Monitor reference</a>. There are also guides for the other areas of GLFW.</p>
|
||||
<ul>
|
||||
<li><a class="el" href="intro_guide.html">Introduction to the API</a></li>
|
||||
<li><a class="el" href="window_guide.html">Window guide</a></li>
|
||||
<li><a class="el" href="context_guide.html">Context guide</a></li>
|
||||
<li><a class="el" href="vulkan_guide.html">Vulkan guide</a></li>
|
||||
<li><a class="el" href="input_guide.html">Input guide</a></li>
|
||||
</ul>
|
||||
<h1><a class="anchor" id="monitor_object"></a>
|
||||
Monitor objects</h1>
|
||||
<p >A monitor object represents a currently connected monitor and is represented as a pointer to the <a href="https://en.wikipedia.org/wiki/Opaque_data_type">opaque</a> type <a class="el" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>. Monitor objects cannot be created or destroyed by the application and retain their addresses until the monitors they represent are disconnected or until the library is <a class="el" href="intro_guide.html#intro_init_terminate">terminated</a>.</p>
|
||||
<p >Each monitor has a current video mode, a list of supported video modes, a virtual position, a human-readable name, an estimated physical size and a gamma ramp. One of the monitors is the primary monitor.</p>
|
||||
<p >The virtual position of a monitor is in <a class="el" href="intro_guide.html#coordinate_systems">screen coordinates</a> and, together with the current video mode, describes the viewports that the connected monitors provide into the virtual desktop that spans them.</p>
|
||||
<p >To see how GLFW views your monitor setup and its available video modes, run the <code>monitors</code> test program.</p>
|
||||
<h2><a class="anchor" id="monitor_monitors"></a>
|
||||
Retrieving monitors</h2>
|
||||
<p >The primary monitor is returned by <a class="el" href="group__monitor.html#gac3adb24947eb709e1874028272e5dfc5">glfwGetPrimaryMonitor</a>. It is the user's preferred monitor and is usually the one with global UI elements like task bar or menu bar.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* primary = <a class="code hl_function" href="group__monitor.html#gac3adb24947eb709e1874028272e5dfc5">glfwGetPrimaryMonitor</a>();</div>
|
||||
<div class="ttc" id="agroup__monitor_html_ga8d9efd1cde9426692c73fe40437d0ae3"><div class="ttname"><a href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a></div><div class="ttdeci">struct GLFWmonitor GLFWmonitor</div><div class="ttdoc">Opaque monitor object.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1173</div></div>
|
||||
<div class="ttc" id="agroup__monitor_html_gac3adb24947eb709e1874028272e5dfc5"><div class="ttname"><a href="group__monitor.html#gac3adb24947eb709e1874028272e5dfc5">glfwGetPrimaryMonitor</a></div><div class="ttdeci">GLFWmonitor * glfwGetPrimaryMonitor(void)</div><div class="ttdoc">Returns the primary monitor.</div></div>
|
||||
</div><!-- fragment --><p >You can retrieve all currently connected monitors with <a class="el" href="group__monitor.html#ga70b1156d5d24e9928f145d6c864369d2">glfwGetMonitors</a>. See the reference documentation for the lifetime of the returned array.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> count;</div>
|
||||
<div class="line"><a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>** monitors = <a class="code hl_function" href="group__monitor.html#ga70b1156d5d24e9928f145d6c864369d2">glfwGetMonitors</a>(&count);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_ga70b1156d5d24e9928f145d6c864369d2"><div class="ttname"><a href="group__monitor.html#ga70b1156d5d24e9928f145d6c864369d2">glfwGetMonitors</a></div><div class="ttdeci">GLFWmonitor ** glfwGetMonitors(int *count)</div><div class="ttdoc">Returns the currently connected monitors.</div></div>
|
||||
</div><!-- fragment --><p >The primary monitor is always the first monitor in the returned array, but other monitors may be moved to a different index when a monitor is connected or disconnected.</p>
|
||||
<h2><a class="anchor" id="monitor_event"></a>
|
||||
Monitor configuration changes</h2>
|
||||
<p >If you wish to be notified when a monitor is connected or disconnected, set a monitor callback.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__monitor.html#gab39df645587c8518192aa746c2fb06c3">glfwSetMonitorCallback</a>(monitor_callback);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_gab39df645587c8518192aa746c2fb06c3"><div class="ttname"><a href="group__monitor.html#gab39df645587c8518192aa746c2fb06c3">glfwSetMonitorCallback</a></div><div class="ttdeci">GLFWmonitorfun glfwSetMonitorCallback(GLFWmonitorfun callback)</div><div class="ttdoc">Sets the monitor configuration callback.</div></div>
|
||||
</div><!-- fragment --><p >The callback function receives the handle for the monitor that has been connected or disconnected and the event that occurred.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">void</span> monitor_callback(<a class="code hl_typedef" href="group__monitor.html#ga8d9efd1cde9426692c73fe40437d0ae3">GLFWmonitor</a>* monitor, <span class="keywordtype">int</span> event)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="keywordflow">if</span> (event == <a class="code hl_define" href="glfw3_8h.html#abe11513fd1ffbee5bb9b173f06028b9e">GLFW_CONNECTED</a>)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// The monitor was connected</span></div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line"> <span class="keywordflow">else</span> <span class="keywordflow">if</span> (event == <a class="code hl_define" href="glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32">GLFW_DISCONNECTED</a>)</div>
|
||||
<div class="line"> {</div>
|
||||
<div class="line"> <span class="comment">// The monitor was disconnected</span></div>
|
||||
<div class="line"> }</div>
|
||||
<div class="line">}</div>
|
||||
<div class="ttc" id="aglfw3_8h_html_aab64b25921ef21d89252d6f0a71bfc32"><div class="ttname"><a href="glfw3_8h.html#aab64b25921ef21d89252d6f0a71bfc32">GLFW_DISCONNECTED</a></div><div class="ttdeci">#define GLFW_DISCONNECTED</div><div class="ttdef"><b>Definition:</b> glfw3.h:1107</div></div>
|
||||
<div class="ttc" id="aglfw3_8h_html_abe11513fd1ffbee5bb9b173f06028b9e"><div class="ttname"><a href="glfw3_8h.html#abe11513fd1ffbee5bb9b173f06028b9e">GLFW_CONNECTED</a></div><div class="ttdeci">#define GLFW_CONNECTED</div><div class="ttdef"><b>Definition:</b> glfw3.h:1106</div></div>
|
||||
</div><!-- fragment --><p >If a monitor is disconnected, all windows that are full screen on it will be switched to windowed mode before the callback is called. Only <a class="el" href="group__monitor.html#ga7af83e13489d90379588fb331b9e4b68">glfwGetMonitorName</a> and <a class="el" href="group__monitor.html#ga1adbfbfb8cd58b23cfee82e574fbbdc5">glfwGetMonitorUserPointer</a> will return useful values for a disconnected monitor and only before the monitor callback returns.</p>
|
||||
<h1><a class="anchor" id="monitor_properties"></a>
|
||||
Monitor properties</h1>
|
||||
<p >Each monitor has a current video mode, a list of supported video modes, a virtual position, a content scale, a human-readable name, a user pointer, an estimated physical size and a gamma ramp.</p>
|
||||
<h2><a class="anchor" id="monitor_modes"></a>
|
||||
Video modes</h2>
|
||||
<p >GLFW generally does a good job selecting a suitable video mode when you create a full screen window, change its video mode or make a windowed one full screen, but it is sometimes useful to know exactly which video modes are supported.</p>
|
||||
<p >Video modes are represented as <a class="el" href="structGLFWvidmode.html">GLFWvidmode</a> structures. You can get an array of the video modes supported by a monitor with <a class="el" href="group__monitor.html#gad2e24d2843cb7d6c26202cddd530fc1b">glfwGetVideoModes</a>. See the reference documentation for the lifetime of the returned array.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> count;</div>
|
||||
<div class="line"><a class="code hl_struct" href="structGLFWvidmode.html">GLFWvidmode</a>* modes = <a class="code hl_function" href="group__monitor.html#gad2e24d2843cb7d6c26202cddd530fc1b">glfwGetVideoModes</a>(monitor, &count);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_gad2e24d2843cb7d6c26202cddd530fc1b"><div class="ttname"><a href="group__monitor.html#gad2e24d2843cb7d6c26202cddd530fc1b">glfwGetVideoModes</a></div><div class="ttdeci">const GLFWvidmode * glfwGetVideoModes(GLFWmonitor *monitor, int *count)</div><div class="ttdoc">Returns the available video modes for the specified monitor.</div></div>
|
||||
<div class="ttc" id="astructGLFWvidmode_html"><div class="ttname"><a href="structGLFWvidmode.html">GLFWvidmode</a></div><div class="ttdoc">Video mode type.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1658</div></div>
|
||||
</div><!-- fragment --><p >To get the current video mode of a monitor call <a class="el" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a>. See the reference documentation for the lifetime of the returned pointer.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">const</span> <a class="code hl_struct" href="structGLFWvidmode.html">GLFWvidmode</a>* mode = <a class="code hl_function" href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a>(monitor);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_gaba376fa7e76634b4788bddc505d6c9d5"><div class="ttname"><a href="group__monitor.html#gaba376fa7e76634b4788bddc505d6c9d5">glfwGetVideoMode</a></div><div class="ttdeci">const GLFWvidmode * glfwGetVideoMode(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the current mode of the specified monitor.</div></div>
|
||||
</div><!-- fragment --><p >The resolution of a video mode is specified in <a class="el" href="intro_guide.html#coordinate_systems">screen coordinates</a>, not pixels.</p>
|
||||
<h2><a class="anchor" id="monitor_size"></a>
|
||||
Physical size</h2>
|
||||
<p >The physical size of a monitor in millimetres, or an estimation of it, can be retrieved with <a class="el" href="group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea">glfwGetMonitorPhysicalSize</a>. This has no relation to its current <em>resolution</em>, i.e. the width and height of its current <a class="el" href="monitor_guide.html#monitor_modes">video mode</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> width_mm, height_mm;</div>
|
||||
<div class="line"><a class="code hl_function" href="group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea">glfwGetMonitorPhysicalSize</a>(monitor, &width_mm, &height_mm);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_ga7d8bffc6c55539286a6bd20d32a8d7ea"><div class="ttname"><a href="group__monitor.html#ga7d8bffc6c55539286a6bd20d32a8d7ea">glfwGetMonitorPhysicalSize</a></div><div class="ttdeci">void glfwGetMonitorPhysicalSize(GLFWmonitor *monitor, int *widthMM, int *heightMM)</div><div class="ttdoc">Returns the physical size of the monitor.</div></div>
|
||||
</div><!-- fragment --><p >While this can be used to calculate the raw DPI of a monitor, this is often not useful. Instead use the <a class="el" href="monitor_guide.html#monitor_scale">monitor content scale</a> and <a class="el" href="window_guide.html#window_scale">window content scale</a> to scale your content.</p>
|
||||
<h2><a class="anchor" id="monitor_scale"></a>
|
||||
Content scale</h2>
|
||||
<p >The content scale for a monitor can be retrieved with <a class="el" href="group__monitor.html#gad3152e84465fa620b601265ebfcdb21b">glfwGetMonitorContentScale</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">float</span> xscale, yscale;</div>
|
||||
<div class="line"><a class="code hl_function" href="group__monitor.html#gad3152e84465fa620b601265ebfcdb21b">glfwGetMonitorContentScale</a>(monitor, &xscale, &yscale);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_gad3152e84465fa620b601265ebfcdb21b"><div class="ttname"><a href="group__monitor.html#gad3152e84465fa620b601265ebfcdb21b">glfwGetMonitorContentScale</a></div><div class="ttdeci">void glfwGetMonitorContentScale(GLFWmonitor *monitor, float *xscale, float *yscale)</div><div class="ttdoc">Retrieves the content scale for the specified monitor.</div></div>
|
||||
</div><!-- fragment --><p >The content scale is the ratio between the current DPI and the platform's default DPI. This is especially important for text and any UI elements. If the pixel dimensions of your UI scaled by this look appropriate on your machine then it should appear at a reasonable size on other machines regardless of their DPI and scaling settings. This relies on the system DPI and scaling settings being somewhat correct.</p>
|
||||
<p >The content scale may depend on both the monitor resolution and pixel density and on user settings. It may be very different from the raw DPI calculated from the physical size and current resolution.</p>
|
||||
<h2><a class="anchor" id="monitor_pos"></a>
|
||||
Virtual position</h2>
|
||||
<p >The position of the monitor on the virtual desktop, in <a class="el" href="intro_guide.html#coordinate_systems">screen coordinates</a>, can be retrieved with <a class="el" href="group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9">glfwGetMonitorPos</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> xpos, ypos;</div>
|
||||
<div class="line"><a class="code hl_function" href="group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9">glfwGetMonitorPos</a>(monitor, &xpos, &ypos);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_ga102f54e7acc9149edbcf0997152df8c9"><div class="ttname"><a href="group__monitor.html#ga102f54e7acc9149edbcf0997152df8c9">glfwGetMonitorPos</a></div><div class="ttdeci">void glfwGetMonitorPos(GLFWmonitor *monitor, int *xpos, int *ypos)</div><div class="ttdoc">Returns the position of the monitor's viewport on the virtual screen.</div></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="monitor_workarea"></a>
|
||||
Work area</h2>
|
||||
<p >The area of a monitor not occupied by global task bars or menu bars is the work area. This is specified in <a class="el" href="intro_guide.html#coordinate_systems">screen coordinates</a> and can be retrieved with <a class="el" href="group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0">glfwGetMonitorWorkarea</a>.</p>
|
||||
<div class="fragment"><div class="line"><span class="keywordtype">int</span> xpos, ypos, width, height;</div>
|
||||
<div class="line"><a class="code hl_function" href="group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0">glfwGetMonitorWorkarea</a>(monitor, &xpos, &ypos, &width, &height);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0"><div class="ttname"><a href="group__monitor.html#ga7387a3bdb64bfe8ebf2b9e54f5b6c9d0">glfwGetMonitorWorkarea</a></div><div class="ttdeci">void glfwGetMonitorWorkarea(GLFWmonitor *monitor, int *xpos, int *ypos, int *width, int *height)</div><div class="ttdoc">Retrieves the work area of the monitor.</div></div>
|
||||
</div><!-- fragment --><h2><a class="anchor" id="monitor_name"></a>
|
||||
Human-readable name</h2>
|
||||
<p >The human-readable, UTF-8 encoded name of a monitor is returned by <a class="el" href="group__monitor.html#ga7af83e13489d90379588fb331b9e4b68">glfwGetMonitorName</a>. See the reference documentation for the lifetime of the returned string.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">const</span> <span class="keywordtype">char</span>* name = <a class="code hl_function" href="group__monitor.html#ga7af83e13489d90379588fb331b9e4b68">glfwGetMonitorName</a>(monitor);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_ga7af83e13489d90379588fb331b9e4b68"><div class="ttname"><a href="group__monitor.html#ga7af83e13489d90379588fb331b9e4b68">glfwGetMonitorName</a></div><div class="ttdeci">const char * glfwGetMonitorName(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the name of the specified monitor.</div></div>
|
||||
</div><!-- fragment --><p >Monitor names are not guaranteed to be unique. Two monitors of the same model and make may have the same name. Only the monitor handle is guaranteed to be unique, and only until that monitor is disconnected.</p>
|
||||
<h2><a class="anchor" id="monitor_userptr"></a>
|
||||
User pointer</h2>
|
||||
<p >Each monitor has a user pointer that can be set with <a class="el" href="group__monitor.html#ga702750e24313a686d3637297b6e85fda">glfwSetMonitorUserPointer</a> and queried with <a class="el" href="group__monitor.html#ga1adbfbfb8cd58b23cfee82e574fbbdc5">glfwGetMonitorUserPointer</a>. This can be used for any purpose you need and will not be modified by GLFW. The value will be kept until the monitor is disconnected or until the library is terminated.</p>
|
||||
<p >The initial value of the pointer is <code>NULL</code>.</p>
|
||||
<h2><a class="anchor" id="monitor_gamma"></a>
|
||||
Gamma ramp</h2>
|
||||
<p >The gamma ramp of a monitor can be set with <a class="el" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a>, which accepts a monitor handle and a pointer to a <a class="el" href="structGLFWgammaramp.html">GLFWgammaramp</a> structure.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_struct" href="structGLFWgammaramp.html">GLFWgammaramp</a> ramp;</div>
|
||||
<div class="line"><span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> red[256], green[256], blue[256];</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line">ramp.<a class="code hl_variable" href="structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5">size</a> = 256;</div>
|
||||
<div class="line">ramp.<a class="code hl_variable" href="structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138">red</a> = red;</div>
|
||||
<div class="line">ramp.<a class="code hl_variable" href="structGLFWgammaramp.html#affccc6f5df47820b6562d709da3a5a3a">green</a> = green;</div>
|
||||
<div class="line">ramp.<a class="code hl_variable" href="structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b">blue</a> = blue;</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><span class="keywordflow">for</span> (i = 0; i < ramp.<a class="code hl_variable" href="structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5">size</a>; i++)</div>
|
||||
<div class="line">{</div>
|
||||
<div class="line"> <span class="comment">// Fill out gamma ramp arrays as desired</span></div>
|
||||
<div class="line">}</div>
|
||||
<div class="line"> </div>
|
||||
<div class="line"><a class="code hl_function" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a>(monitor, &ramp);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_ga583f0ffd0d29613d8cd172b996bbf0dd"><div class="ttname"><a href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a></div><div class="ttdeci">void glfwSetGammaRamp(GLFWmonitor *monitor, const GLFWgammaramp *ramp)</div><div class="ttdoc">Sets the current gamma ramp for the specified monitor.</div></div>
|
||||
<div class="ttc" id="astructGLFWgammaramp_html"><div class="ttname"><a href="structGLFWgammaramp.html">GLFWgammaramp</a></div><div class="ttdoc">Gamma ramp.</div><div class="ttdef"><b>Definition:</b> glfw3.h:1692</div></div>
|
||||
<div class="ttc" id="astructGLFWgammaramp_html_a2cce5d968734b685623eef913e635138"><div class="ttname"><a href="structGLFWgammaramp.html#a2cce5d968734b685623eef913e635138">GLFWgammaramp::red</a></div><div class="ttdeci">unsigned short * red</div><div class="ttdef"><b>Definition:</b> glfw3.h:1695</div></div>
|
||||
<div class="ttc" id="astructGLFWgammaramp_html_acf0c836d0efe29c392fe8d1a1042744b"><div class="ttname"><a href="structGLFWgammaramp.html#acf0c836d0efe29c392fe8d1a1042744b">GLFWgammaramp::blue</a></div><div class="ttdeci">unsigned short * blue</div><div class="ttdef"><b>Definition:</b> glfw3.h:1701</div></div>
|
||||
<div class="ttc" id="astructGLFWgammaramp_html_ad620e1cffbff9a32c51bca46301b59a5"><div class="ttname"><a href="structGLFWgammaramp.html#ad620e1cffbff9a32c51bca46301b59a5">GLFWgammaramp::size</a></div><div class="ttdeci">unsigned int size</div><div class="ttdef"><b>Definition:</b> glfw3.h:1704</div></div>
|
||||
<div class="ttc" id="astructGLFWgammaramp_html_affccc6f5df47820b6562d709da3a5a3a"><div class="ttname"><a href="structGLFWgammaramp.html#affccc6f5df47820b6562d709da3a5a3a">GLFWgammaramp::green</a></div><div class="ttdeci">unsigned short * green</div><div class="ttdef"><b>Definition:</b> glfw3.h:1698</div></div>
|
||||
</div><!-- fragment --><p >The gamma ramp data is copied before the function returns, so there is no need to keep it around once the ramp has been set.</p>
|
||||
<p >It is recommended that your gamma ramp have the same size as the current gamma ramp for that monitor.</p>
|
||||
<p >The current gamma ramp for a monitor is returned by <a class="el" href="group__monitor.html#ga76ba90debcf0062b5c4b73052b24f96f">glfwGetGammaRamp</a>. See the reference documentation for the lifetime of the returned structure.</p>
|
||||
<div class="fragment"><div class="line"><span class="keyword">const</span> <a class="code hl_struct" href="structGLFWgammaramp.html">GLFWgammaramp</a>* ramp = <a class="code hl_function" href="group__monitor.html#ga76ba90debcf0062b5c4b73052b24f96f">glfwGetGammaRamp</a>(monitor);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_ga76ba90debcf0062b5c4b73052b24f96f"><div class="ttname"><a href="group__monitor.html#ga76ba90debcf0062b5c4b73052b24f96f">glfwGetGammaRamp</a></div><div class="ttdeci">const GLFWgammaramp * glfwGetGammaRamp(GLFWmonitor *monitor)</div><div class="ttdoc">Returns the current gamma ramp for the specified monitor.</div></div>
|
||||
</div><!-- fragment --><p >If you wish to set a regular gamma ramp, you can have GLFW calculate it for you from the desired exponent with <a class="el" href="group__monitor.html#ga6ac582625c990220785ddd34efa3169a">glfwSetGamma</a>, which in turn calls <a class="el" href="group__monitor.html#ga583f0ffd0d29613d8cd172b996bbf0dd">glfwSetGammaRamp</a> with the resulting ramp.</p>
|
||||
<div class="fragment"><div class="line"><a class="code hl_function" href="group__monitor.html#ga6ac582625c990220785ddd34efa3169a">glfwSetGamma</a>(monitor, 1.0);</div>
|
||||
<div class="ttc" id="agroup__monitor_html_ga6ac582625c990220785ddd34efa3169a"><div class="ttname"><a href="group__monitor.html#ga6ac582625c990220785ddd34efa3169a">glfwSetGamma</a></div><div class="ttdeci">void glfwSetGamma(GLFWmonitor *monitor, float gamma)</div><div class="ttdoc">Generates a gamma ramp and sets it for the specified monitor.</div></div>
|
||||
</div><!-- fragment --><p >To experiment with gamma correction via the <a class="el" href="group__monitor.html#ga6ac582625c990220785ddd34efa3169a">glfwSetGamma</a> function, run the <code>gamma</code> test program.</p>
|
||||
<dl class="section note"><dt>Note</dt><dd>The software controlled gamma ramp is applied <em>in addition</em> to the hardware gamma correction, which today is usually an approximation of sRGB gamma. This means that setting a perfectly linear ramp, or gamma 1.0, will produce the default (usually sRGB-like) behavior. </dd></dl>
|
||||
</div></div><!-- contents -->
|
||||
</div><!-- PageDoc -->
|
||||
<address class="footer">
|
||||
<p>
|
||||
Last update on Fri Jul 22 2022 for GLFW 3.3.8
|
||||
</p>
|
||||
</address>
|
||||
</body>
|
||||
</html>
|
||||