OpenGL, wxGLCanvas

110 views
Skip to first unread message

Rossano Paris

unread,
Apr 21, 2023, 9:51:20 AM4/21/23
to wx-users
I'd like to learn more regarding how to draw 2D objects such as lines, shapes, texts, ecc... by using wxGlCanvas.
Could someone please answare this post indicating books, on line documentation, or other resources usefull for my scope?

Thank in advance, regards
Rossano

AsmWarrior

unread,
Apr 21, 2023, 9:20:34 PM4/21/23
to wx-users
Do you look at the wx samples, there are 3 or more samples of OpenGL code. But I guess they use legacy opengl pipeline method. (tell me if I'm wrong here)

You can see the screen shot images of those 3 samples ( just upload them as attachment).

Also, drawing objects are simple, and you can learn from any OpenGL tutorials. In-fact, I think wxGlCanvas is just a "canvas" or "window" you need to draw there. The import thing is how you supply the vertices, and glsl shaders, VBO, VAO to do that.

I have sample projects for Code::Blocks here:

1,  all wx sample projects for code::blocks

2, a sample opengl + wxWidgets demo project, which use modern core profile method.

3, Learn OpenGL site

There are more resources if you search on Google or github

Asmwarrior
2023-04-22 09 05 46.png
2023-04-22 09 05 08.png
2023-04-22 09 06 05.png

AsmWarrior

unread,
Apr 23, 2023, 9:45:46 PM4/23/23
to wx-users
Oh, there is another opengl sample named: pyramid, which use opengl core profile mode.

Here is the screen shot.


2023-04-24 09 44 49.png
Reply all
Reply to author
Forward
0 new messages