sghr / iGeo

iGeo: Computational Design and 3D Modeling Library for Processing
http://igeo.jp
GNU Lesser General Public License v3.0
146 stars 34 forks source link

Request / question: is it possible to write openGL code in igeo ? #7

Open ianisl opened 10 years ago

ianisl commented 10 years ago

Hi,

Is it possible to write openGL code in igeo ? The javadoc refers to a GL1 renderer :

'Processing Graphics using OpenGL to be put in size() method in Processing '

Is there an example of how to use it somewhere ?

thanks!

sghr commented 10 years ago

Sorry for late reply. Currently igeo uses OpenGL directly. You can see gui/IGraphicsGL2.java, gui/ICurveGraphicGL.java, gui/IGLQuadStrip.java, etc, although the drawing process is scattered around. This drawing mechanism would change later to catch up the changes in processing.

ianisl commented 10 years ago

Thanks for your answer. I had noticed iGeo was actually using openGL, but I don't know how to modify the properties of a graphic object since iGeo uses its own layer of drawing instructions. For instance, is there currently a way to map a texture on a surface withing iGeo ?

cheers

sghr commented 10 years ago

Texture is one of items in my todo list but I haven't touched texture part yet. You could insert OpenGL texture code somewhere but it mgiht be simple. You might need to make a custom graphic class (IGraphicObject) and a custom object (IObject).

ianisl commented 10 years ago

Thanks!