![]() |
An ActiveX control implementing
|
What does it?
The control provides a straight wrapper of the OpenGL-Api intended for use with
Visual Basic.
News
If have added examples that implement the GLPaperplane example as a standard VB
project
and an OCX control.
![]() |
|
Events
The control has only to important events:
The Opengl context is set up properly, when these events are fired.
Don't call these funtion directly; if you want to redraw the control
use the function Refresh
Data Types
OpenGL | Visual Basic |
Glenum | Long |
Glboolean | Byte |
Glbyte | Byte |
Glshort | Integer |
Glint | Long |
Glsizei | Long |
Glubyte | =Byte |
Glushort | =Integer |
Gluint | =Long |
Glfloat | Single |
Glclampf | Single |
Gldouble | Double |
Glclampd | Double |
Glvoid | =>Interface VoidPointer |
Arrays
Additional Functions
Properties
special things
- wglMakeVoidPointer(GLenum type, v1() As Variant)
This takes the data type along with an array of Variants with your data as arguments
Example:
Dim dp as VoidPointer
Set dp= GlaxCtl1.wglMakeVoidPointer _
(GL_DOUBLE, myArrayofVariantdouble)
- MakeVoidPointerFromPointer(GLenum type, datapointer as Long, data() as Variant)
This one is needed for callback functions returning a "naked" data pointer.
The function converts the data pointed into an array of variants data while returning
a VoidPointer for further use of the data.
Example:
Dim pData as VoidPointer
Set pData = Form1.GLaxCtl3.MakeVoidPointerFromPointer _
(GL_DOUBLE, datapointer, data)
- There is now a wrapper for auxDIBImageLoad() called DIBImageLoad() to load DIB images. The use is straightforward:
Dim vp As VoidPointer
Dim cx As Long, cy As Long ' image extent
Set vp = .DIBImageLoad("your.bmp", cx, cy)
.glPixelStorei GL_UNPACK_ALIGNMENT, 1
.glDrawPixels cx, cy, GL_RGB, GL_UNSIGNED_BYTE, vp
known problems:
Control and an example program (Visual Basic 6):
Source only:
License Agreement:
THIS SOFTWARE IS PROVIDED TO THE USER "AS IS." Karl M. Syring MAKES NO WARRANTIES, EITHER EXPRESS OR IMPLIED, WITH RESPECT TO THIS SOFTWARE AND/OR ASSOCIATED MATERIALS PROVIDED TO THE USER, INCLUDING BUT NOT LIMITED TO ANY WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR AGAINST INFRINGEMENT. Karl M. Syring DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT DEFECTS IN THE SOFTWARE WILL BE CORRECTED. FURTHERMORE, Karl M. Syring DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF THE SOFTWARE OR ANY DOCUMENTATION PROVIDED HEREWITH IN TERMS OF THEIR CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY Karl M. Syring OR A Karl M. Syring AUTHORIZED REPRESENTATIVE SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF THIS WARRANTY.
LIMITATION OF LIABILITY -- Karl M. Syring AND his LICENSORS ARE NOT LIABLE FOR ANY CLAIMS OR DAMAGES WHATSOEVER, INCLUDING PROPERTY DAMAGE, PERSONAL INJURY, INTELLECTUAL PROPERTY INFRINGEMENT, LOSS OF PROFITS, OR INTERRUPTION OF BUSINESS, OR FOR ANY SPECIAL, CONSEQUENTIAL OR INCIDENTAL DAMAGES, HOWEVER CAUSED, WHETHER ARISING OUT OF BREACH OF WARRANTY, CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY, OR OTHERWISE.
Last change on 11/01/01 by K. M. Syring