2018-11-16 00:42:29 +01:00
|
|
|
/*****************************************************************************\
|
|
|
|
Snes9x - Portable Super Nintendo Entertainment System (TM) emulator.
|
|
|
|
This file is licensed under the Snes9x License.
|
|
|
|
For further information, consult the LICENSE file in the root directory.
|
|
|
|
\*****************************************************************************/
|
|
|
|
|
2018-05-11 22:56:58 +02:00
|
|
|
#ifndef __SHADER_HELPERS_H
|
|
|
|
#define __SHADER_HELPERS_H
|
2018-05-11 01:47:55 +02:00
|
|
|
|
2018-05-14 01:12:30 +02:00
|
|
|
#include "shader_platform.h"
|
2018-05-11 01:47:55 +02:00
|
|
|
|
|
|
|
typedef struct _STGA
|
|
|
|
{
|
|
|
|
_STGA()
|
|
|
|
{
|
|
|
|
data = (unsigned char*)0;
|
|
|
|
width = 0;
|
|
|
|
height = 0;
|
|
|
|
byteCount = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
~_STGA()
|
|
|
|
{
|
|
|
|
delete[] data;
|
|
|
|
data = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
void destroy()
|
|
|
|
{
|
|
|
|
delete[] data;
|
|
|
|
data = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
unsigned char byteCount;
|
|
|
|
unsigned char* data;
|
|
|
|
} STGA;
|
|
|
|
|
|
|
|
bool loadPngImage(const char* name,
|
|
|
|
int& outWidth,
|
|
|
|
int& outHeight,
|
|
|
|
bool& outHasAlpha,
|
|
|
|
GLubyte** outData);
|
|
|
|
|
|
|
|
bool loadTGA(const char* filename, STGA& tgaFile);
|
|
|
|
|
|
|
|
void glLogErrors (void);
|
|
|
|
|
2018-05-11 22:56:58 +02:00
|
|
|
bool srgb_available (void);
|
|
|
|
bool float_texture_available (void);
|
|
|
|
bool gl_version_at_least (int maj, int min);
|
|
|
|
|
|
|
|
#endif // __SHADER_HELPERS_H
|