Package jgl.context.render
Class gl_render
- java.lang.Object
-
- jgl.context.render.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 isdraw_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 ingl_depth(a subclass ofgl_render)- Version:
- 0.4, 29 Nov 1999
- Author:
- Robin Bing-Yu Chen
-
-
Field Summary
Fields Modifier and Type Field Description protected gl_contextCCprotected intcolorprotected intdxlprotected intdxrprotected intdylprotected intdyl2protected intdyrprotected intdyr2protected intLeftPointprotected gl_render_pixelpixelprotected intRightPointprotected intxprotected inty
-
Constructor Summary
Constructors Constructor Description gl_render(gl_context cc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddec_x()protected voiddec_x_inc_y()protected voiddraw_horizontal_line()Draw a flat horizontal line in the Color Buffer, assume that x1 is in the left side of x2protected voiddraw_horizontal_line(int y)protected voiddraw_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 x2voiddraw_line(gl_vertex v1, gl_vertex v2)Draw a line in the Color Buffervoiddraw_line(gl_vertex v1, gl_vertex v2, int color)Draw a flat line in the Color Bufferprotected voiddraw_point(gl_vertex v)protected voiddraw_point(gl_vertex v, int color)voiddraw_polygon(gl_polygon p)voiddraw_polygon(gl_polygon p, int color)voiddraw_triangle(gl_vertex v1, gl_vertex v2, gl_vertex v3)Draw a flat triangle in the Color Buffervoiddraw_triangle(gl_vertex v1, gl_vertex v2, gl_vertex v3, int color)protected voidinc_left()protected voidinc_left_xy()protected voidinc_right()protected voidinc_right_xy()protected voidinc_x()protected voidinc_x_inc_y()protected voidinc_y()protected voidinc_y_more()protected voidinc_y_once()protected voidinit(gl_vertex v1, gl_vertex v2)protected voidinit(gl_vertex v1, gl_vertex v2, gl_vertex v3)protected voidinit_dx(int dx)protected voidinit_dx_dy(int dx, int dy)protected voidinit_dx_dy(int area, int left, int right, int top)protected voidinit_dy(int dy)protected voidinit_left(int down, int top)protected voidinit_left_xy()protected voidinit_other(boolean delta, int dy)protected voidinit_right(int down, int top)protected voidinit_right_xy()protected voidinit_xy(gl_vertex v1, gl_vertex v2)protected voidinit_xy(gl_vertex v1, gl_vertex v2, gl_vertex v3)protected voidput_pixel()Will color the given pixel WITHOUT verifying depth buffer (seegl_depth.put_pixel()protected voidput_pixel_by_index()Will color the given pixel WITHOUT verifying depth buffer (seegl_depth.put_pixel_by_index()protected voidset_first_point()protected voidset_first_xy()protected voidset_left(int pos)protected voidset_left_xy(int pos)voidset_pixel(gl_render_pixel p)protected voidset_right(int pos)protected voidset_right_xy(int pos)protected voidx_dec_x()protected voidx_inc_x()protected voidy_inc_y()
-
-
-
Field Detail
-
CC
protected gl_context CC
-
pixel
protected gl_render_pixel pixel
-
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
-
gl_render
public gl_render(gl_context cc)
-
-
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 (seegl_depth.put_pixel()
-
put_pixel_by_index
protected void put_pixel_by_index()
Will color the given pixel WITHOUT verifying depth buffer (seegl_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, 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_triangle
public void draw_triangle(gl_vertex v1, gl_vertex v2, gl_vertex v3)
Draw a flat triangle in the Color Buffer
-
draw_polygon
public void draw_polygon(gl_polygon p)
-
draw_polygon
public void draw_polygon(gl_polygon p, int color)
-
set_pixel
public void set_pixel(gl_render_pixel p)
-
-