seeking most basic opengl with a texture example

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
User avatar
bsenftner
Experienced Solver
Experienced Solver
Posts: 85
Joined: Thu May 26, 2016 9:19 pm

seeking most basic opengl with a texture example

Post by bsenftner »

Working in win10, 3 different flavors of Visual Studio, plus gcc in wsl2/Ubuntu 20...

I've been using OpenGL with wxWidgets for years, and OpenGL for decades, but never had to render with textures within wxWidgets.
Attempting to add just a textured triangle to a working OpenGL scene, I see my polygon but cannot get the texture to appear.

FWIW, I know 3D and texturing in OpenGL well. Just can't seem to find the magic bits for wxWidgets.

Are there any basic examples demonstrating just a textured cube or triangle in wxWidgets?

I've downloaded a half dozen github projects, some being not simple, each requiring configuring and figuring out, and not a single one works with textures - their textures do not appear. The wxWidget's examples that include an OpenGL set of 3 example programs do not display textures...

I have a beefy workstation, with OpenGL 4.6 being reported from my runtime use of glGetVersion().

Where o where to locate a working OpenGL Texture example?
User avatar
doublemax
Moderator
Moderator
Posts: 19116
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: seeking most basic opengl with a texture example

Post by doublemax »

The OpenGL samples that come with wxWidgets do use textures.

If you use "legacy" OpenGL, check the "Cube" sample.
If you use "modern" OpenGL, check the "Pyramid" sample.

Search for glGenTextures()
Use the source, Luke!
Post Reply