Hi Roland,
OpenglSceneFrame.in and CosoleG.inc provide base code for various OxygenBasic examples.
These include:
Opengl Window setup
AntiAliasing
Lighting
Textures
Image-based textures
Image Capture
movement
mouse and keyboard
object picking
base geometries
3d Text
There is quite a lot of Nehe in there, and you are welcome to use this code or extract whatever you need to customise or extend the functionality.
For the purpose of making a texture from an image file (using some GDIplus), This demonstratescreating a texture and applying it to a quad.
It will work in ProjectsA\Openglcns\
% Title "Console Demo"
'% Animated
% ScaleUp
'% PlaceCentral
'% AnchorCentral
include "$\inc\ConsoleG.inc"
BeginScript
sub main
========
static sys imgn,res,wi,ht
if not imgn
imgn=21
res=0 'use wi and ht of image
LoadTexture "../../examples/images/Dawn1815.jpg",imgn,res,wi,ht
end if
cls
pushstate
move 15,-15
'
'display image
'
flat : color 1,1,1,1
texture imgn
quadnorm 15.0,15.0*ht/wi 'apply image texture to a quad
texture 0
popstate
end sub 'main
EndScript
.