Click here to Skip to main content
15,886,689 members
Articles / Multimedia / OpenGL

OAG Library (OpenGL) Part 2.3 - Drawing 2D Textures Using the Mouse and Programatically

Rate me:
Please Sign up or sign in to vote.
4.29/5 (6 votes)
22 Oct 2010CPOL3 min read 34.1K   1.3K   17  
This tutorial shows library code for 2D Textures and how to draw them programatically using the mouse in an MFC application.
��<html>

<head>

<META HTTP-EQUIV="Content-Type" content="text/html; charset=utf-16">

</head>

<body>

<pre>

<table width=100% bgcolor=#CFCFE5><tr> <td> <font face=arial size=+3>

Build Log

</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>

<h3>Build started: Project: freetype, Configuration: Debug Singlethreaded|Win32</h3>

</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>

Command Lines

</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Creating temporary file "c:\Estudos SVN\ExternalLibs\freetype-2.3.11\objs\debug_st\RSP00000446844168.rsp" with contents

[

/Od /I &quot;..\..\..\include&quot; /D &quot;_DEBUG&quot; /D &quot;WIN32&quot; /D &quot;_LIB&quot; /D &quot;_CRT_SECURE_NO_WARNINGS&quot; /D &quot;FT_DEBUG_LEVEL_ERROR&quot; /D &quot;FT_DEBUG_LEVEL_TRACE&quot; /D &quot;FT2_BUILD_LIBRARY&quot; /D &quot;_VC80_UPGRADE=0x0710&quot; /D &quot;_MBCS&quot; /FD /EHsc /RTC1 /MTd /Za /Fp&quot;.\..\..\..\objs\debug_st/freetype.pch&quot; /Fo&quot;.\..\..\..\objs\debug_st/&quot; /Fd&quot;.\..\..\..\objs\debug_st/&quot; /W4 /c /Zi &quot;..\..\..\src\autofit\autofit.c&quot;


&quot;..\..\..\src\winfonts\winfnt.c&quot;


&quot;..\..\..\src\type42\type42.c&quot;


&quot;..\..\..\src\cid\type1cid.c&quot;


&quot;..\..\..\src\type1\type1.c&quot;


&quot;..\..\..\src\truetype\truetype.c&quot;


&quot;..\..\..\src\sfnt\sfnt.c&quot;


&quot;..\..\..\src\raster\raster.c&quot;


&quot;..\..\..\src\psnames\psmodule.c&quot;


&quot;..\..\..\src\pshinter\pshinter.c&quot;


&quot;..\..\..\src\psaux\psaux.c&quot;


&quot;..\..\..\src\pfr\pfr.c&quot;


&quot;..\..\..\src\pcf\pcf.c&quot;


&quot;..\..\..\src\base\ftwinfnt.c&quot;


&quot;..\..\..\src\base\fttype1.c&quot;


&quot;..\..\..\src\base\ftsynth.c&quot;


&quot;..\..\..\src\base\ftpfr.c&quot;


&quot;..\..\..\src\base\ftmm.c&quot;


&quot;..\..\..\src\base\ftbbox.c&quot;


&quot;..\..\..\src\smooth\smooth.c&quot;


&quot;..\..\..\src\base\ftsystem.c&quot;


&quot;..\..\..\src\base\ftstroke.c&quot;


&quot;..\..\..\src\lzw\ftlzw.c&quot;


&quot;..\..\..\src\base\ftinit.c&quot;


&quot;..\..\..\src\gzip\ftgzip.c&quot;


&quot;..\..\..\src\base\ftglyph.c&quot;


&quot;..\..\..\src\base\ftgasp.c&quot;


&quot;..\..\..\src\base\ftfstype.c&quot;


&quot;..\..\..\src\cache\ftcache.c&quot;


&quot;..\..\..\src\base\ftbitmap.c&quot;


&quot;..\..\..\src\base\ftbase.c&quot;


&quot;..\..\..\src\cff\cff.c&quot;


&quot;..\..\..\src\bdf\bdf.c&quot;

]

Creating command line "cl.exe @"c:\Estudos SVN\ExternalLibs\freetype-2.3.11\objs\debug_st\RSP00000446844168.rsp" /nologo /errorReport:prompt"

Creating temporary file "c:\Estudos SVN\ExternalLibs\freetype-2.3.11\objs\debug_st\RSP00000546844168.rsp" with contents

[

/Od /I &quot;..\..\..\include&quot; /D &quot;_DEBUG&quot; /D &quot;WIN32&quot; /D &quot;_LIB&quot; /D &quot;_CRT_SECURE_NO_WARNINGS&quot; /D &quot;FT_DEBUG_LEVEL_ERROR&quot; /D &quot;FT_DEBUG_LEVEL_TRACE&quot; /D &quot;FT2_BUILD_LIBRARY&quot; /D &quot;_VC80_UPGRADE=0x0710&quot; /D &quot;_MBCS&quot; /FD /EHsc /RTC1 /MTd /Fp&quot;.\..\..\..\objs\debug_st/freetype.pch&quot; /Fo&quot;.\..\..\..\objs\debug_st/&quot; /Fd&quot;.\..\..\..\objs\debug_st/&quot; /W4 /c /Zi &quot;..\ftdebug.c&quot;

]

Creating command line "cl.exe @"c:\Estudos SVN\ExternalLibs\freetype-2.3.11\objs\debug_st\RSP00000546844168.rsp" /nologo /errorReport:prompt"

Creating temporary file "c:\Estudos SVN\ExternalLibs\freetype-2.3.11\objs\debug_st\RSP00000646844168.rsp" with contents

[

/OUT:&quot;..\..\..\objs\win32\vc2008\freetype2311ST_D.lib&quot; &quot;..\..\..\objs\debug_st\autofit.obj&quot;


&quot;..\..\..\objs\debug_st\bdf.obj&quot;


&quot;..\..\..\objs\debug_st\cff.obj&quot;


&quot;..\..\..\objs\debug_st\ftbase.obj&quot;


&quot;..\..\..\objs\debug_st\ftbitmap.obj&quot;


&quot;..\..\..\objs\debug_st\ftcache.obj&quot;


&quot;..\..\..\objs\debug_st\ftdebug.obj&quot;


&quot;..\..\..\objs\debug_st\ftfstype.obj&quot;


&quot;..\..\..\objs\debug_st\ftgasp.obj&quot;


&quot;..\..\..\objs\debug_st\ftglyph.obj&quot;


&quot;..\..\..\objs\debug_st\ftgzip.obj&quot;


&quot;..\..\..\objs\debug_st\ftinit.obj&quot;


&quot;..\..\..\objs\debug_st\ftlzw.obj&quot;


&quot;..\..\..\objs\debug_st\ftstroke.obj&quot;


&quot;..\..\..\objs\debug_st\ftsystem.obj&quot;


&quot;..\..\..\objs\debug_st\smooth.obj&quot;


&quot;..\..\..\objs\debug_st\ftbbox.obj&quot;


&quot;..\..\..\objs\debug_st\ftmm.obj&quot;


&quot;..\..\..\objs\debug_st\ftpfr.obj&quot;


&quot;..\..\..\objs\debug_st\ftsynth.obj&quot;


&quot;..\..\..\objs\debug_st\fttype1.obj&quot;


&quot;..\..\..\objs\debug_st\ftwinfnt.obj&quot;


&quot;..\..\..\objs\debug_st\pcf.obj&quot;


&quot;..\..\..\objs\debug_st\pfr.obj&quot;


&quot;..\..\..\objs\debug_st\psaux.obj&quot;


&quot;..\..\..\objs\debug_st\pshinter.obj&quot;


&quot;..\..\..\objs\debug_st\psmodule.obj&quot;


&quot;..\..\..\objs\debug_st\raster.obj&quot;


&quot;..\..\..\objs\debug_st\sfnt.obj&quot;


&quot;..\..\..\objs\debug_st\truetype.obj&quot;


&quot;..\..\..\objs\debug_st\type1.obj&quot;


&quot;..\..\..\objs\debug_st\type1cid.obj&quot;


&quot;..\..\..\objs\debug_st\type42.obj&quot;


&quot;..\..\..\objs\debug_st\winfnt.obj&quot;

]

Creating command line "lib.exe @"c:\Estudos SVN\ExternalLibs\freetype-2.3.11\objs\debug_st\RSP00000646844168.rsp" /NOLOGO"

</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>

Output Window

</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Compiling...

autofit.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

c:\estudos svn\externallibs\freetype-2.3.11\src\autofit\afhints.c(555) : warning C4100: 'get_inflections' : unreferenced formal parameter

winfnt.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

type42.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

type1cid.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

type1.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

truetype.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

c:\estudos svn\externallibs\freetype-2.3.11\src\truetype\ttgxvar.c(237) : warning C4018: '<=' : signed/unsigned mismatch

c:\estudos svn\externallibs\freetype-2.3.11\src\truetype\ttgxvar.c(245) : warning C4018: '<=' : signed/unsigned mismatch

c:\estudos svn\externallibs\freetype-2.3.11\src\truetype\ttgxvar.c(253) : warning C4018: '<=' : signed/unsigned mismatch

c:\estudos svn\externallibs\freetype-2.3.11\src\truetype\ttgxvar.c(258) : warning C4018: '<=' : signed/unsigned mismatch

sfnt.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

c:\estudos svn\externallibs\freetype-2.3.11\src\sfnt\ttload.c(204) : warning C4244: '=' : conversion from 'FT_UInt' to 'FT_UShort', possible loss of data

c:\estudos svn\externallibs\freetype-2.3.11\src\sfnt\ttload.c(264) : warning C4244: '=' : conversion from 'FT_UInt' to 'FT_UShort', possible loss of data

raster.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

psmodule.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

pshinter.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

psaux.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

pfr.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

pcf.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftwinfnt.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

fttype1.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftsynth.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftpfr.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftmm.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftbbox.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

smooth.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

Generating Code...

Compiling...

ftsystem.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftstroke.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftlzw.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftinit.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftgzip.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftglyph.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftgasp.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftfstype.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftcache.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftbitmap.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

ftbase.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

cff.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

bdf.c

C:\Program Files\Microsoft Visual Studio 9.0\VC\include\sal.h(108) : warning C4001: nonstandard extension 'single line comment' was used

Generating Code...

Compiling...

ftdebug.c

Creating library...

</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>

Results

</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Build log was saved at "file://c:\Estudos SVN\ExternalLibs\freetype-2.3.11\objs\debug_st\BuildLog.htm"

freetype - 0 error(s), 40 warning(s)

</pre></table><table   width=100% height=20 bgcolor=#CFCFE5><tr><td><font face=arial size=+2>

</font></table></body></html>

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)


Written By
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.

Comments and Discussions