New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add OpenGL core profile demo #132

Merged
merged 2 commits into from Nov 5, 2015

Conversation

Projects
None yet
2 participants
@Ace17

Ace17 commented Nov 4, 2015

Here's a GtkD with "modern" OpenGL standalone demo. It's a D-simplified translation of the C++ example in gtkmm (seems like the 'simple' OpenGL demo using glBegin/glEnd is obsolete).
I had to add a glcore.d import file. Maybe this file would fit better in gtkcgl ?

@MikeWey

This comment has been minimized.

Member

MikeWey commented Nov 5, 2015

For me the demo only compiles and links when i remove the export from the function definitions in glcore.d

@Ace17

This comment has been minimized.

Ace17 commented Nov 5, 2015

Here's how I compiled it:

$ gdc CoreGL.d `pkg-config gtkd-3 gl --cflags --libs` -o demo.exe && ./demo.exe  
@Ace17

This comment has been minimized.

Ace17 commented Nov 5, 2015

Indeed, I got link errors with rdmd:

$ rdmd `pkg-config gtkd-3 --cflags` -L-lGL -L-ldl CoreGL.d
/tmp/.rdmd-1000/rdmd-CoreGL.d-34137C8B6C6C2BA1758446FBCEC175AF/objs/CoreGL.o: In function `_D6coreGL6CoreGL6CoreGL9unrealizeMFC3gtk6Widget6WidgetZv':
/usr/local/include/d/gtkd-3/gdkpixbuf/Pixbuf.d:(.text._D6coreGL6CoreGL6CoreGL9unrealizeMFC3gtk6Widget6WidgetZv+0x69): undefined reference to `_imp__glDeleteBuffers'
/usr/local/include/d/gtkd-3/gdkpixbuf/Pixbuf.d:(.text._D6coreGL6CoreGL6CoreGL9unrealizeMFC3gtk6Widget6WidgetZv+0x7a): undefined reference to `_imp__glDeleteProgram'
/tmp/.rdmd-1000/rdmd-CoreGL.d-34137C8B6C6C2BA1758446FBCEC175AF/objs/CoreGL.o: In function `_D6coreGL6CoreGL6CoreGL6renderMFC3gdk9GLContext9GLContextC3gtk6GLArea6GLAreaZb'
@MikeWey

This comment has been minimized.

Member

MikeWey commented Nov 5, 2015

@Ace17

This comment has been minimized.

Ace17 commented Nov 5, 2015

OK, I removed the 'export' keywords. Now you can run the demo like this:

$ rdmd `pkg-config gtkd-3 --cflags` -L-lGL -L-ldl CoreGL.d

MikeWey added a commit that referenced this pull request Nov 5, 2015

Merge pull request #132 from Ace17/glcore
Add OpenGL core profile demo

@MikeWey MikeWey merged commit f8cccb8 into gtkd-developers:master Nov 5, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment