Public feed #380133

Something

public text v1 · immutable
Raw Edit
·published 2007-03-03 20:24 UTC
rendered paste body
//gcc -Wall -I/usr/include -o phimage phimage.c -L/usr/X11R6/lib -lX11 -lXi -lXmu -lglut -lGL -lGLU -lm 
//gcc -Wall -I/usr/include -o phimage phimage.cpp `pkg-config --cflags gtk+-2.0` `pkg-config --libs gtk+-2.0` -L/usr/X11R6/lib -lX11 -lglut -lGL -lGLU -lm

#include <GL/glut.h>    // Header File For The GLUT Library 
#include <GL/gl.h>	// Header File For The OpenGL32 Library
#include <GL/glu.h>	// Header File For The GLu32 Library
#include <gtk/gtk.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <unistd.h>     // needed to sleep
#include <stdio.h>
#include <iostream>
#include <fstream>

using namespace std;

class TextureLoader
{
	int x;
	public:
	int Add()
	{
	return x;
	}
};

int main() {
TextureLoader test;
//GtkWidget *testw;
const guchar *data;
const guchar *buffer;
buffer = new guchar [16000];
ifstream file ("/home/pete/NeHe.bmp", ios::in | ios::binary);
file.seekg(5);
file.read (buffer, 16000);
size_t len;
GdkPixbufLoader *test2;
test2 = gdk_pixbuf_loader_new();
gdk_pixbuf_loader_write(test2, data, len, NULL);

test.Add();
}