Merge: doc -> main
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/gl.h>
|
||||
#include "main.h"
|
||||
#include <GL/gl.h>
|
||||
|
||||
void set_clean_color_context( unsigned char r, unsigned char g, unsigned char b )
|
||||
{
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include <GLFW/glfw3.h>
|
||||
#include "main.h"
|
||||
#define inline
|
||||
#include <cglm/quat.h>
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
#define ANGLE ((float)0x02/0xff*2*GLM_PI)
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
#include <GL/gl.h>
|
||||
|
||||
#include "main.h"
|
||||
#include "data/cube.h"
|
||||
#include "data/axis.h"
|
||||
#include "data/shaders.h"
|
||||
#include <GL/glew.h>
|
||||
//#include <stdlib.h>
|
||||
|
||||
#define WIDTH 512
|
||||
#define HEIGHT 512
|
||||
@@ -31,6 +31,8 @@ int main( void )
|
||||
use_window( window );
|
||||
set_clean_color_context( 0x2E, 0x07, 0x3F );
|
||||
|
||||
glewInit();
|
||||
|
||||
if( !( shader = create_shader() ) )
|
||||
goto error_shader;
|
||||
|
||||
@@ -57,13 +59,14 @@ int main( void )
|
||||
load_rot_matrix( shader, q );
|
||||
|
||||
clean_context();
|
||||
|
||||
#ifndef DEBUG
|
||||
load_mdl_matrix( shader, 0, 0 );
|
||||
draw_mesh( m_axis );
|
||||
load_mdl_matrix( shader, 1, 1 );
|
||||
draw_mesh( m_axis );
|
||||
load_mdl_matrix( shader, 2, 2 );
|
||||
draw_mesh( m_axis );
|
||||
#endif
|
||||
load_mdl_matrix( shader, 0, 3 );
|
||||
draw_mesh( m_cube );
|
||||
}
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
#include "main.h"
|
||||
#define inline
|
||||
#include <cglm/mat4.h>
|
||||
#include <cglm/cam.h>
|
||||
#include <cglm/quat.h>
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/gl.h>
|
||||
#include <stdlib.h>
|
||||
#include "main.h"
|
||||
#include <GL/glew.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
struct obj
|
||||
{
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
#include <GL/gl.h>
|
||||
#include "main.h"
|
||||
#include <GL/glew.h>
|
||||
|
||||
#ifdef DEBUG
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#define NULL ((void*)0)
|
||||
|
||||
void destroy_shader( unsigned int shader )
|
||||
{
|
||||
return glDeleteProgram( shader );
|
||||
@@ -38,7 +35,7 @@ unsigned char gload_program( unsigned int program, const char * src,
|
||||
return 0;
|
||||
|
||||
shader = glCreateShader(type[i]);
|
||||
glShaderSource( shader, 1, (const GLchar **)&src, NULL);
|
||||
glShaderSource( shader, 1, (const GLchar **)&src, ((void*)0 ));
|
||||
glCompileShader(shader);
|
||||
glGetShaderiv( shader, GL_COMPILE_STATUS, &status );
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include "main.h"
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glew.h>
|
||||
|
||||
#define TYPE GL_TEXTURE_2D_ARRAY
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <GLFW/glfw3.h>
|
||||
#include "main.h"
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
void __window_callback( GLFWwindow * window, int w, int h )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user