FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour OpenGL soporte para FWH 12.01
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: OpenGL soporte para FWH 12.01
Posted: Thu Jan 19, 2012 02:12 PM

Lucas,

Es que en un producto asi no vale que solo haga "algunas" cosas. O se "come" la aplicaci贸n entera, tal cual, y sale andando en web (o con unos m铆nimos cambios), 贸 queda como un bonito ejemplo pero que no vale para mucho m谩s.

A fecha de hoy nosotros no podemos asegurar que se pueda realizar un producto asi. E insisto, para aprender cosas nuevas, es ganas de reinvertar la rueda, cuando ya est谩 php, html5, javascript, etc.

Nosotros lo que hemos publicado son conceptos, pruebas, etc. No hemos mentido a nadie ni ofrecido algo incompleto. En la actualidad creemos que la soluci贸n m谩s viable ha de usar JQuery y JQuery Mobile.

Y mientras tanto la mejor soluci贸n es Terminal Server 贸 aplicaciones RDPs que permiten ejecutar Windows en el iPad, iPhone, etc.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1515
Joined: Thu Oct 30, 2008 02:37 PM
Re: OpenGL soporte para FWH 12.01
Posted: Thu Jan 19, 2012 03:40 PM

Antonio y compa帽ia,

A mi modo de ver, y como dicen "no soy tecnico", es muy dificil hacer un fweb que se "coma" las aplicaciones ya escritas; son muchos peque帽os detalles, muchos truquillos, esto, lo otro, etc, que hacen que sea una labor dificial.

Yo con fweb me conformaria que fuera lo que fue Fivewin a Clipper: un camino (incompatible) comodo a Windows; es decir: yo me quedo con que fweb fuera un camino sencillo hacia internet. 驴 qu茅 hizo entre otras muchas cosas fivewin ? Pues ni m谩s ni menos que "domar" a Windows: enrutar aquellos eventos que necesitabamos, ponernos un get like a clipper, habilitarnos un browse con edicion, etc... para que la programacion orientada a gestion empresarial fuera sencilla; pues lo mismo, lo mismo es lo que yo pretenderia con fweb.

Mis 2 c茅ntimos.
Saludos

Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: OpenGL soporte para FWH 12.01
Posted: Thu Jan 19, 2012 06:20 PM
Antonio,

Entonces, 驴parece que no v谩is a desarrollar Fiveweb?.

Efectivamente, tiene que ser c贸mo dices, que se coma todo el c贸digo fuente. Para empezar desde 0 o desde un 20% ya hay otras plataformas.

F谩cil no es desde luego, pero posible s铆. Y eso supone priorizar las ventanas y prototipos de Fivetech claro.

驴Hab茅is pensado en lanzar una encuesta sobre lo que necesita la gente?.

Muchas gracias.
Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: OpenGL soporte para FWH 12.01
Posted: Fri Jan 20, 2012 12:39 AM

Lucas,

De momento seguimos estudiando y aprendiendo todo lo que ofrece HTML5, JQuery, etc y viendo hasta donde se podr谩 贸 no llegar.

Tenemos partes resueltas, como los web sockets, pero muchas veces conforme aprendemos determinadas t茅cnicas, entendemos que hay que rehacer lo hecho.

Por ejemplo, hasta hace unos dias, desconociamos que HTML5 permite manejar bases de datos locales, lo que supone una avance enorme, para mantener datos locales temporales, sin necesidad de usar un motor local externo. Esta informaci贸n, como es obvio, nos hace replantearnos partes vitales.

Hoy por hoy, no podemos dar fechas de cuando tendremos un producto para web disponible. Si alguien tiene prisas, una necesidad urgente, ahi esta php, javascript. html, etc. :-)

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 1303
Joined: Tue Jul 21, 2009 08:12 AM
Re: OpenGL soporte para FWH 12.01
Posted: Fri Jan 20, 2012 08:34 AM

Antonio,

Muchas gracias.

S铆, nosotros hace a帽os que ya no empezamos ninguna aplicaci贸n con Fivewin.

El tema est谩 en las que ya tenemos desarrolladas con FWH, necesitamos saber si Fivetech tendr谩 una soluci贸n factible o tendremos que empezar desde cero.

Muchas gracias. Many thanks.



Un saludo, Best regards,



Harbour 3.2.0dev, Borland C++ 5.82 y FWH 13.06 [producci贸n]



Implementando MSVC 2010, FWH64 y ADO.



Abandonando uso xHarbour y SQLRDD.
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: OpenGL soporte para FWH 12.01
Posted: Fri Jan 20, 2012 08:54 AM

Creo que he explicado con claridad que hoy por hoy no disponemos de ese producto milagroso que porte las aplicaciones a la web, y lo que las empresas usan es Terminal Server.

Para cuando tendremos algo listo ? No lo sabemos y aun no sabemos si sera 100% posible.

regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: OpenGL soporte para FWH 12.01
Posted: Fri Jan 20, 2012 10:21 PM
Class GLWindow

glwindow.prg (c) FiveTech Software 2012
Code (fw): Select all Collapse
#include "hbclass.ch"
#include "common.ch"

#define GL_COLOR_BUFFER_BIT   0x00004000
#define GL_DEPTH_BUFFER_BIT   0x00000100

REQUEST HB_GT_GUI_DEFAULT

function main()
  
  local oWnd := GLWindow():New( 10, 10, 500, 500, "Test GLWindow" )

  oWnd:Activate()

return nil

PROCEDURE HB_GTSYS() 
return

CLASS GLWindow

   DATA bInit
   DATA bPaint
   DATA bResize
   DATA bIdle
   DATA bKeyDown

   METHOD New( nTop, nLeft, nWidth, nHeight, cTitle, nMode ) CONSTRUCTOR
   METHOD Activate( bInit, bPaint, bResize, bIdle, bKeyDown )
   METHOD Initiate()
   METHOD Display()
   METHOD ReShape( nWidth, nHeigth )
   METHOD Idle()
   METHOD KeyDown( nKey, nX, nY )
   
   METHOD End()
   
   DESTRUCTOR End()

ENDCLASS

METHOD New( nTop, nLeft, nWidth, nHeight, cTitle, nMode ) CLASS GLWindow

  DEFAULT nMode TO 20

  glutInit()
  glutInitDisplayMode( nMode )
  glutInitWindowSize( nWidth, nHeight )
  glutInitWindowPosition( nTop, nLeft )
  glutCreateWindow( cTitle )
  
  GLSetSelf( Self )

return Self

METHOD Activate( bInit, bPaint, bResize, bIdle, bKeyDown ) CLASS GLWindow

  ::bInit     := bInit
  ::bPaint    := bPaint
  ::bResize   := bResize
  ::bIdle     := bIdle
  ::bKeyDown  := bKeyDown

  ::Initiate()

  glutMainLoop()

return nil

METHOD Initiate() CLASS GLWindow

  if ::bInit != nil
     Eval( ::bInit, Self )
  endif

return nil

METHOD Display() CLASS GLWindow

   glClearColor( 0.0, 0.0, 1.0, 0.0 )
   glClear( HB_BITXOR( GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT ) )    

   glutSwapBuffers()
   glFlush()

return nil

METHOD ReShape( nWidth, nHeight ) CLASS GLWindow

return nil

METHOD Idle() CLASS GLWindow

return nil

METHOD KeyDown( nKey, nX, nY ) CLASS GLWindow

return nil

METHOD End() CLASS GLWindow

  GLReleaseSelf()
  
return nil  

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <GL/glut.h>

static PHB_ITEM pSelf;

HB_FUNC( GLSETSELF )
{
   pSelf = hb_gcGripGet( hb_param( 1, HB_IT_OBJECT ) );
}   

HB_FUNC( GLRELEASESELF )
{
   hb_gcGripDrop( pSelf );
}   

HB_FUNC( GLUTINIT )
{
   int argc = hb_cmdargARGC();
   
   glutInit( &argc, hb_cmdargARGV() );
   hb_ret();
}

HB_FUNC( GLUTINITDISPLAYMODE )
{
   glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
   hb_ret();
}

HB_FUNC( GLUTINITWINDOWSIZE )
{
   glutInitWindowSize( hb_parni( 1 ), hb_parni( 2 ) );
   hb_ret();
}

HB_FUNC( GLUTINITWINDOWPOSITION )
{
   glutInitWindowPosition( hb_parni( 1 ), hb_parni( 2 ) );
   hb_ret();
}

static void display( void )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "DISPLAY" ) );
   hb_vmPush( pSelf );
   hb_vmFunction( 0 );
}

HB_FUNC( GLUTCREATEWINDOW )
{
    glutCreateWindow( hb_parc( 1 ) );
    glutDisplayFunc( display );
    hb_ret();
}

HB_FUNC( GLUTMAINLOOP )
{
   glutMainLoop();
   hb_ret();
}

static void reshape( int width, int height )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "RESHAPE" ) );
   hb_vmPush( pSelf );
   hb_vmPushLong( width );
   hb_vmPushLong( height );
   hb_vmFunction( 2 );
}

static void keyboard( unsigned char key, int x, int y )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "KEYBOARD" ) );
   hb_vmPush( pSelf );
   hb_vmPushLong( key );
   hb_vmPushLong( x );
   hb_vmPushLong( y );
   hb_vmFunction( 3 );
}

static void idle( void )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "IDLE" ) );
   hb_vmPush( pSelf );
   hb_vmFunction( 0 );
}

HB_FUNC( GLCLEARCOLOR )
{
   glClearColor( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ) );
}

HB_FUNC( GLCLEAR )
{
   glClear( hb_parnl( 1 ) );    
}

HB_FUNC( GLUTSWAPBUFFERS )
{
   glutSwapBuffers();
}

HB_FUNC( GLFLUSH )
{
   glFlush();
}

#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: OpenGL soporte para FWH 12.01
Posted: Fri Jan 20, 2012 11:59 PM
Moviendo una forma con el teclado "s" y "d"

Code (fw): Select all Collapse
#include "hbclass.ch"
#include "common.ch"

#define GL_COLOR_BUFFER_BIT   0x00004000
#define GL_DEPTH_BUFFER_BIT   0x00000100

#define GL_POLYGON            0x0009

REQUEST HB_GT_GUI_DEFAULT

static nLeft := 0.1

function main()
  
  local oWnd := GLWindow():New( 10, 10, 800, 500, "Test GLWindow" )

  oWnd:Activate()

return nil

PROCEDURE HB_GTSYS() 
return

CLASS GLWindow

   DATA bInit
   DATA bPaint
   DATA bResize
   DATA bIdle
   DATA bKeyDown

   METHOD New( nTop, nLeft, nWidth, nHeight, cTitle, nMode ) CONSTRUCTOR
   METHOD Activate( bInit, bPaint, bResize, bIdle, bKeyDown )
   METHOD Initiate()
   METHOD Display()
   METHOD ReShape( nWidth, nHeigth )
   METHOD Idle()
   METHOD Keyboard( nKey, nX, nY )
   
   METHOD End()
   
   DESTRUCTOR End()

ENDCLASS

METHOD New( nTop, nLeft, nWidth, nHeight, cTitle, nMode ) CLASS GLWindow

  DEFAULT nMode TO 20

  glutInit()
  glutInitDisplayMode( nMode )
  glutInitWindowSize( nWidth, nHeight )
  glutInitWindowPosition( nTop, nLeft )
  glutCreateWindow( cTitle )
  
  GLSetSelf( Self )

return Self

METHOD Activate( bInit, bPaint, bResize, bIdle, bKeyDown ) CLASS GLWindow

  ::bInit     = bInit
  ::bPaint    = bPaint
  ::bResize   = bResize
  ::bIdle     = bIdle
  ::bKeyDown  = bKeyDown

  ::Initiate()

  glutMainLoop()

return nil

METHOD Initiate() CLASS GLWindow

  if ::bInit != nil
     Eval( ::bInit, Self )
  endif

return nil

METHOD Display() CLASS GLWindow

   glClearColor( 0.0, 0.0, 1.0, 0.0 )
   glClear( HB_BITXOR( GL_COLOR_BUFFER_BIT, GL_DEPTH_BUFFER_BIT ) )    

   glBegin( GL_POLYGON )
      glColor3f( 5.0, 0.0, 0.4 )
      glVertex3f( -1.0 + nLeft, -0.25, 0.0 )
      glVertex3f( -0.5 + nLeft, -0.25, 0.0 )
      glVertex3f( -0.75 + nLeft, 0.25, 0.0 )
   glEnd()
   
   glutSwapBuffers()
   glFlush()

return nil

METHOD ReShape( nWidth, nHeight ) CLASS GLWindow

return nil

METHOD Idle() CLASS GLWindow

return nil

METHOD Keyboard( nKey, nX, nY ) CLASS GLWindow

   if nKey == 100  // "d"
      nLeft += 0.02
      glutPostReDisplay()
   endif   
   
   if nKey == 115 // "s"
      nLeft -= 0.02
      glutPostReDisplay()
   endif   

   // Alert( Str( nKey ) )   

return nil

METHOD End() CLASS GLWindow

  GLReleaseSelf()
  
return nil  

#pragma BEGINDUMP

#include <windows.h>
#include <hbapi.h>
#include <GL/glut.h>

static PHB_ITEM pSelf;

HB_FUNC( GLSETSELF )
{
   pSelf = hb_gcGripGet( hb_param( 1, HB_IT_OBJECT ) );
}   

HB_FUNC( GLRELEASESELF )
{
   hb_gcGripDrop( pSelf );
}   

HB_FUNC( GLBEGIN )
{
   glBegin( hb_parnl( 1 ) );
}

HB_FUNC( GLEND )
{
   glEnd();
}      

HB_FUNC( GLVERTEX3F )
{
   glVertex3f( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ) );
}
   
HB_FUNC( GLCOLOR3F )
{
   glColor3f( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ) );
}   

HB_FUNC( GLRECTF )
{
   glRectf( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ) );
}   

HB_FUNC( GLUTSOLIDTEAPOT )
{
   glutSolidTeapot( hb_parnd( 1 ) );
}   

HB_FUNC( GLUTINIT )
{
   int argc = hb_cmdargARGC();
   
   glutInit( &argc, hb_cmdargARGV() );
   hb_ret();
}

HB_FUNC( GLUTINITDISPLAYMODE )
{
   glutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
   hb_ret();
}

HB_FUNC( GLUTINITWINDOWSIZE )
{
   glutInitWindowSize( hb_parni( 1 ), hb_parni( 2 ) );
   hb_ret();
}

HB_FUNC( GLUTINITWINDOWPOSITION )
{
   glutInitWindowPosition( hb_parni( 1 ), hb_parni( 2 ) );
   hb_ret();
}

static void display( void )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "DISPLAY" ) );
   hb_vmPush( pSelf );
   hb_vmFunction( 0 );
}

static void keyboard( unsigned char key, int x, int y )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "KEYBOARD" ) );
   hb_vmPush( pSelf );
   hb_vmPushLong( key );
   hb_vmPushLong( x );
   hb_vmPushLong( y );
   hb_vmFunction( 3 );
}

HB_FUNC( GLUTCREATEWINDOW )
{
    glutCreateWindow( hb_parc( 1 ) );
    glutDisplayFunc( display );
    glutKeyboardFunc( keyboard );
    hb_ret();
}

HB_FUNC( GLUTMAINLOOP )
{
   glutMainLoop();
   hb_ret();
}

static void reshape( int width, int height )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "RESHAPE" ) );
   hb_vmPush( pSelf );
   hb_vmPushLong( width );
   hb_vmPushLong( height );
   hb_vmFunction( 2 );
}

static void idle( void )
{
   hb_vmPushSymbol( hb_dynsymGetSymbol( "IDLE" ) );
   hb_vmPush( pSelf );
   hb_vmFunction( 0 );
}

HB_FUNC( GLCLEARCOLOR )
{
   glClearColor( hb_parnd( 1 ), hb_parnd( 2 ), hb_parnd( 3 ), hb_parnd( 4 ) );
}

HB_FUNC( GLCLEAR )
{
   glClear( hb_parnl( 1 ) );    
}

HB_FUNC( GLUTSWAPBUFFERS )
{
   glutSwapBuffers();
}

HB_FUNC( GLFLUSH )
{
   glFlush();
}

HB_FUNC( GLUTPOSTREDISPLAY )
{
   glutPostRedisplay();
}
   
#pragma ENDDUMP
regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion