digitalmars.D.learn - Good ol' OpenGL D-C interfacing. :(
- Mineko (12/12) Jan 25 2014 Alright.. For the record, I've been searching on how to fix this
- Rikki Cattermole (10/22) Jan 25 2014 Try breaking it down into a single module. Basically on render
- Mineko (5/32) Jan 25 2014 I see what you're saying, and that's more or less what I've been
- TheFlyingFiddle (3/15) Jan 25 2014 Your init and finalize methods in primitives.d does not work. You
- Mineko (2/22) Jan 25 2014 Thank you, that was exactly the problem.
Alright.. For the record, I've been searching on how to fix this for 2 hours now, so yeah. Anyway, here's the issue, and it's probably half OpenGL being well.. OpenGL, and the other half being D-C interfacing. Point is, I'm trying to draw a triangle with a custom Triangle class I made, and I'm having issues, relevant code is here: https://github.com/MinekoRox/Breaker-Engine/blob/master/src/breaker/scene.d https://github.com/MinekoRox/Breaker-Engine/blob/master/src/breaker/utility/graphics/primitives.d https://github.com/MinekoRox/Breaker-Engine/blob/master/res/shaders/testShader.glsl I assume this is probably me messing up with arrays and sizing, but I've done what I can as far as that goes so.. Maybe one of you know what to do.
Jan 25 2014
On Saturday, 25 January 2014 at 23:28:07 UTC, Mineko wrote:Alright.. For the record, I've been searching on how to fix this for 2 hours now, so yeah. Anyway, here's the issue, and it's probably half OpenGL being well.. OpenGL, and the other half being D-C interfacing. Point is, I'm trying to draw a triangle with a custom Triangle class I made, and I'm having issues, relevant code is here: https://github.com/MinekoRox/Breaker-Engine/blob/master/src/breaker/scene.d https://github.com/MinekoRox/Breaker-Engine/blob/master/src/breaker/utility/graphics/primitives.d https://github.com/MinekoRox/Breaker-Engine/blob/master/res/shaders/testShader.glsl I assume this is probably me messing up with arrays and sizing, but I've done what I can as far as that goes so.. Maybe one of you know what to do.Try breaking it down into a single module. Basically on render call your file's function that you handle drawing of said triangle. Relying on as little as possible on other code. That way you should be able to use existing examples and tutorials straight. This is what really helped me with DOOGLE and working it out. I have an example for it if you want to check it out. From the module you'll have than you can start abstracting out and testing your own code base.
Jan 25 2014
On Sunday, 26 January 2014 at 02:39:29 UTC, Rikki Cattermole wrote:On Saturday, 25 January 2014 at 23:28:07 UTC, Mineko wrote:I see what you're saying, and that's more or less what I've been doing, I'm asking what opengl function did I mess up to cause it not to render, because I've checked it over and over again.Alright.. For the record, I've been searching on how to fix this for 2 hours now, so yeah. Anyway, here's the issue, and it's probably half OpenGL being well.. OpenGL, and the other half being D-C interfacing. Point is, I'm trying to draw a triangle with a custom Triangle class I made, and I'm having issues, relevant code is here: https://github.com/MinekoRox/Breaker-Engine/blob/master/src/breaker/scene.d https://github.com/MinekoRox/Breaker-Engine/blob/master/src/breaker/utility/graphics/primitives.d https://github.com/MinekoRox/Breaker-Engine/blob/master/res/shaders/testShader.glsl I assume this is probably me messing up with arrays and sizing, but I've done what I can as far as that goes so.. Maybe one of you know what to do.Try breaking it down into a single module. Basically on render call your file's function that you handle drawing of said triangle. Relying on as little as possible on other code. That way you should be able to use existing examples and tutorials straight. This is what really helped me with DOOGLE and working it out. I have an example for it if you want to check it out. From the module you'll have than you can start abstracting out and testing your own code base.
Jan 25 2014
On Saturday, 25 January 2014 at 23:28:07 UTC, Mineko wrote:Alright.. For the record, I've been searching on how to fix this for 2 hours now, so yeah. Anyway, here's the issue, and it's probably half OpenGL being well.. OpenGL, and the other half being D-C interfacing. Point is, I'm trying to draw a triangle with a custom Triangle class I made, and I'm having issues, relevant code is here: https://github.com/MinekoRox/Breaker-Engine/blob/master/src/breaker/scene.d https://github.com/MinekoRox/Breaker-Engine/blob/master/src/breaker/utility/graphics/primitives.d https://github.com/MinekoRox/Breaker-Engine/blob/master/res/shaders/testShader.glsl I assume this is probably me messing up with arrays and sizing, but I've done what I can as far as that goes so.. Maybe one of you know what to do.Your init and finalize methods in primitives.d does not work. You need to send the vao, points_vbo and colors_vbo by ref.
Jan 25 2014
On Sunday, 26 January 2014 at 03:39:37 UTC, TheFlyingFiddle wrote:On Saturday, 25 January 2014 at 23:28:07 UTC, Mineko wrote:Thank you, that was exactly the problem.Alright.. For the record, I've been searching on how to fix this for 2 hours now, so yeah. Anyway, here's the issue, and it's probably half OpenGL being well.. OpenGL, and the other half being D-C interfacing. Point is, I'm trying to draw a triangle with a custom Triangle class I made, and I'm having issues, relevant code is here: https://github.com/MinekoRox/Breaker-Engine/blob/master/src/breaker/scene.d https://github.com/MinekoRox/Breaker-Engine/blob/master/src/breaker/utility/graphics/primitives.d https://github.com/MinekoRox/Breaker-Engine/blob/master/res/shaders/testShader.glsl I assume this is probably me messing up with arrays and sizing, but I've done what I can as far as that goes so.. Maybe one of you know what to do.Your init and finalize methods in primitives.d does not work. You need to send the vao, points_vbo and colors_vbo by ref.
Jan 25 2014