Ver código fonte

misc: compilation fixes for Windows, X360 and PS3 introduced by the

texture class refactor.
legacy
Sam Hocevar sam 12 anos atrás
pai
commit
8a688a7d50
2 arquivos alterados com 11 adições e 6 exclusões
  1. +1
    -1
      src/gpu/texture.cpp
  2. +10
    -5
      tutorial/11_fractal.cpp

+ 1
- 1
src/gpu/texture.cpp Ver arquivo

@@ -66,7 +66,7 @@ static GLenum const TEXTURE_TYPE = GL_UNSIGNED_INT_8_8_8_8_REV;
static GLint const INTERNAL_FORMAT = GL_RGBA;
static GLenum const TEXTURE_FORMAT = GL_RGBA;
static GLenum const TEXTURE_TYPE = GL_UNSIGNED_BYTE;
#else
#elif !defined USE_D3D9 && !defined _XBOX
/* Seems efficient for little endian textures */
static GLint const INTERNAL_FORMAT = GL_RGBA;
static GLenum const TEXTURE_FORMAT = GL_BGRA;


+ 10
- 5
tutorial/11_fractal.cpp Ver arquivo

@@ -13,10 +13,15 @@
#endif

#include <cstring>
#include <cstdio>

#include "core.h"
#include "loldebug.h"

#if defined _WIN32
# include <direct.h>
#endif

using namespace lol;

extern char const *lolfx_11_fractal;
@@ -279,17 +284,17 @@ public:

#if !defined __native_client__
char buf[256];
sprintf(buf, "center: ");
std::sprintf(buf, "center: ");
m_center.x.sprintf(buf + strlen(buf), 30);
sprintf(buf + strlen(buf), " ");
std::sprintf(buf + strlen(buf), " ");
m_center.y.sprintf(buf + strlen(buf), 30);
m_centertext->SetText(buf);
sprintf(buf, " mouse: ");
std::sprintf(buf, " mouse: ");
worldmouse.x.sprintf(buf + strlen(buf), 30);
sprintf(buf + strlen(buf), " ");
std::sprintf(buf + strlen(buf), " ");
worldmouse.y.sprintf(buf + strlen(buf), 30);
m_mousetext->SetText(buf);
sprintf(buf, " zoom: %g", 1.0 / m_radius);
std::sprintf(buf, " zoom: %g", 1.0 / m_radius);
m_zoomtext->SetText(buf);
#endif



Carregando…
Cancelar
Salvar