Loading...
Processing Forum
Recent Topics
All Forums
Screen name:
frankie
frankie's Profile
1
Posts
2
Responses
0
Followers
Activity Trend
Last 30 days
Last 30 days
Date Interval
From Date :
To Date :
Go
Loading Chart...
Posts
Responses
PM
Show:
All
Discussions
Questions
Expanded view
List view
Private Message
Pure OpenGL 2D texture binding in processing 2.0
[3 Replies]
31-Jul-2013 12:21 PM
Forum:
Core Library Questions
Hello,
I found a strange trick while trying to bind texture:
I'm loading an image ( and ONLY one, this will be important for the following ) in
setup()
:
size( 1280, 768, OPENGL);
// then opengl stuff...
resource = loadImage( "/.../texture.png" );
resource.loadPixels(); << this seems to be important for the magic trick
Then, in
draw()
:
gl.glEnable( gl.GL_TEXTURE_2D );
gl.glBindTexture( gl.GL_TEXTURE_2D,
>> 1 <<
);
Surprise! The image can be used as texture!
I searched web and javadoc for hours, i didn't found any possibility to get the TextureID of the PImage!
@developpers: would it be possible to add a "getTextureID()" to PImage?
All the best.
«Prev
Next »
Moderate user : frankie
Forum