Package jgl.context.render
Class gl_render
java.lang.Object
jgl.context.render.gl_render
- Direct Known Subclasses:
gl_depth,gl_select_render
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 Summary
FieldsModifier and TypeFieldDescriptionprotected gl_contextprotected intprotected intprotected intprotected intprotected intprotected intprotected intprotected intprotected gl_render_pixelprotected intprotected intprotected int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddec_x()protected voidprotected voidDraw 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 a line in the Color BuffervoidDraw a flat line in the Color Bufferprotected voidprotected voiddraw_point(gl_vertex v, int color) voidvoiddraw_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 voidprotected voidprotected voidprotected voidinc_x()protected voidprotected voidinc_y()protected voidprotected voidprotected voidprotected voidprotected 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 voidprotected voidinit_other(boolean delta, int dy) protected voidinit_right(int down, int top) protected voidprotected voidprotected voidprotected voidWill color the given pixel WITHOUT verifying depth buffer (seegl_depth.put_pixel()protected voidWill color the given pixel WITHOUT verifying depth buffer (seegl_depth.put_pixel_by_index()protected voidprotected voidprotected voidset_left(int pos) protected voidset_left_xy(int pos) voidprotected voidset_right(int pos) protected voidset_right_xy(int pos) protected voidx_dec_x()protected voidx_inc_x()protected voidy_inc_y()
-
Field Details
-
CC
-
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 Details
-
gl_render
-
-
Method Details
-
init_xy
-
init
-
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
-
draw_point
-
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
Draw a line in the Color Buffer -
draw_line
Draw a flat line in the Color Buffer -
init_xy
-
init
-
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
Draw a flat triangle in the Color Buffer -
draw_triangle
-
draw_polygon
-
draw_polygon
-
set_pixel
-