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_context
CC
protected int
color
protected int
dxl
protected int
dxr
protected int
dyl
protected int
dyl2
protected int
dyr
protected int
dyr2
protected int
LeftPoint
protected gl_render_pixel
pixel
protected int
RightPoint
protected int
x
protected int
y
-
Constructor Summary
Constructors Constructor Description gl_render(gl_context cc)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
dec_x()
protected void
dec_x_inc_y()
protected void
draw_horizontal_line()
Draw a flat horizontal line in the Color Buffer, assume that x1 is in the left side of x2protected void
draw_horizontal_line(int y)
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 x2void
draw_line(gl_vertex v1, gl_vertex v2)
Draw a line in the Color Buffervoid
draw_line(gl_vertex v1, gl_vertex v2, int color)
Draw a flat line in the Color Bufferprotected void
draw_point(gl_vertex v)
protected void
draw_point(gl_vertex v, int color)
void
draw_polygon(gl_polygon p)
void
draw_polygon(gl_polygon p, int color)
void
draw_triangle(gl_vertex v1, gl_vertex v2, gl_vertex v3)
Draw a flat triangle in the Color Buffervoid
draw_triangle(gl_vertex v1, gl_vertex v2, gl_vertex v3, int color)
protected void
inc_left()
protected void
inc_left_xy()
protected void
inc_right()
protected void
inc_right_xy()
protected void
inc_x()
protected void
inc_x_inc_y()
protected void
inc_y()
protected void
inc_y_more()
protected void
inc_y_once()
protected void
init(gl_vertex v1, gl_vertex v2)
protected void
init(gl_vertex v1, gl_vertex v2, gl_vertex v3)
protected void
init_dx(int dx)
protected void
init_dx_dy(int dx, int dy)
protected void
init_dx_dy(int area, int left, int right, int top)
protected void
init_dy(int dy)
protected void
init_left(int down, int top)
protected void
init_left_xy()
protected void
init_other(boolean delta, int dy)
protected void
init_right(int down, int top)
protected void
init_right_xy()
protected void
init_xy(gl_vertex v1, gl_vertex v2)
protected void
init_xy(gl_vertex v1, gl_vertex v2, gl_vertex v3)
protected void
put_pixel()
Will color the given pixel WITHOUT verifying depth buffer (seegl_depth.put_pixel()
protected void
put_pixel_by_index()
Will color the given pixel WITHOUT verifying depth buffer (seegl_depth.put_pixel_by_index()
protected void
set_first_point()
protected void
set_first_xy()
protected void
set_left(int pos)
protected void
set_left_xy(int pos)
void
set_pixel(gl_render_pixel p)
protected void
set_right(int pos)
protected void
set_right_xy(int pos)
protected void
x_dec_x()
protected void
x_inc_x()
protected void
y_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)
-
-