Added GLEW support and shader are functional now
All fragments will be painted red
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 768 KiB After Width: | Height: | Size: 768 KiB |
BIN
img/tests/test.gif
Normal file
|
After Width: | Height: | Size: 56 KiB |
BIN
img/tests/test.jpeg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
img/tests/test.jpg
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
img/tests/test.png
Normal file
|
After Width: | Height: | Size: 876 KiB |
BIN
opengl-test-two/bin/glew32.dll
Normal file
BIN
opengl-test-two/bin/glewinfo.exe
Normal file
BIN
opengl-test-two/bin/visualinfo.exe
Normal file
2261
opengl-test-two/include/GL/eglew.h
Normal file
20113
opengl-test-two/include/GL/glew.h
Normal file
1769
opengl-test-two/include/GL/glxew.h
Normal file
1427
opengl-test-two/include/GL/wglew.h
Normal file
BIN
opengl-test-two/lib/SDL2.dll
Normal file
BIN
opengl-test-two/lib/SDL2_image.dll
Normal file
BIN
opengl-test-two/lib/glew32.dll
Normal file
BIN
opengl-test-two/lib/glew32mx.dll
Normal file
BIN
opengl-test-two/lib/libglew32.a
Normal file
BIN
opengl-test-two/lib/libglew32.dll.a
Normal file
BIN
opengl-test-two/lib/libglew32mx.a
Normal file
BIN
opengl-test-two/lib/libglew32mx.dll.a
Normal file
BIN
opengl-test-two/lib/libjpeg-9.dll
Normal file
BIN
opengl-test-two/lib/libpng16-16.dll
Normal file
BIN
opengl-test-two/lib/libtiff-5.dll
Normal file
BIN
opengl-test-two/lib/libwebp-4.dll
Normal file
BIN
opengl-test-two/lib/zlib1.dll
Normal file
@@ -1,16 +1,15 @@
|
|||||||
|
// http://stackoverflow.com/questions/6005076/building-glew-on-windows-with-mingw
|
||||||
|
|
||||||
|
#define GLEW_STATIC
|
||||||
|
#include <GL/glew.h>
|
||||||
#include <GLFW/glfw3.h>
|
#include <GLFW/glfw3.h>
|
||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <SDL2/SDL_image.h>
|
#include <SDL2/SDL_image.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <fstream>
|
||||||
GLuint loadBMP_custom(const char * imagepath);
|
#include <vector>
|
||||||
|
#include <stdexcept>
|
||||||
void EnableTransparency()
|
|
||||||
{
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
|
|
||||||
}
|
|
||||||
|
|
||||||
GLuint LoadTexture(char *filename,int *textw,int *texth) {
|
GLuint LoadTexture(char *filename,int *textw,int *texth) {
|
||||||
SDL_Surface *surface;
|
SDL_Surface *surface;
|
||||||
@@ -71,19 +70,120 @@ void DrawTexture(int x, int y, GLuint textureid,int textw,int texth) {
|
|||||||
glDisable(GL_TEXTURE_2D );
|
glDisable(GL_TEXTURE_2D );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GLuint LoadShaders(const char * vertex_file_path,const char * fragment_file_path){
|
||||||
|
|
||||||
|
// Create the shaders
|
||||||
|
GLuint VertexShaderID = glCreateShader(GL_VERTEX_SHADER);
|
||||||
|
GLuint FragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER);
|
||||||
|
|
||||||
|
// Read the Vertex Shader code from the file
|
||||||
|
std::string VertexShaderCode;
|
||||||
|
std::ifstream VertexShaderStream(vertex_file_path, std::ios::in);
|
||||||
|
if(VertexShaderStream.is_open()){
|
||||||
|
std::string Line = "";
|
||||||
|
while(getline(VertexShaderStream, Line))
|
||||||
|
VertexShaderCode += "\n" + Line;
|
||||||
|
VertexShaderStream.close();
|
||||||
|
}else{
|
||||||
|
printf("Impossible to open %s. Are you in the right directory ? Don't forget to read the FAQ !\n", vertex_file_path);
|
||||||
|
getchar();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Read the Fragment Shader code from the file
|
||||||
|
std::string FragmentShaderCode;
|
||||||
|
std::ifstream FragmentShaderStream(fragment_file_path, std::ios::in);
|
||||||
|
if(FragmentShaderStream.is_open()){
|
||||||
|
std::string Line = "";
|
||||||
|
while(getline(FragmentShaderStream, Line))
|
||||||
|
FragmentShaderCode += "\n" + Line;
|
||||||
|
FragmentShaderStream.close();
|
||||||
|
}
|
||||||
|
|
||||||
|
GLint Result = GL_FALSE;
|
||||||
|
int InfoLogLength;
|
||||||
|
|
||||||
|
|
||||||
|
// Compile Vertex Shader
|
||||||
|
printf("Compiling shader : %s\n", vertex_file_path);
|
||||||
|
char const * VertexSourcePointer = VertexShaderCode.c_str();
|
||||||
|
glShaderSource(VertexShaderID, 1, &VertexSourcePointer , NULL);
|
||||||
|
glCompileShader(VertexShaderID);
|
||||||
|
|
||||||
|
// Check Vertex Shader
|
||||||
|
glGetShaderiv(VertexShaderID, GL_COMPILE_STATUS, &Result);
|
||||||
|
glGetShaderiv(VertexShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);
|
||||||
|
if ( InfoLogLength > 0 ){
|
||||||
|
std::vector<char> VertexShaderErrorMessage(InfoLogLength+1);
|
||||||
|
glGetShaderInfoLog(VertexShaderID, InfoLogLength, NULL, &VertexShaderErrorMessage[0]);
|
||||||
|
printf("%s\n", &VertexShaderErrorMessage[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Compile Fragment Shader
|
||||||
|
printf("Compiling shader : %s\n", fragment_file_path);
|
||||||
|
char const * FragmentSourcePointer = FragmentShaderCode.c_str();
|
||||||
|
glShaderSource(FragmentShaderID, 1, &FragmentSourcePointer , NULL);
|
||||||
|
glCompileShader(FragmentShaderID);
|
||||||
|
|
||||||
|
// Check Fragment Shader
|
||||||
|
glGetShaderiv(FragmentShaderID, GL_COMPILE_STATUS, &Result);
|
||||||
|
glGetShaderiv(FragmentShaderID, GL_INFO_LOG_LENGTH, &InfoLogLength);
|
||||||
|
if ( InfoLogLength > 0 ){
|
||||||
|
std::vector<char> FragmentShaderErrorMessage(InfoLogLength+1);
|
||||||
|
glGetShaderInfoLog(FragmentShaderID, InfoLogLength, NULL, &FragmentShaderErrorMessage[0]);
|
||||||
|
printf("%s\n", &FragmentShaderErrorMessage[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Link the program
|
||||||
|
printf("Linking program\n");
|
||||||
|
GLuint ProgramID = glCreateProgram();
|
||||||
|
glAttachShader(ProgramID, VertexShaderID);
|
||||||
|
glAttachShader(ProgramID, FragmentShaderID);
|
||||||
|
glLinkProgram(ProgramID);
|
||||||
|
|
||||||
|
// Check the program
|
||||||
|
glGetProgramiv(ProgramID, GL_LINK_STATUS, &Result);
|
||||||
|
glGetProgramiv(ProgramID, GL_INFO_LOG_LENGTH, &InfoLogLength);
|
||||||
|
if ( InfoLogLength > 0 ){
|
||||||
|
std::vector<char> ProgramErrorMessage(InfoLogLength+1);
|
||||||
|
glGetProgramInfoLog(ProgramID, InfoLogLength, NULL, &ProgramErrorMessage[0]);
|
||||||
|
printf("%s\n", &ProgramErrorMessage[0]);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
glDetachShader(ProgramID, VertexShaderID);
|
||||||
|
glDetachShader(ProgramID, FragmentShaderID);
|
||||||
|
|
||||||
|
glDeleteShader(VertexShaderID);
|
||||||
|
glDeleteShader(FragmentShaderID);
|
||||||
|
|
||||||
|
return ProgramID;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main(int argc, char* args[]) {
|
int main(int argc, char* args[]) {
|
||||||
GLFWwindow* window;
|
GLFWwindow* window;
|
||||||
GLuint myglu;
|
GLuint tex_jpe;
|
||||||
|
GLuint tex_jpg;
|
||||||
|
GLuint tex_gif;
|
||||||
|
GLuint tex_png;
|
||||||
|
GLuint tex_bmp;
|
||||||
int textw, texth;
|
int textw, texth;
|
||||||
|
int timer = 0;
|
||||||
|
|
||||||
|
|
||||||
/* Initialize the library */
|
/* Initialize the library */
|
||||||
|
|
||||||
/* GLFW */
|
/* GLFW */
|
||||||
if (!glfwInit())
|
if (!glfwInit()) {
|
||||||
return -1;
|
printf("GLFW Error");
|
||||||
/* SDL */
|
return 1;
|
||||||
if (SDL_Init(SDL_INIT_VIDEO) < 0)
|
}
|
||||||
printf("SDL Error");
|
|
||||||
/* Create a windowed mode window and its OpenGL context */
|
/* Create a windowed mode window and its OpenGL context */
|
||||||
window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
|
window = glfwCreateWindow(640, 480, "Hello World", NULL, NULL);
|
||||||
if (!window) {
|
if (!window) {
|
||||||
@@ -92,18 +192,54 @@ int main(int argc, char* args[]) {
|
|||||||
}
|
}
|
||||||
/* Make the window's context current */
|
/* Make the window's context current */
|
||||||
glfwMakeContextCurrent(window);
|
glfwMakeContextCurrent(window);
|
||||||
|
|
||||||
|
/* GLEW */
|
||||||
|
glewExperimental = GL_FALSE;
|
||||||
|
GLenum error = glGetError();
|
||||||
|
if (error != GL_NO_ERROR)
|
||||||
|
{
|
||||||
|
std::cout << "OpenGL Error: " << error << std::endl;
|
||||||
|
}
|
||||||
|
GLenum glewinit = glewInit();
|
||||||
|
if (glewinit != GLEW_OK) {
|
||||||
|
std::cout << "Glew not okay! " << glewinit;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* SDL */
|
||||||
|
if (SDL_Init(SDL_INIT_VIDEO) < 0) {
|
||||||
|
printf("SDL Error");
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
// INIT
|
// INIT
|
||||||
|
|
||||||
myglu=LoadTexture("../img/tests/stones.bmp",&textw,&texth);
|
tex_jpe=LoadTexture("../img/tests/test.jpeg",&textw,&texth);
|
||||||
|
tex_jpg=LoadTexture("../img/tests/test.jpg",&textw,&texth);
|
||||||
|
tex_png=LoadTexture("../img/tests/test.png",&textw,&texth);
|
||||||
|
tex_bmp=LoadTexture("../img/tests/test.bmp",&textw,&texth);
|
||||||
|
|
||||||
|
GLuint programID = LoadShaders("trimap.vertexshader", "trimap.fragmentshader");
|
||||||
|
printf("%d", programID);
|
||||||
|
|
||||||
// INIT END
|
// INIT END
|
||||||
/* Loop until the user closes the window */
|
/* Loop until the user closes the window */
|
||||||
while (!glfwWindowShouldClose(window)) {
|
while (!glfwWindowShouldClose(window)) {
|
||||||
|
timer += 1;
|
||||||
|
if (timer==800)
|
||||||
|
timer = 0;
|
||||||
/* Render here */
|
/* Render here */
|
||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||||
// RENDER
|
glUseProgram(programID);
|
||||||
DrawTexture(50,50,myglu,textw,texth);
|
|
||||||
|
|
||||||
|
// RENDER
|
||||||
|
if (timer<200)
|
||||||
|
DrawTexture(50,50,tex_jpe,textw,texth);
|
||||||
|
else if (timer<400)
|
||||||
|
DrawTexture(50,50,tex_jpg,textw,texth);
|
||||||
|
else if (timer<600)
|
||||||
|
DrawTexture(50,50,tex_png,textw,texth);
|
||||||
|
else
|
||||||
|
DrawTexture(50,50,tex_bmp,textw,texth);
|
||||||
|
|
||||||
// RENDER END
|
// RENDER END
|
||||||
/* Swap front and back buffers */
|
/* Swap front and back buffers */
|
||||||
|
|||||||
@@ -34,6 +34,7 @@
|
|||||||
<Add directory="include" />
|
<Add directory="include" />
|
||||||
</Compiler>
|
</Compiler>
|
||||||
<Linker>
|
<Linker>
|
||||||
|
<Add library="glew32" />
|
||||||
<Add library="glfw3" />
|
<Add library="glfw3" />
|
||||||
<Add library="gdi32" />
|
<Add library="gdi32" />
|
||||||
<Add library="opengl32" />
|
<Add library="opengl32" />
|
||||||
@@ -41,7 +42,6 @@
|
|||||||
<Add library="SDL2main" />
|
<Add library="SDL2main" />
|
||||||
<Add library="SDL2" />
|
<Add library="SDL2" />
|
||||||
<Add library="SDL2_image" />
|
<Add library="SDL2_image" />
|
||||||
<Add directory="lib-mingw" />
|
|
||||||
<Add directory="lib" />
|
<Add directory="lib" />
|
||||||
</Linker>
|
</Linker>
|
||||||
<Unit filename="main.cpp" />
|
<Unit filename="main.cpp" />
|
||||||
|
|||||||
@@ -2,14 +2,18 @@
|
|||||||
1385320478 source:d:\owncloud\documents\programmierung\cpp\opengl-test-two\main.cpp
|
1385320478 source:d:\owncloud\documents\programmierung\cpp\opengl-test-two\main.cpp
|
||||||
<iostream>
|
<iostream>
|
||||||
|
|
||||||
1472735007 source:d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\main.cpp
|
1473007864 source:d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\main.cpp
|
||||||
|
<GL/glew.h>
|
||||||
<GLFW/glfw3.h>
|
<GLFW/glfw3.h>
|
||||||
<SDL2/SDL.h>
|
<SDL2/SDL.h>
|
||||||
<SDL2/SDL_image.h>
|
<SDL2/SDL_image.h>
|
||||||
<stdio.h>
|
<stdio.h>
|
||||||
<iostream>
|
<iostream>
|
||||||
|
<fstream>
|
||||||
|
<vector>
|
||||||
|
<stdexcept>
|
||||||
|
|
||||||
1472684002 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\glfw\glfw3.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\glfw\glfw3.h
|
||||||
<stddef.h>
|
<stddef.h>
|
||||||
<stdint.h>
|
<stdint.h>
|
||||||
<OpenGL/gl3.h>
|
<OpenGL/gl3.h>
|
||||||
@@ -30,7 +34,7 @@
|
|||||||
<GL/glext.h>
|
<GL/glext.h>
|
||||||
<GL/glu.h>
|
<GL/glu.h>
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl.h
|
||||||
"SDL_main.h"
|
"SDL_main.h"
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_assert.h"
|
"SDL_assert.h"
|
||||||
@@ -61,12 +65,12 @@
|
|||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_main.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_main.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_stdinc.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_stdinc.h
|
||||||
"SDL_config.h"
|
"SDL_config.h"
|
||||||
<sys/types.h>
|
<sys/types.h>
|
||||||
<stdio.h>
|
<stdio.h>
|
||||||
@@ -95,34 +99,34 @@
|
|||||||
<stdlib.h>
|
<stdlib.h>
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_config.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_config.h
|
||||||
"SDL_platform.h"
|
"SDL_platform.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_platform.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_platform.h
|
||||||
"AvailabilityMacros.h"
|
"AvailabilityMacros.h"
|
||||||
"TargetConditionals.h"
|
"TargetConditionals.h"
|
||||||
<winapifamily.h>
|
<winapifamily.h>
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\begin_code.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\begin_code.h
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\close_code.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\close_code.h
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_assert.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_assert.h
|
||||||
"SDL_config.h"
|
"SDL_config.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
<signal.h>
|
<signal.h>
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_atomic.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_atomic.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_platform.h"
|
"SDL_platform.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
<mbarrier.h>
|
<mbarrier.h>
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_audio.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_audio.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"SDL_endian.h"
|
"SDL_endian.h"
|
||||||
@@ -132,24 +136,24 @@
|
|||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_error.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_error.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_endian.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_endian.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
<endian.h>
|
<endian.h>
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_mutex.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_mutex.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_thread.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_thread.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"SDL_atomic.h"
|
"SDL_atomic.h"
|
||||||
@@ -158,18 +162,18 @@
|
|||||||
<process.h>
|
<process.h>
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_rwops.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_rwops.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_clipboard.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_clipboard.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_cpuinfo.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_cpuinfo.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
<intrin.h>
|
<intrin.h>
|
||||||
<intrin.h>
|
<intrin.h>
|
||||||
@@ -181,7 +185,7 @@
|
|||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_events.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_events.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"SDL_video.h"
|
"SDL_video.h"
|
||||||
@@ -195,7 +199,7 @@
|
|||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_video.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_video.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_pixels.h"
|
"SDL_pixels.h"
|
||||||
"SDL_rect.h"
|
"SDL_rect.h"
|
||||||
@@ -203,12 +207,12 @@
|
|||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_pixels.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_pixels.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_rect.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_rect.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"SDL_pixels.h"
|
"SDL_pixels.h"
|
||||||
@@ -216,7 +220,7 @@
|
|||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_surface.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_surface.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_pixels.h"
|
"SDL_pixels.h"
|
||||||
"SDL_rect.h"
|
"SDL_rect.h"
|
||||||
@@ -225,11 +229,11 @@
|
|||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_blendmode.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_blendmode.h
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_keyboard.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_keyboard.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"SDL_keycode.h"
|
"SDL_keycode.h"
|
||||||
@@ -237,27 +241,27 @@
|
|||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_keycode.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_keycode.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_scancode.h"
|
"SDL_scancode.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_scancode.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_scancode.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_mouse.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_mouse.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"SDL_video.h"
|
"SDL_video.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_joystick.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_joystick.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_gamecontroller.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_gamecontroller.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"SDL_rwops.h"
|
"SDL_rwops.h"
|
||||||
@@ -265,11 +269,11 @@
|
|||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_quit.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_quit.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_gesture.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_gesture.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"SDL_video.h"
|
"SDL_video.h"
|
||||||
@@ -277,60 +281,60 @@
|
|||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_touch.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_touch.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"SDL_video.h"
|
"SDL_video.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_filesystem.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_filesystem.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_haptic.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_haptic.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"SDL_joystick.h"
|
"SDL_joystick.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_hints.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_hints.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_loadso.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_loadso.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_log.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_log.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_messagebox.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_messagebox.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_video.h"
|
"SDL_video.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_power.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_power.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_render.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_render.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_rect.h"
|
"SDL_rect.h"
|
||||||
"SDL_video.h"
|
"SDL_video.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_system.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_system.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_keyboard.h"
|
"SDL_keyboard.h"
|
||||||
"SDL_render.h"
|
"SDL_render.h"
|
||||||
@@ -338,20 +342,29 @@
|
|||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_timer.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_timer.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"SDL_error.h"
|
"SDL_error.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451768293 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_version.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_version.h
|
||||||
"SDL_stdinc.h"
|
"SDL_stdinc.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
1451803973 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_image.h
|
1472737758 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\sdl2\sdl_image.h
|
||||||
"SDL.h"
|
"SDL.h"
|
||||||
"SDL_version.h"
|
"SDL_version.h"
|
||||||
"begin_code.h"
|
"begin_code.h"
|
||||||
"close_code.h"
|
"close_code.h"
|
||||||
|
|
||||||
|
1472927170 d:\owncloud\documents\programmierung\cpp\imanox-chroma-matting\opengl-test-two\include\gl\glew.h
|
||||||
|
<stddef.h>
|
||||||
|
<inttypes.h>
|
||||||
|
<stdint.h>
|
||||||
|
<inttypes.h>
|
||||||
|
<Availability.h>
|
||||||
|
<OpenGL/glu.h>
|
||||||
|
<GL/glu.h>
|
||||||
|
|
||||||
|
|||||||
8
opengl-test-two/trimap.fragmentshader
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#version 330 core
|
||||||
|
|
||||||
|
out vec4 color;
|
||||||
|
|
||||||
|
void main(){
|
||||||
|
color = vec3(0.5,0,0);
|
||||||
|
}
|
||||||
|
|
||||||
8
opengl-test-two/trimap.vertexshader
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
#version 330 core
|
||||||
|
|
||||||
|
layout(location = 0) in vec3 vertexPosition_modelspace;
|
||||||
|
|
||||||
|
void main(){
|
||||||
|
gl_Position.xyz = vertexPosition_modelspace;
|
||||||
|
gl_Position.w = 1.0;
|
||||||
|
}
|
||||||