Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

MatthewPL

How to register gluTessCallback properly?

This topic is 5942 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all! I''m very new and I''m third day looking for code example with Tesselation in BCB4.0. I found few interesting examples but its give me compiler error. Even RedBook, or SuperBiblle code doesn''t work. I am given these errors: E2034 Cannot convert ''void (__stdcall *)(unsigned int)'' to ''void (__stdcall *)()''. E2343 Type mismatch in parameter ''fn'' in call to ''__stdcall gluTessCallback(GLUtesselator *,unsigned int,void (__stdcall *)())''. I know this is because I can''t properly call glBegin and glVertex in: gluTessCallback(tess, GLU_BEGIN, glBegin); gluTessCallback(tess, GLU_TESS_VERTEX, glVertex3dv); But this line is ok: gluTessCallback(tess, GLU_TESS_END, glEnd); Does anyone can send me a very little, but working, Borland C++ Builder 4.0 (or 5.0) project? Thanks for any help Matthew

Share this post


Link to post
Share on other sites
Advertisement
Try:

  

#include <GL/glu.h>

#define GLCALLBACK __stdcall

typedef void (GLCALLBACK *GluTessCallbackType)();


// PROTOTYPE

void GLCALLBACK BeginCB( GLenum type );

// CODE

gluTessCallback( tess, GLU_TESS_BEGIN, (GluTessCallbackType)BeginCB );

// FUNCTION

void
GLCALLBACK BeginCB( GLenum type ) {
}

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!