migrant a SDL3
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include "jail_shader.h"
|
||||
#include <SDL3/SDL_rect.h> // Para SDL_Point
|
||||
#include <SDL3/SDL_rect.h> // Para SDL_FPoint
|
||||
#include <SDL3/SDL_stdinc.h> // Para SDL_bool
|
||||
#include <cstring> // Para strncmp
|
||||
#include <iostream> // Para basic_ostream, operator<<, endl, cout
|
||||
@@ -25,7 +25,7 @@ namespace shader
|
||||
GLuint programId = 0;
|
||||
SDL_Texture *backBuffer = nullptr;
|
||||
SDL_Point win_size = {320 * 4, 256 * 4};
|
||||
SDL_Point tex_size = {320, 256};
|
||||
SDL_FPoint tex_size = {320, 256};
|
||||
bool usingOpenGL = false;
|
||||
|
||||
#ifndef __APPLE__
|
||||
@@ -157,12 +157,13 @@ namespace shader
|
||||
shader::backBuffer = texturaBackBuffer;
|
||||
SDL_GetWindowSize(ventana, &win_size.x, &win_size.y);
|
||||
|
||||
int acceso;
|
||||
SDL_QueryTexture(texturaBackBuffer, nullptr, &acceso, &tex_size.x, &tex_size.y);
|
||||
if (acceso != SDL_TEXTUREACCESS_TARGET)
|
||||
//int acceso;
|
||||
SDL_GetTextureSize(texturaBackBuffer, &tex_size.x, &tex_size.y);
|
||||
// SDL_QueryTexture(texturaBackBuffer, nullptr, &acceso, &tex_size.x, &tex_size.y);
|
||||
/*if (acceso != SDL_TEXTUREACCESS_TARGET)
|
||||
{
|
||||
throw std::runtime_error("ERROR FATAL: La textura debe tener definido SDL_TEXTUREACCESS_TARGET.");
|
||||
}
|
||||
}*/
|
||||
|
||||
const auto RENDER_NAME = SDL_GetRendererName(renderer);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user