Class gl_render

  • Direct Known Subclasses:
    gl_depth, gl_select_render

    public class gl_render
    extends Object
    gl_render is the basic rendering class of JavaGL 2.1. The most important method is draw_line(gl_vertex, gl_vertex) which paints the pixel between 2 2D points. The third dimension of the vertex represents the depth of the pixel. Note that considering depth for drawing a pixel is made in gl_depth (a subclass of gl_render)
    Version:
    0.4, 29 Nov 1999
    Author:
    Robin Bing-Yu Chen
    • Field Detail

      • x

        protected int x
      • y

        protected int y
      • color

        protected int color
      • RightPoint

        protected int RightPoint
      • LeftPoint

        protected int LeftPoint
      • dyl

        protected int dyl
      • dyl2

        protected int dyl2
      • dyr

        protected int dyr
      • dyr2

        protected int dyr2
      • dxl

        protected int dxl
      • dxr

        protected int dxr
    • Constructor Detail

    • Method Detail

      • set_first_xy

        protected void set_first_xy()
      • set_first_point

        protected void set_first_point()
      • init_dx

        protected void init_dx​(int dx)
      • init_dy

        protected void init_dy​(int dy)
      • init_dx_dy

        protected void init_dx_dy​(int dx,
                                  int dy)
      • x_inc_x

        protected void x_inc_x()
      • x_dec_x

        protected void x_dec_x()
      • y_inc_y

        protected void y_inc_y()
      • inc_x

        protected void inc_x()
      • dec_x

        protected void dec_x()
      • inc_y

        protected void inc_y()
      • inc_x_inc_y

        protected void inc_x_inc_y()
      • dec_x_inc_y

        protected void dec_x_inc_y()
      • put_pixel

        protected void put_pixel()
        Will color the given pixel WITHOUT verifying depth buffer (see gl_depth.put_pixel()
      • put_pixel_by_index

        protected void put_pixel_by_index()
        Will color the given pixel WITHOUT verifying depth buffer (see gl_depth.put_pixel_by_index()
      • draw_point

        protected void draw_point​(gl_vertex v)
      • draw_point

        protected void draw_point​(gl_vertex v,
                                  int color)
      • draw_horizontal_line

        protected void draw_horizontal_line​(int x1,
                                            int x2,
                                            int y)
        Draw a flat horizontal line in the Color Buffer, assume that x1 is in the left side of x2
      • draw_horizontal_line

        protected void draw_horizontal_line()
        Draw a flat horizontal line in the Color Buffer, assume that x1 is in the left side of x2
      • draw_line

        public void draw_line​(gl_vertex v1,
                              gl_vertex v2)
        Draw a line in the Color Buffer
      • draw_line

        public void draw_line​(gl_vertex v1,
                              gl_vertex v2,
                              int color)
        Draw a flat line in the Color Buffer
      • set_left_xy

        protected void set_left_xy​(int pos)
      • set_right_xy

        protected void set_right_xy​(int pos)
      • set_left

        protected void set_left​(int pos)
      • set_right

        protected void set_right​(int pos)
      • init_dx_dy

        protected void init_dx_dy​(int area,
                                  int left,
                                  int right,
                                  int top)
      • init_other

        protected void init_other​(boolean delta,
                                  int dy)
      • init_left_xy

        protected void init_left_xy()
      • init_right_xy

        protected void init_right_xy()
      • init_left

        protected void init_left​(int down,
                                 int top)
      • init_right

        protected void init_right​(int down,
                                  int top)
      • inc_y_once

        protected void inc_y_once()
      • inc_y_more

        protected void inc_y_more()
      • inc_left_xy

        protected void inc_left_xy()
      • inc_right_xy

        protected void inc_right_xy()
      • inc_left

        protected void inc_left()
      • inc_right

        protected void inc_right()
      • draw_horizontal_line

        protected void draw_horizontal_line​(int y)
      • draw_polygon

        public void draw_polygon​(gl_polygon p)
      • draw_polygon

        public void draw_polygon​(gl_polygon p,
                                 int color)