# Class TglBitmap1D

Description | Hierarchy | Fields | Methods | Properties

## Unit

glBitmap

## Declaration

`type TglBitmap1D = class(TglBitmap)`

## Description

wrapper class for 1-dimensional textures (OpenGL target = GL_TEXTURE_1D

## Hierarchy

- TObject
- TglBitmap
- TglBitmap1D

## Overview

### Methods

| `procedure SetDataPointer(var aData: PByte; const aFormat: TglBitmapFormat; const aWidth: Integer = - 1; const aHeight: Integer = - 1); override;`
| `procedure UploadData(const aBuildWithGlu: Boolean);`
| `procedure AfterConstruction; override;`
| `function FlipHorz: Boolean; override;`
| `procedure GenTexture(const aTestTextureSize: Boolean = true); override;`

### Properties

| `property Width;`

## Description

### Methods

| `procedure SetDataPointer(var aData: PByte; const aFormat: TglBitmapFormat; const aWidth: Integer = - 1; const aHeight: Integer = - 1); override;`

set data pointer of texture data

###### Parameters

aData
  pointer to new texture data (be carefull, aData could be freed by this function)
aFormat
  format of the data stored at aData
aWidth
  width of the texture data
aHeight
  height of the texture data

| `procedure UploadData(const aBuildWithGlu: Boolean);`

upload the texture data to video card

###### Parameters

aBuildWithGlu
  use glu functions to build mipmaps

| `procedure AfterConstruction; override;`
this method is called after constructor and initializes the object

| `function FlipHorz: Boolean; override;`

flip texture horizontally

###### Returns

`True` on success, @fals otherwise

| `procedure GenTexture(const aTestTextureSize: Boolean = true); override;`

generate texture (create texture object if not exist, set texture parameters and upload data

###### Parameters

aTestTextureSize
  check the size of the texture and throw exception if something is wrong

### Properties

| `property Width;`
actual with of the texture

Generated by PasDoc 0.13.0 on 2014-12-21 15:05:48