Click here to Skip to main content
11,415,734 members (85,282 online)
Click here to Skip to main content
Add your own
alternative version

OAG Library (OpenGL) Part 1 - Setting Up the Library for an MFC Application

, 7 Aug 2011 CPOL
OAG is a library written in C++. With this library, you can create OpenGL based applications.
freetype-2311.zip
freetype-2.3.11
vms_make.com
ChangeLog.20
version.sed
Jamrules
Jamfile
configure
docs
reference
README
INSTALL.CROSS
INSTALL.MAC
TRUETYPE
MAKEPP
INSTALL
INSTALL.ANY
release
UPGRADE.UNIX
INSTALL.UNIX
VERSION.DLL
INSTALL.VMS
DEBUG
PROBLEMS
CUSTOMIZE
TODO
PATENTS
CHANGES
INSTALL.GNU
objs
README
builds
modules.mk
exports.mk
freetype.mk
link_std.mk
toplevel.mk
os2
os2-gcc.mk
os2-def.mk
os2-dev.mk
detect.mk
ansi
ansi-def.mk
ansi.mk
symbian
freetype.mmp
bld.inf
win32
w32-dev.mk
vc2005
w32-lcc.mk
vc2008
w32-intl.mk
w32-bccd.mk
w32-wat.mk
w32-icc.mk
w32-mingw32.mk
w32-bcc.mk
w32-gcc.mk
detect.mk
win32-def.mk
visualce
freetype.dsp
freetype.dsw
visualc
freetype.dsp
freetype.dsw
w32-vcc.mk
atari
gen-purec-patch.sh
FREETYPE.PRJ
FNames.SIC
deflinejoiner.awk
unix
ltmain.sh
config.sub
ftconfig.in
configure
mkinstalldirs
freetype2.m4
unixddef.mk
freetype2.in
install-sh
configure.ac
ft-munmap.m4
unix-cc.in
freetype-config.in
unix.mk
unix-def.in
unix-dev.mk
detect.mk
aclocal.m4
unix-lcc.mk
config.guess
configure.raw
install.mk
beos
beos.mk
beos-def.mk
detect.mk
newline
amiga
makefile.os4
makefile
smakefile
include
freetype
config
README
src
base
detect.mk
vms
compiler
watcom.mk
intelc.mk
visualc.mk
visualage.mk
ansi-cc.mk
win-lcc.mk
bcc-dev.mk
gcc.mk
gcc-dev.mk
emx.mk
unix-lcc.mk
bcc.mk
dos
dos-gcc.mk
dos-def.mk
dos-wat.mk
detect.mk
dos-emx.mk
link_dos.mk
mac
README
wince
vc2008-ce
vc2005-ce
ChangeLog.22
include
freetype
config
internal
services
ChangeLog.21
autogen.sh
README
README.git
devel
src
type1
Jamfile
module.mk
rules.mk
sfnt
Jamfile
module.mk
rules.mk
Jamfile
psnames
Jamfile
module.mk
rules.mk
truetype
Jamfile
module.mk
rules.mk
tools
Jamfile
ftrandom
README
Makefile
docmaker
otvalid
Jamfile
module.mk
rules.mk
pcf
Jamfile
module.mk
README
rules.mk
raster
Jamfile
module.mk
rules.mk
base
Jamfile
rules.mk
lzw
Jamfile
rules.mk
gxvalid
Jamfile
module.mk
README
rules.mk
cache
Jamfile
rules.mk
psaux
Jamfile
module.mk
rules.mk
winfonts
Jamfile
module.mk
rules.mk
type42
Jamfile
module.mk
rules.mk
cff
Jamfile
module.mk
rules.mk
pfr
Jamfile
module.mk
rules.mk
gzip
Jamfile
rules.mk
pshinter
Jamfile
module.mk
rules.mk
bdf
Jamfile
module.mk
README
rules.mk
autofit
Jamfile
module.mk
rules.mk
smooth
Jamfile
module.mk
rules.mk
cid
Jamfile
module.mk
rules.mk
modules.cfg
Makefile
ChangeLog
OAGLibrary.zip
OAGLibrary
Common
include
src
IOSystem
include
Compiler
src
ObjectMappingTable
include
src
OpenGL
include
BMP
FontMapping
Font
JPG
OAGXML
PCX
TGA
TextureMapping
Texture
WindowsViewer
oag
src
BMP
FontMapping
Font
JPG
OAGXML
PCX
TGA
TextureMapping
Texture
WindowsViewer
oag
Workspaces
VC9
Common
oagCommon
Debug
OAGCommon.vcproj.NTHOME.Tucci.user
OAGCommon.vcproj.etucci-PC.etucci.user
Release
IOSystem
Debug
IOSystem.suo
IOSystem.vcproj.NTHOME.Tucci.user
IOSystem.vcproj.etucci-PC.etucci.user
Release
ObjectMappingTable
Debug
ObjectMappingTable.vcproj.NTHOME.Tucci.user
ObjectMappingTable.vcproj.etucci-PC.etucci.user
Release
OpenGL.suo
OpenGL
BMP
BMP.vcproj.NTHOME.Tucci.user
BMP.vcproj.etucci-PC.etucci.user
Debug
Release
FontMapping
Debug
FontMapping.vcproj.NTHOME.Tucci.user
Release
Font
Debug
Font.vcproj.NTHOME.Tucci.user
Font.vcproj.etucci-PC.etucci.user
Release
JPG
Debug
JPG.vcproj.NTHOME.Tucci.user
JPG.vcproj.etucci-PC.etucci.user
Release
OAGXML
Debug
OAGXML.vcproj.NTHOME.Tucci.user
OAGXML.vcproj.etucci-PC.etucci.user
Release
PCX
Debug
PCX.vcproj.NTHOME.Tucci.user
PCX.vcproj.etucci-PC.etucci.user
Release
TGA
Debug
Release
TGA.vcproj.NTHOME.Tucci.user
TGA.vcproj.etucci-PC.etucci.user
TextureMapping
Debug
Release
TextureMapping.suo
TextureMapping.vcproj.NTHOME.Tucci.user
TextureMapping.vcproj.etucci-PC.etucci.user
Texture
Debug
Release
Texture.vcproj.NTHOME.Tucci.user
Texture.vcproj.etucci-PC.etucci.user
WindowsViewer
Debug
Release
WindowsViewer.vcproj.NTHOME.Tucci.user
WindowsViewer.vcproj.etucci-PC.etucci.user
oag
Debug
Release
oag.vcproj.NTHOME.Tucci.user
oag.vcproj.etucci-PC.etucci.user
bin
VC9
OAGXML_DOCUMENTATION.zip
OAGXML_DOCUMENTATION.rtf
OAG_2D_demo.zip
OAGMFC.exe
OAG_2D_SRC.zip
OAGMFC
Debug
UserImages.bmp
OAGMFC.suo
OAGMFC
CadTools
Debug
OAGMFC.APS
OAGMFC.vcproj.NTHOME.Tucci.user
Release
RenderGraphicMFC.aps
UserImages.bmp
res
OAGMFC.ico
OAGMFCDoc.ico
Toolbar.bmp
Toolbar256.bmp
Release
UserImages.bmp
OAG_Demo.zip
OAG_Demo
RenderGraphicMFC.exe
readme.zip
readme.rtf
RenderGraphicMFC.zip
RenderGraphicMFC
RenderGraphicMFC
UserImages.bmp
res
RenderGraphicMFC.ico
RenderGraphicMFCDoc.ico
Toolbar.bmp
Toolbar256.bmp
WinAPIs.zip
WinAPIs
FTGL-2.1.3rc5
bin
Debug
Release
include
FTGL
FTGlyph
FTLayout
src
FTGL
FTGlyph
FTLayout
LibJPEG
Debug
Release
files
libjpeg.map
LibXML
COPYING
Copyright
LibXML.vcproj.8.00.old
bin
Debug Win32
LibXML
Intermediate
Release Win32
LibXML
Intermediate
include
libxml
XmlParserInterface
Debug
Release
xmlsamples.zip
xmlsample
2DTree.bmp
Building2D.oagxml
Polyline.oagxml
Rect.oagxml
TextureAndText.oagxml
Triangle.oagxml
arial.ttf
fontMapping.oagxml
honda-pcx.jpg
line.oagxml
line2.oagxml
shrub.jpg
/***************************************************************************/
/*                                                                         */
/*  basepic.c                                                              */
/*                                                                         */
/*    The FreeType position independent code services for base.            */
/*                                                                         */
/*  Copyright 2009 by                                                      */
/*  Oran Agra and Mickey Gabel.                                            */
/*                                                                         */
/*  This file is part of the FreeType project, and may only be used,       */
/*  modified, and distributed under the terms of the FreeType project      */
/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
/*  this file you indicate that you have read the license and              */
/*  understand and accept it fully.                                        */
/*                                                                         */
/***************************************************************************/


#include <ft2build.h>
#include FT_FREETYPE_H
#include FT_INTERNAL_OBJECTS_H
#include "basepic.h"

#ifdef FT_CONFIG_OPTION_PIC

  /* forward declaration of PIC init functions from ftglyph.c */
  void FT_Init_Class_ft_outline_glyph_class(FT_Glyph_Class*);
  void FT_Init_Class_ft_bitmap_glyph_class(FT_Glyph_Class*);

  /* forward declaration of PIC init functions from ftinit.c */
  FT_Error ft_create_default_module_classes(FT_Library);
  void ft_destroy_default_module_classes(FT_Library);

  void
  ft_base_pic_free( FT_Library library )
  {
    FT_PIC_Container* pic_container = &library->pic_container;
    FT_Memory    memory = library->memory;
    if ( pic_container->base )
    {
      /* Destroy default module classes (in case FT_Add_Default_Modules was used) */
      ft_destroy_default_module_classes( library );

      FT_FREE( pic_container->base );
      pic_container->base = NULL;
    }
  }


  FT_Error
  ft_base_pic_init( FT_Library library )
  {
    FT_PIC_Container* pic_container = &library->pic_container;
    FT_Error        error = FT_Err_Ok;
    BasePIC*     container;
    FT_Memory    memory = library->memory;

    /* allocate pointer, clear and set global container pointer */
    if ( FT_ALLOC ( container, sizeof ( *container ) ) )
      return error;
    FT_MEM_SET( container, 0, sizeof(*container) );
    pic_container->base = container;

    /* initialize default modules list and pointers */
    error = ft_create_default_module_classes( library );
    if ( error )
      goto Exit;

    /* initialize pointer table - this is how the module usually expects this data */
    FT_Init_Class_ft_outline_glyph_class(&container->ft_outline_glyph_class);
    FT_Init_Class_ft_bitmap_glyph_class(&container->ft_bitmap_glyph_class);

Exit:
    if(error)
      ft_base_pic_free(library);
    return error;
  }


#endif /* FT_CONFIG_OPTION_PIC */


/* END */

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Eduardo Tucci
Software Developer
Brazil Brazil
I live in Matão, a small city in Brazil. I studied as Programmer in a College for Software Development in Database.
After finishing the College I have been working with java, c# and Computer Graphics with searches for OpenGL.

| Advertise | Privacy | Terms of Use | Mobile
Web04 | 2.8.150427.4 | Last Updated 7 Aug 2011
Article Copyright 2010 by Eduardo Tucci
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid