package org.mimezine.winnie; /** * Renderable data API suggestions for Winnie: * items in the trees and lists of data Winnie can render will implement this interface * to insure object creation, deletion and rendering. * @Author: arkasha * @Date: 20040921 * * mimezine fecit */ public interface Renderable { //returns the entity ID to permit external switching. //must be implemented in a try block which ends the list cleanly on "finally" public int buildEntity(GL globalGLContext); //simple draw method. use exception-based signaling, or just an error-code return type? //may be as simple as calling "call list on the internally stored ID representation from the build stage public void draw(GL globalGLContext); //the basic task of this method is to call glDeleteLists, but this can also contain texture-cleanup goo, etc. public void trashEntity(GL globalGLContext); }