From: Jarosia H. <ja...@mi...> - 2007-12-30 09:37:41
|
Hello :) So I have got rcairo working and rubycocoa working, and i've been reading http://cairographics.org/OpenGL/ It says to create your cairo surface as a context normally like surface = Cairo::ImageSurface.new(width, height) context = Cairo::Context.new(surface) and then i get to Copy the cairo-surface into an OpenGL-texture with glTexImage2D(). Use this texture to map your OpenGL-primitives with. Im looking at the CocoaGL example and i dont see a texture? something to do with drawRect ... but im not sure how thats getting called and how I can make it a texture image? Any solutions? Thanks in advance! |