Quantcast
Channel: beginners - openFrameworks
Viewing all articles
Browse latest Browse all 4929

Changing 3D primitive texture

$
0
0

@vprost wrote:

So I’m making a really simple program where I have various 3D primitives (just a box for now) that are manipulable through GUI, and have a set texture through the bin/data directory. What I want is to have the user be able to load in their own image and have it be used as an ‘ofTexture’ for the 3D primitives.

I added a file browser that allows the user to open up and image from their computer using modified code from this dump: https://github.com/openframeworks/openFrameworks/blob/master/examples/input_output/fileOpenSaveDialogExample/src/ofApp.cpp

The file browser returns the user’s image as a vector ‘ofImage’ called ‘loadedImages’, and as of now just displays it in the program with the basic .draw command.

My question is, can I replace the loaded texture with the new loaded user image?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4929

Trending Articles