Quad-ren 0.2


'torpor' said:
I'm thinking about giving Quad-ren a bit of a try .. one thing I'd like to do is very fast texture animation to a simple billboard vertex .. is this something that Quad-ren can do already? I'm dl'ing the project now, haven't inspect it much, but if anyone knows what the likelihood is of getting good texture animation performance through the use of this library, I'd love to hear about it ..
Texture animation is based directilly on OpenGL textures which are generated when the sprite is converted, from this point the performance is completely dependent on the graphics card. Should be fast so long as you are not drawing a lot of large textures, or the equivalent in smaller images.

QUOTE

I don't know a lot about lower level programming, but would it be possible for you to implement this engine the way pygame does? So that people could use python to interface with Quad-ren? It seems like it may run faster than pygame which is SDL based. I'm sorry if this is a really stupid request since it's quite possible I don't know what I'm talking about.



Should be possible using this:
www.boost.org/doc/libs/1_38_0/libs/python/doc/index.html
 
Last edited by a moderator:
Example of the usage of the event system, any suggestions?

CODE

#include <quad-ren/quad-ren.h>

qr_renderer *renderer;

// Event receiver class
class new_event_receiver : public qr_event_receiver
{
bool on_event(qr_event event, qr_scene_node *node)
{
// Quit on escape
if(event.keysym == QRK_ESCAPE)
{
return false;
}

// Move scene node right 0.1 units when 0 is pressed
if(event.keysym == QRK_0)
{
vector2d_f pos = node -> get_location();
node -> set_location(vector2d_f(pos.X + 0.1, pos.Y));
}

return true;
}
};

// Main
int main()
{
// Setup
renderer = new qr_renderer(vector2d_i(16, 9),
10.0 ,false ,vector2d_i(0, 0));

qr_resource_manager *res_man = renderer ->
get_resource_manager();

// Receiver object
qr_event_receiver *receiver = new new_event_receiver();

// Create a scene node and attach the receiver object
qr_scene_node *quad = new qr_quad(res_man);
quad -> set_event_receiver(receiver);


Note, the event object does have a event type member to distinguish between key press and release events, but it wasn't necessary in this instance.
 
Last edited by a moderator:
QUOTE

Texture animation is based directilly on OpenGL textures which are generated when the sprite is converted, from this point the performance is completely dependent on the graphics card. Should be fast so long as you are not drawing a lot of large textures, or the equivalent in smaller images.



Okay, well .. I want to stream HD-quality textures from a frame-grabber. These are RAW files, 1920x1080 and I want to achieve 60fps. ;) So, I'm going to give it a try ..
 
Last edited by a moderator:
Has anyone built this with Windows yet? (I'm using VC++2008 Express)

I've finally got it all building, but it seems to crash inside qr_load_png() on line 102 [ png_read_info(png_read_str, png_info_str); ] somewhere inside libpng's code
 
Last edited by a moderator:
'benjymous' said:
Has anyone built this with Windows yet? (I'm using VC++2008 Express)

I've finally got it all building, but it seems to crash inside qr_load_png() on line 102 [ png_read_info(png_read_str, png_info_str); ] somewhere inside libpng's code
Try commenting out anything related to the sprite loaded from a PNG in the example prog to see if the QRDD loader works.
 
Last edited by a moderator:
'Hessiess' said:
Try commenting out anything related to the sprite loaded from a PNG in the example prog to see if the QRDD loader works.
After commenting out the references to the background (I'm trying to run the earth_moon example) , I got it running (after fixing a bug that cause VC9's stl implementation to assert), but all I get is a black window, with nothing else obviously wrong (unless my VC9 fix broke something instead!!)
 
Last edited by a moderator:
'torpor' said:
QUOTE

Texture animation is based directilly on OpenGL textures which are generated when the sprite is converted, from this point the performance is completely dependent on the graphics card. Should be fast so long as you are not drawing a lot of large textures, or the equivalent in smaller images.
Okay, well .. I want to stream HD-quality textures from a frame-grabber. These are RAW files, 1920x1080 and I want to achieve 60fps. ;) So, I'm going to give it a try ..


You know, some hardware can't handle textures that big unless you break it up?
 
Last edited by a moderator:
'benjymous' said:
'Hessiess' said:
Try commenting out anything related to the sprite loaded from a PNG in the example prog to see if the QRDD loader works.
After commenting out the references to the background (I'm trying to run the earth_moon example) , I got it running (after fixing a bug that cause VC9's stl implementation to assert), but all I get is a black window, with nothing else obviously wrong (unless my VC9 fix broke something instead!!)


Without knowing exactly what you changed, it is imposable to say if it would cause adverse effects. Though as you say you are only getting a black screen this suggests that eather the front and back buffers aren't being flipped, or OpenGL simply isn't drawing anything.

The following code *should* draw an empty red screen(the default background colour).

CODE

#include <quad-ren/quad-ren.h>

#include<SDL/SDL.h>

bool get_events();

qr_renderer *renderer;

int main()
{
renderer = new qr_renderer(vector2d_i(16, 9),
10.0 ,false ,vector2d_i(0, 0));

qr_resource_manager *res_man = renderer ->
get_resource_manager();

while(get_events())
{
renderer -> run();
}

renderer -> drop();
}

bool get_events()
{
SDL_Event event;

while (SDL_PollEvent(&event))
{
switch (event.type)
{
case SDL_QUIT:
return false;

case SDL_VIDEORESIZE:
renderer -> resize_window(vector2d_i
(event.resize.w, event.resize.h));
break;

case SDL_KEYDOWN:
{
QRK sym = (QRK)event.key.keysym.sym;

if(sym == QRK_ESCAPE)
{
return false;
}
}
}
}

return true;
}



Have you tried compiling with MinGW?
 
Last edited by a moderator:
'Hessiess' said:
Without knowing exactly what you changed, it is imposable to say if it would cause adverse effects. Though as you say you are only getting a black screen this suggests that eather the front and back buffers aren't being flipped, or OpenGL simply isn't drawing anything.
I was planning on giving you my changes (and the VS solution) once I'd got it working, but there's not much point until it does.

These are the changes I made (all very trivial, so they shouldn't make any difference)
  • replaced includes to gl.h with <SDL/SDL_opengl.h> at the top of qr_renderer.cpp and qr_sprite.cpp - this makes sure the windows headers get included in the right order, (without which you get a bazillion errors when it pulls in the gl header)
  • include <SDL/SDL_config.h> at the top of qrdd_file_handler.cpp - otherwise it doesn't know what the int32_t types are
  • add "return 0" at the end of qr_sprite::load_png_frame() and earth_moon's main() - it seems GCC doesn't care, but the VC compiler complains.
  • inside qr_renderer::draw()
    CODE


    // loop over all layers
    for(int layer = 0; layer < tot_layers; layer ++)
    {
    // RM: Indexing an empty vector is bad - causes VC9's STL to error;
    if( data.verts[layer].size() > 0 )
    {
    ... the rest is the same


'Hessiess' said:
The following code *should* draw an empty red screen(the default background colour).
I'll give that a try now and post back here.

I did at first think it might be my crap Dell PC just not supporting gl properly, but I followed a few SDl/gl tutorials and have now got my game (mostly) rendering using gl quads, so I guess it's not that (unless there's something more advanced going on in your engine - I just use bog standard glBegin(GL_QUADS) calls.

For the PNG stuff, I just use SDL_image to load it into an sdl surface, then convert that into a gl texture

'Hessiess' said:
Have you tried compiling with MinGW?
Not yet, just the VS compiler (which seems to work fine with all the SDL examples, and my own code)
 
Last edited by a moderator:
Just tried your example - QRK doesn't exist - is that something new for QR0.4? I just replaced that with SDLKey

Also had to change int main() to int main( int argc, char* args[] ) to make it link.

When I run it, I get an empty black window again

[edit] - Making progress now - if I comment out the call to resize_viewport(); inside qr_renderer::qr_renderer() I get stuff drawing (albiet at an odd stretched aspect ratio) so it looks like there's something going wrong there when it tries to letterbox the display.

Have you got a widescreen monitor by any chance? ;-)

[edit2] - No matter what values I push into glViewport(), I can't get it to draw anything - maybe it's just not supported by my crappy intel gpu :-\
 
Last edited by a moderator:
'benjymous' said:
Just tried your example - QRK doesn''t exist - is that something new for QR0.4? I just replaced that with SDLKey
Yep, this was added for 0.4 along with the event system, it just mappes directly onto SDLKey..

QUOTE

Also had to change int main() to int main( int argc, char* args[] ) to make it link.

When I run it, I get an empty black window again.

[edit] - Making progress now - if I comment out the call to resize_viewport(); inside qr_renderer::qr_renderer() I get stuff drawing (albiet at an odd stretched aspect ratio) so it looks like there's something going wrong there when it tries to letterbox the display.

Have you got a widescreen monitor by any chance? ;-)


Yes, on both my computers ;).

QUOTE

[edit2] - No matter what values I push into glViewport(), I can't get it to draw anything - maybe it's just not supported by my crappy intel gpu :-\


That is a possibility, problem is how to work around it.

[edit]
This seams to discribe a simmaler problem

www.opengl.org/discussion_boards/ubbthreads.php?ubb=showflat&Number=216243

Does manually resizing the window make it draw?
 
Last edited by a moderator:
Aha, fixed it. It was nothing to do with the gl calls at all - it seems the problem was the multiple calls to SDL_SetVideoMode() - if I comment this line out, it all works exactly as I'd expect (other than the PNG stuff still not working!)
 
Last edited by a moderator:
'benjymous' said:
Aha, fixed it. It was nothing to do with the gl calls at all - it seems the problem was the multiple calls to SDL_SetVideoMode() - if I comment this line out, it all works exactly as I'd expect (other than the PNG stuff still not working!)
Glad you got it working, did you just comment out SDL_SetVideoMode(), or did you make any other changes as well? If so i can get a patch so they can be applied to SVN.

Have you tried compiling LibPNG with MSVC? are you linking ZLIB?
 
Last edited by a moderator:
'Hessiess' said:
Glad you got it working, did you just comment out SDL_SetVideoMode(), or did you make any other changes as well? If so i can get a patch so they can be applied to SVN.
just commented out the call at the top of qr_renderer::resize_viewport()

(plus all the changes I mentioned in my earlier post)

'Hessiess' said:
Have you tried compiling LibPNG with MSVC?
Not yet, I've just been using their pre-built binaries - that's probably my next step to getting this all running!
 
Last edited by a moderator:
I can't properly load PNG images created with the gimp in qr 0.3
The included star background loads just fine, but a 256x256test png doesn't display properly.

It shows as if the png data was put in a too large pixel array :s verry weird

EDIT:
PNG's saved with GNU paint work perfect
 
Last edited by a moderator:
'Yannick' said:
I can't properly load PNG images created with the gimp in qr 0.3
The included star background loads just fine, but a 256x256test png doesn't display properly.

It shows as if the png data was put in a too large pixel array :s verry weird

EDIT:
PNG's saved with GNU paint work perfect
PNG images *MUST* have an alpha channel to work properly, gimp doesn't always create one. in GIMP layer->transparency->add alpha channel ;). Thanks for reminding me, need to fix that bug.
 
Last edited by a moderator:
The release of QR 0.4 is going to be moved forwards an extra week, updating the documentation is tacking ages and i have a lot of other stuff eating up my free time.
 
Screenshot of the 0.4 event system example prog.

event_system.png
 
Decided to work on making it compile using Microsoft's compilers...

Getting there!

Following my trials and tribulations, you too can compile using Microsoft Visual C++ 2008 Express... though it breaks in syntax, I've gotten it to get to the point of breaking in syntax and not in requirements.

I started with a freshly built release-lib zlib, which is a requirement for libpng (built as a .lib for static include)
Then I built a fresh copy of release-lib libpng (also built as a .lib for static include)
Next, acquired the SDL windows libraries and includes

Now, I copied the contents of the output folders for libpng and zlib to QuadRen\lib\libpng and QuadRen\lib\zlib respectively (yes, I made those folders)
Next, I took the contents of the SDL lib folder and put a copy at QuadRen\lib\SDL

My QuadRen base folder now has this added...
QuadRen\lib\libpng\<static libraries for libpng>
QuadRen\lib\zlib\<static libraries for zlib>
QuadRen\lib\SDL\<libraries for SDL>

Now, I took all the headers from the libpng and zlib source and put them in QuadRen\include (made that one too)
Then I copied the contents of the include folder from the SDL distribution to QuadRen\include\SDL

Now, my QuadRen base folder has this added...
QuadRen\include\<all .h from zlib, all .h from libpng>
QuadRen\include\SDL\<contents of SDL include folder>

Now, that this is all set up, time create the project!
I'm using Visual C++ 2008 Express

New project.. name it, yada yada.. make sure it starts out blank, and I put the solution and project files at QuadRen\build
Now, drag and drop all of the QuadRen header files into Header Files
Next, drag and drop all of the QuadRen source files into Source Files

Now, don't attempt to build yet! (You can, but you're going to get a few errors about missing requirements)

Select the project properties, and find
Configuration Properties\C/C++\General\Additional Include Directories
add your QuadRen\include directory to this... I suggest using the given folder search dialog

Next, also in project properties, find
Configuration Properties\Linker\General\Additional Library Directories
here, you want to add all 3 library directories (QuadRen\lib\libpng, QuadRen\lib\zlib, and QuadRen\lib\SDL) ... and again, use the given folder search dialog

Now, copy the contents of either line, switch from Debug to Release, and paste it, switch back to Debug, copy the other line, switch to Release, and paste it
This will make sure they are identical between build types

You CAN build libpng and zlib as debug quality instead of release, but since SDL doesn't come with a debug version, I didn't bother

Now, you've got your includes for the requirements, and the libraries to match..

If you try to build, you're going to get 300+ errors... there's a few lines of code to change since Microsoft's OpenGL implementation is different.

In qr_sprite.cpp, you're going to need to add an #include...
before #include<GL/gl.h>
add #include <SDL/SDL_OpenGL.h>

so it looks like this...
#include <vector>
#include <SDL/SDL_OpenGL.h>
#include <GL/gl.h>

You'll need to do it in qr_renderer.cpp too...
#include<SDL/SDL.h>
#include<SDL/SDL_OpenGL.h>
#include<GL/gl.h>

I THINK those were the only two, if you get 300+ errors from gl.h, then find the one missed, and make sure #include <SDL/SDL_OpenGL.h> is always just before #include <GL/gl.h>

Now, you can compile.

I need to work on some translation errors (qrdd_file_handler.cpp causes a nice mess) but at least its now attempting to compile using Microsoft's native compilers

Here's the current error output...
1>d:\!!!quadren\src\qrdd_file_handler.cpp(169) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(169) : error C2146: syntax error : missing ';' before identifier 'width'
1>d:\!!!quadren\src\qrdd_file_handler.cpp(169) : error C2065: 'width' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(170) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(170) : error C2146: syntax error : missing ';' before identifier 'height'
1>d:\!!!quadren\src\qrdd_file_handler.cpp(170) : error C2065: 'height' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(171) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(171) : error C2146: syntax error : missing ';' before identifier 'n_frames'
1>d:\!!!quadren\src\qrdd_file_handler.cpp(171) : error C2065: 'n_frames' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(174) : error C2065: 'width' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(174) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(174) : error C2070: 'unknown-type': illegal sizeof operand
1>d:\!!!quadren\src\qrdd_file_handler.cpp(177) : error C2065: 'height' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(177) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(177) : error C2070: 'unknown-type': illegal sizeof operand
1>d:\!!!quadren\src\qrdd_file_handler.cpp(180) : error C2065: 'n_frames' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(180) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(180) : error C2070: 'unknown-type': illegal sizeof operand
1>d:\!!!quadren\src\qrdd_file_handler.cpp(190) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(190) : error C2146: syntax error : missing ';' before identifier 'chunksize'
1>d:\!!!quadren\src\qrdd_file_handler.cpp(190) : error C2065: 'chunksize' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(191) : error C2065: 'chunksize' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(191) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(191) : error C2070: 'unknown-type': illegal sizeof operand
1>d:\!!!quadren\src\qrdd_file_handler.cpp(194) : error C2065: 'chunksize' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(279) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(279) : error C2146: syntax error : missing ';' before identifier 'width'
1>d:\!!!quadren\src\qrdd_file_handler.cpp(279) : error C2065: 'width' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(280) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(280) : error C2146: syntax error : missing ';' before identifier 'height'
1>d:\!!!quadren\src\qrdd_file_handler.cpp(280) : error C2065: 'height' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(281) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(281) : error C2146: syntax error : missing ';' before identifier 'n_frames'
1>d:\!!!quadren\src\qrdd_file_handler.cpp(281) : error C2065: 'n_frames' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(284) : error C2065: 'width' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(284) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(284) : error C2070: 'unknown-type': illegal sizeof operand
1>d:\!!!quadren\src\qrdd_file_handler.cpp(287) : error C2065: 'height' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(287) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(287) : error C2070: 'unknown-type': illegal sizeof operand
1>d:\!!!quadren\src\qrdd_file_handler.cpp(290) : error C2065: 'n_frames' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(290) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(290) : error C2070: 'unknown-type': illegal sizeof operand
1>d:\!!!quadren\src\qrdd_file_handler.cpp(292) : error C2065: 'width' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(293) : error C2065: 'height' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(294) : error C2065: 'n_frames' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(301) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(301) : error C2146: syntax error : missing ';' before identifier 'chunksize'
1>d:\!!!quadren\src\qrdd_file_handler.cpp(301) : error C2065: 'chunksize' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(302) : error C2065: 'chunksize' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(302) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(302) : error C2070: 'unknown-type': illegal sizeof operand
1>d:\!!!quadren\src\qrdd_file_handler.cpp(306) : error C2065: 'chunksize' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(307) : error C2065: 'chunksize' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(310) : error C2065: 'chunksize' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(310) : error C2065: 'int32_t' : undeclared identifier
1>d:\!!!quadren\src\qrdd_file_handler.cpp(310) : error C2070: 'unknown-type': illegal sizeof operand
1>d:\!!!quadren\src\qr_sprite.cpp(185) : error C4716: 'qr_sprite::load_png_frame' : must return a value


And the warning output...
1>d:\!!!quadren\src\qr_scene_node.h(216) : warning C4018: '>' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_resource_manager.h(46) : warning C4305: '=' : truncation from 'double' to 'float'
1>d:\!!!quadren\src\qr_renderer.cpp(125) : warning C4244: 'argument' : conversion from 'int' to 'GLfloat', possible loss of data
1>d:\!!!quadren\src\qr_renderer.cpp(136) : warning C4018: '<' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_renderer.cpp(145) : warning C4018: '<' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_renderer.cpp(287) : warning C4244: '=' : conversion from 'Uint32' to 'float', possible loss of data
1>d:\!!!quadren\src\qr_renderer.cpp(301) : warning C4018: '<' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_scene_node.h(216) : warning C4018: '>' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_resource_manager.h(46) : warning C4305: '=' : truncation from 'double' to 'float'
1>d:\!!!quadren\src\qr_sprite.cpp(47) : warning C4018: '>' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_sprite.cpp(103) : warning C4018: '<' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_sprite.cpp(111) : warning C4018: '<' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_sprite.cpp(194) : warning C4018: '<' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_sprite.cpp(210) : warning C4018: '<' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_sprite.cpp(223) : warning C4018: '<' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_sprite.cpp(230) : warning C4018: '<' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_scene_node.h(216) : warning C4018: '>' : signed/unsigned mismatch
1>d:\!!!quadren\src\qr_resource_manager.h(46) : warning C4305: '=' : truncation from 'double' to 'float'
1>d:\!!!quadren\src\qr_sprite.cpp(217) : warning C4715: 'qr_sprite::convert_data' : not all control paths return a value

EDIT:

Ok, did some digging about Visual Studio 2008...
http://msdn.microsoft.com/en-us/library/s3f49ktz(VS.80).aspx

in qrdd_file_handler.cpp

add a line...
------------------------------
using namespace std;

+typedef __int32 int32_t;

// file signature
------------------------------

Next, the remaining error...
open qr_sprite.cpp and add a line...
------------------------------
int qr_sprite::load_png_frame(const char *name, int frame)
{
// Load image
qr_raw_img *image = qr_load_png(name);

// Add image data to sequence
if(image != NULL)
frame_from_raw(image -> data, vector2d_i(image -> H,
image -> W), frame);

// free the image structure
delete image;
+ return 0;
}
------------------------------

These two changes get it to compile, but the linker fails... time to keep digging!

EDIT again:
Got most of it working....
open the project properties and navigate to
Configuration Properties\Linker\Input\Additional Dependancies
open it up and add
opengl32.lib
glu32.lib
SDL.lib
SDLmain.lib
libpng.lib
zlib.lib
to the top box

Now, add MSVCRT.lib to
Configuration Properties\Linker\Input\Ignore Specific Library

Now, one thing that still breaks...
since there's no...
int main(int argc, char* argv[])

it breaks since there's no main declared
 
Last edited by a moderator:
Back
Top