You've already forked lazarus-ccr
added compilation mode to widget units
some clean-up and fixing of compiler warnings initial import of the fpmake build file git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2228 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
18
components/nvidia-widgets/src/config.inc
Normal file
18
components/nvidia-widgets/src/config.inc
Normal file
@ -0,0 +1,18 @@
|
||||
type
|
||||
//add more here
|
||||
NV_CONTEXT = (GLUT);
|
||||
NV_PAINTER = (GL);
|
||||
|
||||
const
|
||||
NV_DEBUG = True;
|
||||
NV_DEBUG_FLAGS: array [0..2] of string = ('-g', '-gl', '-gh');
|
||||
|
||||
NV_PROFILE = False;
|
||||
NV_PROFILE_FLAGS: array [0..0] of string = ('-pg');
|
||||
|
||||
var
|
||||
//choose the context
|
||||
NV_ACTIVE_CONTEXT: NV_CONTEXT = GLUT;
|
||||
|
||||
//choose the painter
|
||||
NV_ACTIVE_PAINTER: NV_PAINTER = GL;
|
57
components/nvidia-widgets/src/fpmake.pp
Normal file
57
components/nvidia-widgets/src/fpmake.pp
Normal file
@ -0,0 +1,57 @@
|
||||
program fpmake;
|
||||
|
||||
{$mode objfpc} {$H+}
|
||||
|
||||
uses
|
||||
fpmkunit;
|
||||
|
||||
{$include config.inc}
|
||||
|
||||
var
|
||||
P: TPackage;
|
||||
i: integer;
|
||||
|
||||
begin
|
||||
with Installer do
|
||||
begin
|
||||
//create nvwidgets package
|
||||
P := AddPackage('nvwidget');
|
||||
|
||||
P.Version := '1.00';
|
||||
//P.Options.Add('-MObjFPC');
|
||||
|
||||
if NV_DEBUG then
|
||||
for i := 0 to High(NV_DEBUG_FLAGS) do
|
||||
P.Options.Add(NV_DEBUG_FLAGS[i]);
|
||||
|
||||
if NV_PROFILE then
|
||||
for i := 0 to High(NV_PROFILE_FLAGS) do
|
||||
P.Options.Add(NV_PROFILE_FLAGS[i]);
|
||||
|
||||
//base widget units
|
||||
P.Targets.AddUnit('./nvwidgets/nvwidgets.pas');
|
||||
|
||||
write('package ', P.Name, ' configured for ');
|
||||
|
||||
//context units
|
||||
case NV_ACTIVE_CONTEXT of
|
||||
GLUT: begin
|
||||
write('the GLUT context');
|
||||
P.Targets.AddUnit('./nvwidgets/nvglutwidgets.pas');
|
||||
end;
|
||||
end;
|
||||
|
||||
//painter units
|
||||
case NV_ACTIVE_PAINTER of
|
||||
GL: begin
|
||||
writeln(' with the OpenGL painter');
|
||||
P.UnitPath.Add('./gl/');
|
||||
P.UnitPath.Add('./nvglutils/.');
|
||||
P.Targets.AddUnit('./nvwidgets/nvglwidgets.pas');
|
||||
end;
|
||||
end;
|
||||
|
||||
Run;
|
||||
end;
|
||||
end.
|
||||
|
@ -6,6 +6,8 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
unit nvShaderUtils;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
{ $define NV_REPORT_COMPILE_ERRORS}
|
||||
|
@ -25,7 +25,6 @@ var
|
||||
errorScale: double = 4;
|
||||
compressionRate: double = 1;
|
||||
texture: GLuint = 0;
|
||||
let: string = 'linedit test';
|
||||
|
||||
procedure closeapp;
|
||||
begin
|
||||
@ -80,8 +79,6 @@ var
|
||||
formatIdx: integer;
|
||||
Text: string;
|
||||
textureRect: Rect;
|
||||
|
||||
c: integer;
|
||||
begin
|
||||
none.Rect(0, 0);
|
||||
|
||||
|
@ -9,6 +9,8 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
unit nvGLWidgets;
|
||||
|
||||
{$mode objfpc}{$H+}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
@ -124,7 +126,7 @@ type
|
||||
|
||||
public
|
||||
constructor Create;
|
||||
destructor Destroy;
|
||||
destructor Destroy; override;
|
||||
|
||||
procedure _begin(const window: Rect); override;
|
||||
procedure _end; override;
|
||||
@ -261,6 +263,7 @@ end;
|
||||
destructor GLUIPainter.Destroy;
|
||||
begin
|
||||
Font.Clean;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure GLUIPainter._begin(const window: Rect);
|
||||
|
Reference in New Issue
Block a user