Files
vibe5_metal/CMakeLists.txt
Sergio Valor eed0eeb747 Implementación inicial de vibe5_metal: sprites con alpha blending
Motor de renderizado Metal completo con:
- Renderizado de fondo degradado (púrpura a cyan)
- Triángulo RGB con interpolación de colores
- Renderizado de sprites con alpha blending y filtro NEAREST
- Integración de Metal Performance HUD para métricas FPS/debug
- Integración SDL3 + Metal usando Objective-C++

Características implementadas:
 Múltiples pipelines de renderizado (fondo, triángulo, sprites)
 Carga de texturas con NSImage/CoreGraphics
 Configuración de alpha blending para sprites
 Muestreo de texturas anti-blur (MTLSamplerMinMagFilterNearest)
 Estructuras de vértices y shaders apropiados
 Metal HUD para monitoreo de rendimiento

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-28 18:07:52 +02:00

41 lines
1.1 KiB
CMake

cmake_minimum_required(VERSION 3.10)
project(vibe5_metal)
# C++ estándar
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Buscar SDL3
find_package(SDL3 REQUIRED CONFIG REQUIRED COMPONENTS SDL3)
# Crear ejecutable principal
add_executable(vibe5_metal source/main.cpp)
# Solo en macOS, usar Objective-C++
if(APPLE)
set_source_files_properties(source/main.cpp PROPERTIES COMPILE_FLAGS "-x objective-c++")
# Frameworks necesarios en macOS
find_library(METAL_FRAMEWORK Metal)
find_library(QUARTZCORE_FRAMEWORK QuartzCore)
find_library(FOUNDATION_FRAMEWORK Foundation)
find_library(APPKIT_FRAMEWORK AppKit)
target_link_libraries(vibe5_metal
SDL3::SDL3
${METAL_FRAMEWORK}
${QUARTZCORE_FRAMEWORK}
${FOUNDATION_FRAMEWORK}
${APPKIT_FRAMEWORK}
)
else()
target_link_libraries(vibe5_metal SDL3::SDL3)
endif()
# Definir macro para macOS
if(APPLE)
target_compile_definitions(vibe5_metal PRIVATE __APPLE__)
endif()
# Ubicación del ejecutable
set_target_properties(vibe5_metal PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR})