public DemoBase( final String acWindowTitle, int iXPosition, int iYPosition, int iWidth, int iHeight, FrameBuffer.FormatType eFormat, FrameBuffer.DepthType eDepth, FrameBuffer.StencilType eStencil, FrameBuffer.BufferingType eBuffering, FrameBuffer.MultisamplingType eMultisampling, final ColorRGBA rkBackgroundColor) { super(acWindowTitle, iXPosition, iYPosition, iWidth, iHeight, rkBackgroundColor); m_eFormat = eFormat; m_eDepth = eDepth; m_eStencil = eStencil; m_eBuffering = eBuffering; m_eMultisampling = eMultisampling; m_pkRenderer = new OpenGLRenderer( m_eFormat, m_eDepth, m_eStencil, m_eBuffering, m_eMultisampling, m_iWidth, m_iHeight); ((OpenGLRenderer) m_pkRenderer).GetCanvas().setSize(m_iWidth, m_iHeight); ((OpenGLRenderer) m_pkRenderer).GetCanvas().addGLEventListener(this); ((OpenGLRenderer) m_pkRenderer).GetCanvas().addKeyListener(this); ((OpenGLRenderer) m_pkRenderer).GetCanvas().addMouseListener(this); ((OpenGLRenderer) m_pkRenderer).GetCanvas().addMouseMotionListener(this); String kExternalDirs = getExternalDirs(); ImageCatalog.SetActive(new ImageCatalog("Main", kExternalDirs)); VertexProgramCatalog.SetActive(new VertexProgramCatalog("Main", kExternalDirs)); PixelProgramCatalog.SetActive(new PixelProgramCatalog("Main", kExternalDirs)); CompiledProgramCatalog.SetActive(new CompiledProgramCatalog()); }
public ImageRegistrationGPU(ModelSimpleImage kTarget, ModelSimpleImage kMoving) { // super( "VolumeImageViewer", 0, 0, kImageA.extents[0],kImageA.extents[1], super("ImageRegistrationGPU", 0, 0, 256, 256, new ColorRGBA(0.0f, 0.0f, 0.0f, 1.0f)); m_pkRenderer = new OpenGLRenderer( m_eFormat, m_eDepth, m_eStencil, m_eBuffering, m_eMultisampling, m_iWidth, m_iHeight); GetCanvas().getContext().setSynchronized(true); m_kTarget = kTarget; m_kMoving = kMoving; String kExternalDirs = MipavInitGPU.getExternalDirs(); ImageCatalog.SetActive(new ImageCatalog("Main", kExternalDirs)); VertexProgramCatalog.SetActive(new VertexProgramCatalog("Main", kExternalDirs)); PixelProgramCatalog.SetActive(new PixelProgramCatalog("Main", kExternalDirs)); CompiledProgramCatalog.SetActive(new CompiledProgramCatalog()); }
public DemoBase(String title) { super(title, 0, 0, 512, 512, new ColorRGBA(0.635294f, 0.917647f, 1.0f, 1.0f)); m_pkRenderer = new OpenGLRenderer( m_eFormat, m_eDepth, m_eStencil, m_eBuffering, m_eMultisampling, m_iWidth, m_iHeight); ((OpenGLRenderer) m_pkRenderer).GetCanvas().setSize(m_iWidth, m_iHeight); ((OpenGLRenderer) m_pkRenderer).GetCanvas().addGLEventListener(this); ((OpenGLRenderer) m_pkRenderer).GetCanvas().addKeyListener(this); ((OpenGLRenderer) m_pkRenderer).GetCanvas().addMouseListener(this); ((OpenGLRenderer) m_pkRenderer).GetCanvas().addMouseMotionListener(this); String kExternalDirs = getExternalDirs(); ImageCatalog.SetActive(new ImageCatalog("Main", kExternalDirs)); VertexProgramCatalog.SetActive(new VertexProgramCatalog("Main", kExternalDirs)); PixelProgramCatalog.SetActive(new PixelProgramCatalog("Main", kExternalDirs)); CompiledProgramCatalog.SetActive(new CompiledProgramCatalog()); }