Skip to content
This repository has been archived by the owner. It is now read-only.
3ckiPublic archive

About

Library for simple objects in OpenGL for Lazarus

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

LOpLib

Library for simple objects in OpenGL for Lazarus.

Features

Setup - Setting up the OpenGLControl.
MakeSquare - Create a square of one color by declaring width, height and layer.
MakeCube - Create a cube of one color by declaring width, height, and depth.
MakePyramid - Create a pyramid of one color by declaring coordinate maxima - will be changed soon.

How to use LOpLib

If you want to use this library in your projects, please credit me.

  1. Copy loplib.pas into your project folder.
  2. Inside the units in which you want to use LOpLib, add "LOpLib" to the end of your "uses" declaration at the top of the unit.
  3. To use a LOpLib method, write loplib.methodname or LOpLib.methodname. E.g.: loplib.MakeSquare(1, 1, 1, 0, 0, 1);

Setup

Setup(r, g, b);

Setting up the scene. The parameters define the background color.

r - REAL - Amount of red color
g - REAL - Amount of green color
b - REAL - Amount of blue color

Make Square

MakeSquare(width, height, r, g, b, layer);

Creates two-dimensional square. The parameters define the form, color and layer.

width - REAL - Width of square on x
height - REAL - Height of square y
r - REAL - Amount of red color
g - REAL - Amount of green color
b - REAL - Amount of blue color
layer - REAL - defines which object is on top of another. Useful when there are multiple two-dimensional objects over each other. The highest layer is over every other layer

Make Cube

MakeCube(width, height, depth, r, g, b);

Creates cube. The parameters define the form and color.

width - REAL - Width of cube on x
height - REAL - Height of cube on y
depth - REAL - Depth of cube on z
r - REAL - Amount of red color
g - REAL - Amount of green color
b - REAL - Amount of blue color

Make Pyramid

MakePyramid(right, left, up, down, front, back, r, g, b);

Creates pyramid. The parameters define the form and color.

right - REAL - X coordinate of bottom right edge
left - REAL - X coordinate of bottom left edge
up - REAL - Y coordinate of pyramid peak vertice
down - REAL - Y coordinate of bottom face
front - REAL - Z coordinate of bottom front edge
back - REAL - Z coordinate of bottom rear edge
r - REAL - Amount of red color
g - REAL - Amount of green color
b - REAL - Amount of blue color

About

Library for simple objects in OpenGL for Lazarus

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages