Talk About Network

Google





Graphics > OpenGL 3D API > Re: About glutI...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 12 Topic 4791 of 5061
Post > Topic >>

Re: About glutInit

by Wolfgang Draxinger <wdraxinger@[EMAIL PROTECTED] > Jun 13, 2008 at 09:52 AM

pera wrote:

> first: thanks for your time =)
> I'm doing this because I need space (I'm making a 4kb intro/
> demoscene).

Then GLUT is the very wrong path. To save last bit of space I'd
even recommend not to link the opengl32.dll (assuming you want
to run it under Windows) directly, but instead use LoadLibarary
and GetProcAddress with the _ordinal numbers_. See
<http://msdn.microsoft.com/en-us/library/ms683212(VS.85).aspx>
this will save the space, that would be used for the procedur
names otherwise.

> int main(void){
> int argc=1;
> char **argv; 

argv will point anywhere, and if using main() it will probably
pointing into initialized memory. Use

char *argv[] = {
"mydemo",
NULL
};

instead.

> This works great, but if I set my own entry point "void
> _start(void)" instead of main I get the segmentation fault :/
> 
> why?

Your argv points anywhere.

Wolfgang Draxinger
-- 
E-Mail address works, Jabber: hexarith@[EMAIL PROTECTED]
 ICQ: 134682867
 




 12 Posts in Topic:
About glutInit
pera <gomesbascoy@[EMA  2008-06-11 21:29:10 
Re: About glutInit
Wolfgang Draxinger <wd  2008-06-12 10:04:06 
Re: About glutInit
pera <gomesbascoy@[EMA  2008-06-12 14:42:08 
Re: About glutInit
"jbwest" <jb  2008-06-12 05:02:23 
Re: About glutInit
Wolfgang Draxinger <wd  2008-06-13 09:52:41 
Re: About glutInit
pan <spank@[EMAIL PROT  2008-06-15 11:18:46 
Re: About glutInit
fungus <openglMYSOCKS@  2008-06-13 00:06:25 
Re: About glutInit
pera <gomesbascoy@[EMA  2008-06-13 09:44:55 
Re: About glutInit
Wolfgang Draxinger <wd  2008-06-13 21:06:10 
Re: About glutInit
fungus <openglMYSOCKS@  2008-06-13 14:15:43 
Re: About glutInit
pera <gomesbascoy@[EMA  2008-06-13 19:39:10 
Re: About glutInit
fungus <openglMYSOCKS@  2008-06-14 05:17:38 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
localhost-V2008-12-19 Fri Jan 9 16:04:07 PST 2009.