Click here to Skip to main content
15,892,746 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: OAGMFC, Configuration: Debug|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:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\RSP00000361402960.rsp" with contents

[

/Od /I &quot;C:\Libs_Projects\OAGLibrary\OpenGL\include\oag&quot; /I &quot;c:\Libs_Projects\OAGLibrary\OpenGL\include\Texture&quot; /I &quot;c:\Libs_Projects\OAGLibrary\OpenGL\include\BMP&quot; /I &quot;c:\Libs_Projects\OAGLibrary\OpenGL\include\PCX&quot; /I &quot;c:\Libs_Projects\OAGLibrary\OpenGL\include\OAGXML&quot; /I &quot;c:\Libs_Projects\OAGLibrary\OpenGL\include\JPG&quot; /I &quot;C:\Libs_Projects\OAGLibrary\OpenGL\include\Font&quot; /I &quot;C:\Libs_Projects\OAGLibrary\OpenGL\include\WindowsViewer&quot; /I &quot;C:\Libs_Projects\WinAPIs\XmlParserInterface&quot; /I &quot;C:\Libs_Projects\WInAPis\LibXML\include&quot; /I &quot;C:\Libs_Projects\WinAPIs\FTGL-2.1.3rc5\include&quot; /I &quot;C:\Libs_Projects\WinAPIs\freetype-2.3.11\include&quot; /I &quot;c:\Libs_Projects\OAGLibrary\OpenGL\include\TextureMapping&quot; /I &quot;C:\Libs_Projects\OAGLibrary\OpenGL\include\FontMapping&quot; /D &quot;WIN32&quot; /D &quot;_WINDOWS&quot; /D &quot;_DEBUG&quot; /D &quot;_AFXDLL&quot; /D &quot;_MBCS&quot; /Gm /EHsc /RTC1 /MDd /Yu&quot;stdafx.h&quot; /Fp&quot;Debug\OAGMFC.pch&quot; /Fo&quot;Debug\\&quot; /Fd&quot;Debug\vc90.pdb&quot; /W3 /c /ZI /TP &quot;.\CadTools\RasterImageTool.cpp&quot;

]

Creating command line "cl.exe @"c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\RSP00000361402960.rsp" /nologo /errorReport:prompt"

Creating command line "rc.exe /d "_DEBUG" /d "_AFXDLL" /l 0x409 /I "Debug" /fo"Debug/OAGMFC.res" ".\OAGMFC.rc""

Creating temporary file "c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\TMP00000461402960.tmp" with contents

[

1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ &quot;.\\Debug\\OAGMFC.exe.embed.manifest&quot;

]

Creating command line "rc.exe /fo".\Debug\OAGMFC.exe.embed.manifest.res" "c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\TMP00000461402960.tmp""

Creating temporary file "c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\RSP00000561402960.rsp" with contents

[

/OUT:&quot;C:\Projetos Visual Studio\OAGMFC\Debug\OAGMFC.exe&quot; /INCREMENTAL /LIBPATH:&quot;C:\Libs_Projects\OAGLibrary\bin\VC9&quot; /LIBPATH:&quot;C:\Libs_Projects\WinAPIs\XmlParserInterface\Debug&quot; /MANIFEST /MANIFESTFILE:&quot;Debug\OAGMFC.exe.intermediate.manifest&quot; /MANIFESTUAC:&quot;level='asInvoker' uiAccess='false'&quot; /NODEFAULTLIB:&quot;LIBCMTD&quot; /DEBUG /PDB:&quot;C:\Projetos Visual Studio\OAGMFC\Debug\OAGMFC.pdb&quot; /SUBSYSTEM:WINDOWS /DYNAMICBASE /NXCOMPAT /MACHINE:X86 oagCommond.lib oagd.lib WindowsViewerd.lib XmlParserInterfaced.lib Textured.lib TextureMappingd.lib BMPd.lib JPGd.lib PCXd.lib TGAd.lib OAGXMLd.lib IOSystemd.lib Fontd.lib ObjectMappingTabled.lib FontMappingd.lib


&quot;.\Debug\MainFrm.obj&quot;


&quot;.\Debug\OAGMFC.obj&quot;


&quot;.\Debug\OAGMFCDoc.obj&quot;


&quot;.\Debug\OAGMFCView.obj&quot;


&quot;.\Debug\stdafx.obj&quot;


&quot;.\Debug\OAGMFC.res&quot;


&quot;.\Debug\LineTool.obj&quot;


&quot;.\Debug\PolylineTool.obj&quot;


&quot;.\Debug\RasterImageRectTool.obj&quot;


&quot;.\Debug\RasterImageTool.obj&quot;


&quot;.\Debug\RasterImageTriangleTool.obj&quot;


&quot;.\Debug\RectangleTool.obj&quot;


&quot;.\Debug\Text2DTool.obj&quot;


&quot;.\Debug\Tool.obj&quot;


&quot;.\Debug\TriangleTool.obj&quot;


&quot;.\Debug\OAGMFC.exe.embed.manifest.res&quot;

]

Creating command line "link.exe @"c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\RSP00000561402960.rsp" /NOLOGO /ERRORREPORT:PROMPT"

Creating temporary file "c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\RSP00000661402960.rsp" with contents

[

/out:&quot;.\Debug\OAGMFC.exe.embed.manifest&quot; /notify_update /manifest


&quot;.\Debug\OAGMFC.exe.intermediate.manifest&quot;

]

Creating command line "mt.exe @"c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\RSP00000661402960.rsp" /nologo"

Creating temporary file "c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\BAT00000761402960.bat" with contents

[

@echo Manifest resource last updated at %TIME% on %DATE% &gt; &quot;.\Debug\mt.dep&quot;

]

Creating command line """c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\BAT00000761402960.bat"""

Creating temporary file "c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\TMP00000861402960.tmp" with contents

[

1 /* CREATEPROCESS_MANIFEST_RESOURCE_ID */ 24 /* RT_MANIFEST */ &quot;.\\Debug\\OAGMFC.exe.embed.manifest&quot;

]

Creating command line "rc.exe /fo".\Debug\OAGMFC.exe.embed.manifest.res" "c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\TMP00000861402960.tmp""

Creating temporary file "c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\RSP00000961402960.rsp" with contents

[

/OUT:&quot;C:\Projetos Visual Studio\OAGMFC\Debug\OAGMFC.exe&quot; /INCREMENTAL /LIBPATH:&quot;C:\Libs_Projects\OAGLibrary\bin\VC9&quot; /LIBPATH:&quot;C:\Libs_Projects\WinAPIs\XmlParserInterface\Debug&quot; /MANIFEST /MANIFESTFILE:&quot;Debug\OAGMFC.exe.intermediate.manifest&quot; /MANIFESTUAC:&quot;level='asInvoker' uiAccess='false'&quot; /NODEFAULTLIB:&quot;LIBCMTD&quot; /DEBUG /PDB:&quot;c:\Projetos Visual Studio\OAGMFC\Debug\OAGMFC.pdb&quot; /SUBSYSTEM:WINDOWS /DYNAMICBASE /NXCOMPAT /MACHINE:X86 oagCommond.lib oagd.lib WindowsViewerd.lib XmlParserInterfaced.lib Textured.lib TextureMappingd.lib BMPd.lib JPGd.lib PCXd.lib TGAd.lib OAGXMLd.lib IOSystemd.lib Fontd.lib ObjectMappingTabled.lib FontMappingd.lib


&quot;.\Debug\MainFrm.obj&quot;


&quot;.\Debug\OAGMFC.obj&quot;


&quot;.\Debug\OAGMFCDoc.obj&quot;


&quot;.\Debug\OAGMFCView.obj&quot;


&quot;.\Debug\stdafx.obj&quot;


&quot;.\Debug\OAGMFC.res&quot;


&quot;.\Debug\LineTool.obj&quot;


&quot;.\Debug\PolylineTool.obj&quot;


&quot;.\Debug\RasterImageRectTool.obj&quot;


&quot;.\Debug\RasterImageTool.obj&quot;


&quot;.\Debug\RasterImageTriangleTool.obj&quot;


&quot;.\Debug\RectangleTool.obj&quot;


&quot;.\Debug\Text2DTool.obj&quot;


&quot;.\Debug\Tool.obj&quot;


&quot;.\Debug\TriangleTool.obj&quot;


&quot;.\Debug\OAGMFC.exe.embed.manifest.res&quot;

]

Creating command line "link.exe @"c:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\RSP00000961402960.rsp" /NOLOGO /ERRORREPORT:PROMPT"

</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...

RasterImageTool.cpp

Compiling resources...

Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1

Copyright (C) Microsoft Corporation.  All rights reserved.

Compiling manifest to resources...

Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1

Copyright (C) Microsoft Corporation.  All rights reserved.

Linking...

Embedding manifest...

Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1

Copyright (C) Microsoft Corporation.  All rights reserved.

</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:\Projetos Visual Studio\OAGMFC\OAGMFC\Debug\BuildLog.htm"

OAGMFC - 0 error(s), 0 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