mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 15:18:49 +00:00
Merge pull request #3142 from jay-j/feature/gl-allow-geometry-shaders
Expose OpenGL shader procs to allow creation of pipelines with geometry shaders
This commit is contained in:
Vendored
-2
@@ -120,7 +120,6 @@ when GL_DEBUG {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Compiling shaders are identical for any shader (vertex, geometry, fragment, tesselation, (maybe compute too))
|
// Compiling shaders are identical for any shader (vertex, geometry, fragment, tesselation, (maybe compute too))
|
||||||
@private
|
|
||||||
compile_shader_from_source :: proc(shader_data: string, shader_type: Shader_Type) -> (shader_id: u32, ok: bool) {
|
compile_shader_from_source :: proc(shader_data: string, shader_type: Shader_Type) -> (shader_id: u32, ok: bool) {
|
||||||
shader_id = CreateShader(cast(u32)shader_type)
|
shader_id = CreateShader(cast(u32)shader_type)
|
||||||
length := i32(len(shader_data))
|
length := i32(len(shader_data))
|
||||||
@@ -134,7 +133,6 @@ compile_shader_from_source :: proc(shader_data: string, shader_type: Shader_Type
|
|||||||
}
|
}
|
||||||
|
|
||||||
// only used once, but I'd just make a subprocedure(?) for consistency
|
// only used once, but I'd just make a subprocedure(?) for consistency
|
||||||
@private
|
|
||||||
create_and_link_program :: proc(shader_ids: []u32, binary_retrievable := false) -> (program_id: u32, ok: bool) {
|
create_and_link_program :: proc(shader_ids: []u32, binary_retrievable := false) -> (program_id: u32, ok: bool) {
|
||||||
program_id = CreateProgram()
|
program_id = CreateProgram()
|
||||||
for id in shader_ids {
|
for id in shader_ids {
|
||||||
|
|||||||
Reference in New Issue
Block a user