Files
c-prime/application/demos/example.opengl/engine/sampler2D.h

97 lines
1.0 KiB
C
Raw Normal View History

2025-11-17 10:28:09 +01:00
#ifndef _sampler2D
#define _sampler2D
// Macros
#define GL_GLEXT_PROTOTYPES
#include "stdlib.h"
extern char * __ClassNames[];
// Includes
#include "../vector3.h"
#include "../array.h"
#include "stdbool.h"
#include "./texture2D.h"
#include <GL/glx.h>
#include <GL/gl.h>
#include <GL/glext.h>
typedef struct sampler2D{
texture2D * texture;
array * textures;
GLuint glTexture;
GLint binded;
GLint filter;
GLint MIN_FILTER;
GLint MAG_FILTER;
GLint WRAP_S;
GLint WRAP_T;
GLint datatype;
GLint format;
GLint internalFormat;
GLint target;
GLint type;
vector3 * cubeSize;
GLint border;
GLint generateMipmap;
bool UNPACK_ALIGNMENT;
GLuint index;
} sampler2D;
void sampler2D_constructor( sampler2D * this );
void sampler2D_addTexture( sampler2D * this, texture2D * texture );
int sampler2D_getTextureIndex( sampler2D * this );
void sampler2D_bind( sampler2D * this );
sampler2D sampler2D_new( );
sampler2D * sampler2D_newPointer( );
#endif
typedef struct sampler2D sampler2D;