diff options
| author | raysan5 <raysan5@gmail.com> | 2015-04-13 20:15:28 +0200 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2015-04-13 20:15:28 +0200 |
| commit | 7d2318c1677fd6e81b8cc63b040289148ca8adfc (patch) | |
| tree | a8782a2ecfa48440e8bad02ed3be112dbacac441 /src/rlgl.h | |
| parent | a632a04a300a60232f6b9a941e73af08d74c6e6a (diff) | |
| download | raylib-7d2318c1677fd6e81b8cc63b040289148ca8adfc.tar.gz raylib-7d2318c1677fd6e81b8cc63b040289148ca8adfc.zip | |
WIP on shaders and textures
Moved functions: LoadShader(), UnloadShader()
Add support for PVR textures compressed/uncompressed
WIP: Detect available extensions for compressed textures
Diffstat (limited to 'src/rlgl.h')
| -rw-r--r-- | src/rlgl.h | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -104,6 +104,8 @@ typedef enum { OPENGL_11 = 1, OPENGL_33, OPENGL_ES_20 } GlVersion; COMPRESSED_ETC1_RGB, // 4 bpp COMPRESSED_ETC2_RGB, // 4 bpp COMPRESSED_ETC2_EAC_RGBA, // 8 bpp + COMPRESSED_PVRT_RGB, // 4 bpp + COMPRESSED_PVRT_RGBA, // 4 bpp /*COMPRESSED_ASTC_RGBA_4x4*/ // 8 bpp } TextureFormat; @@ -208,10 +210,12 @@ void rlglDraw(void); // Draw VAO/VBO void rlglInitGraphics(int offsetX, int offsetY, int width, int height); // Initialize Graphics (OpenGL stuff) unsigned int rlglLoadTexture(void *data, int width, int height, int textureFormat, int mipmapCount, bool genMipmaps); // Load in GPU OpenGL texture -unsigned int rlglLoadShader(char *vShaderStr, char *fShaderStr); // Load a shader from text data +Shader rlglLoadShader(char *vsFileName, char *fsFileName); // Load a shader (vertex shader + fragment shader) from files +unsigned int rlglLoadShaderFromText(char *vShaderStr, char *fShaderStr); // Load a shader from text data void rlglInitPostpro(void); // Initialize postprocessing system void rlglDrawPostpro(void); // Draw with postprocessing shader void rlglSetPostproShader(Shader shader); // Set postprocessing shader +void rlglSetModelShader(Model *model, Shader shader); // Set shader for a model Model rlglLoadModel(VertexData mesh); // Upload vertex data into GPU and provided VAO/VBO ids void rlglDrawModel(Model model, Vector3 position, float rotationAngle, Vector3 rotationAxis, Vector3 scale, Color color, bool wires); |
