Skip to content

Commit

Permalink
Merge pull request #71 from Oldes/OpenGL
Browse files Browse the repository at this point in the history
FEAT: OpenGL - WGL, GLX and EGL interfaces
  • Loading branch information
dockimbel committed Sep 15, 2017
2 parents 2c83df6 + a4f022a commit fe9fdf5
Show file tree
Hide file tree
Showing 23 changed files with 6,105 additions and 662 deletions.
487 changes: 249 additions & 238 deletions Library/GLFW/glfw3.reds

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Library/OpenGL/examples/gl3-triangle-2.reds
Expand Up @@ -29,7 +29,7 @@ GL-context
#include %../gl3-common.reds ;imports common GL3 functions

;background color:
glClearColor as float32! 0.0 as float32! 0.0 as float32! 0.6 as float32! 0.0
glClearColor .0 .0 .6 .0

VertexArrayID: 0
glGenVertexArrays 1 :VertexArrayID
Expand Down
6 changes: 3 additions & 3 deletions Library/OpenGL/examples/gl3-triangle-3.reds
Expand Up @@ -22,14 +22,14 @@ glfwWindowHint GLFW_CONTEXT_VERSION_MINOR 3 ;
glfwWindowHint GLFW_OPENGL_FORWARD_COMPAT GL_TRUE ;To make MacOS happy; should not be needed
glfwWindowHint GLFW_OPENGL_PROFILE GLFW_OPENGL_CORE_PROFILE ;We don't want the old OpenGL

GL-window "GL3 triangle 2 - moving" 800 600
GL-window "GL3 triangle 3 - moving (GPU)" 800 600

GL-context

#include %../gl3-common.reds ;imports common GL3 functions

;background color:
glClearColor as float32! 0.0 as float32! 0.0 as float32! 0.6 as float32! 0.0
glClearColor .0 .0 .6 .0

VertexArrayID: 0
glGenVertexArrays 1 :VertexArrayID
Expand Down Expand Up @@ -90,7 +90,7 @@ glUseProgram programID
elapsedTimeUniform: glGetUniformLocation programID "time"
loopDurationUnf: glGetUniformLocation programID "loopDuration"

glUniform1f loopDurationUnf as float32! 5.0
glUniform1f loopDurationUnf 5.0

glUseProgram 0

Expand Down
8 changes: 4 additions & 4 deletions Library/OpenGL/examples/gl3-triangle-4.reds
Expand Up @@ -22,14 +22,14 @@ glfwWindowHint GLFW_CONTEXT_VERSION_MINOR 3 ;
glfwWindowHint GLFW_OPENGL_FORWARD_COMPAT GL_TRUE ;To make MacOS happy; should not be needed
glfwWindowHint GLFW_OPENGL_PROFILE GLFW_OPENGL_CORE_PROFILE ;We don't want the old OpenGL

GL-window "GL3 triangle 2 - moving" 800 600
GL-window "GL3 triangle 4 - moving + color" 800 600

GL-context

#include %../gl3-common.reds ;imports common GL3 functions

;background color:
glClearColor as float32! 0.0 as float32! 0.0 as float32! 0.6 as float32! 0.0
glClearColor .0 .0 .6 .0

VertexArrayID: 0
glGenVertexArrays 1 :VertexArrayID
Expand Down Expand Up @@ -104,8 +104,8 @@ elapsedTimeUniform: glGetUniformLocation programID "time"
loopDurationUnf: glGetUniformLocation programID "loopDuration"
fragLoopDurUnf: glGetUniformLocation programID "fragLoopDuration"

glUniform1f loopDurationUnf as float32! 5.0
glUniform1f fragLoopDurUnf as float32! 2.5
glUniform1f loopDurationUnf 5.0
glUniform1f fragLoopDurUnf 2.5

glUseProgram 0

Expand Down
2 changes: 1 addition & 1 deletion Library/OpenGL/examples/gl3-triangle.reds
Expand Up @@ -33,7 +33,7 @@ GL-context
#include %../gl3-common.reds ;imports common GL3 functions

;background color:
glClearColor as float32! 0.0 as float32! 0.0 as float32! 0.6 as float32! 0.0
glClearColor .0 .0 .6 .0

VertexArrayID: 0
glGenVertexArrays 1 :VertexArrayID
Expand Down

0 comments on commit fe9fdf5

Please sign in to comment.