Paste: opengl clearcolor not happening

Author: typemore
Mode: factor
Date: Mon, 16 Aug 2010 03:16:45
Plain Text |
TUPLE: my-gadget < gadget ;

CONSTANT: width 256
CONSTANT: height 256

: <my-gadget> ( -- gadget ) <gadget> ;
: run2 ( -- ) <my-gadget> "hello world" open-window ;

M: my-gadget draw-gadget* ( gardget -- )
    drop

    GL_PROJECTION glMatrixMode
      glLoadIdentity
      45.0 width height / >float 0.1 100.0 gluPerspective

    GL_MODELVIEW glMatrixMode
      glLoadIdentity
      GL_SMOOTH glShadeModel
      1.0 0.0 0.0 0.0 glClearColor
      1.0 glClearDepth
      GL_DEPTH_TEST glEnable
      GL_LEQUAL glDepthFunc
      GL_PERSPECTIVE_CORRECTION_HINT GL_NICEST glHint
      GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT bitor glClear
   
   ;

New Annotation

Summary:
Author:
Mode:
Body: