Port jpgfactory to OSG
This commit is contained in:
@@ -432,6 +432,12 @@
|
|||||||
<File
|
<File
|
||||||
RelativePath="..\..\simgear\screen\GLBitmaps.h">
|
RelativePath="..\..\simgear\screen\GLBitmaps.h">
|
||||||
</File>
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\simgear\screen\jpgfactory.cxx">
|
||||||
|
</File>
|
||||||
|
<File
|
||||||
|
RelativePath="..\..\simgear\screen\jpgfactory.hxx">
|
||||||
|
</File>
|
||||||
<File
|
<File
|
||||||
RelativePath="..\..\simgear\screen\RenderTexture.cpp">
|
RelativePath="..\..\simgear\screen\RenderTexture.cpp">
|
||||||
</File>
|
</File>
|
||||||
|
|||||||
@@ -21,6 +21,10 @@
|
|||||||
// $Id$
|
// $Id$
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <simgear_config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_WINDOWS_H
|
#ifdef HAVE_WINDOWS_H
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -237,13 +241,6 @@ int trJpgFactory::render()
|
|||||||
glMatrixMode(GL_MODELVIEW);
|
glMatrixMode(GL_MODELVIEW);
|
||||||
glLoadIdentity();
|
glLoadIdentity();
|
||||||
|
|
||||||
// OSGFIXME
|
|
||||||
// sgFrustum *frustum = ssgGetFrustum();
|
|
||||||
trFrustum(tr,
|
|
||||||
frustum->getLeft(), frustum->getRight(),
|
|
||||||
frustum->getBot(), frustum->getTop(),
|
|
||||||
frustum->getNear(), frustum->getFar());
|
|
||||||
|
|
||||||
/* just to be safe... */
|
/* just to be safe... */
|
||||||
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
glPixelStorei(GL_PACK_ALIGNMENT, 1);
|
||||||
|
|
||||||
|
|||||||
@@ -27,6 +27,10 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_WINDOWS_H
|
||||||
|
# define XMD_H // to avoid INT32 redefinition
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <jpeglib.h>
|
#include <jpeglib.h>
|
||||||
@@ -72,6 +76,10 @@ class trJpgFactory {
|
|||||||
void destroy(int error = 0);
|
void destroy(int error = 0);
|
||||||
|
|
||||||
int render();
|
int render();
|
||||||
|
void setFrustum(GLdouble left, GLdouble right,
|
||||||
|
GLdouble bottom, GLdouble top,
|
||||||
|
GLdouble zNear, GLdouble zFar) { trFrustum(tr, left, right, bottom, top, zNear, zFar); }
|
||||||
|
|
||||||
unsigned char *data() { return IMAGE ; }
|
unsigned char *data() { return IMAGE ; }
|
||||||
|
|
||||||
struct jpeg_compress_struct *JPGinfo() { return &cinfo ; }
|
struct jpeg_compress_struct *JPGinfo() { return &cinfo ; }
|
||||||
|
|||||||
Reference in New Issue
Block a user