Hi all, I was reading through the openGL redbook, and I just started to do the examples that were there, so, I went through glClearColor and tried it like so:
invoke glClearColor,0,0,0,0
invoke glClear,GL_COLOR_BUFFER_BIT

Like in the example but that wouldn't compile, so I tried glClearColor,0,0,0,0 and it compiled, but it didn't change the background of the screen to black like it was supposed to.
Am I approaching this all wrong, or is this just a tiny error?  :shock:
Posted on 2008-01-10 20:41:21 by HKothari
It should work (assuming that the graphics context has been acquired properly).
Posted on 2008-01-11 02:23:07 by ti_mo_n
That's eactly what I did, and although it compiled, it didn't change the screen to black.  But what is the graphics context?
Posted on 2008-01-11 05:38:06 by HKothari
Actually, may I ask where it should be put, because I think that is where the problem is, where in my code do I put the commands?
Posted on 2008-01-11 16:13:53 by HKothari
You may find help from the NeHe tutorials. Granted, you'll have to map the C example code to ASM, but the majority of it is dealing with the OpenGL function calls ;)
Posted on 2008-01-11 18:08:25 by SpooK
Umm, I'm really sorry, but is there a single simple example, in asm, because I am going through the OpenGL redbook, but all the examples are in C also, and I'm not so good with converting from the two.

Sorry, I'm not trying to be mean or anything.  :oops:
Posted on 2008-01-11 18:28:45 by HKothari

Umm, I'm really sorry, but is there a single simple example, in asm, because I am going through the OpenGL redbook, but all the examples are in C also, and I'm not so good with converting from the two.

Sorry, I'm not trying to be mean or anything.  :oops:


You'll probably need to refine your C skills then, we live in their world and the majority of examples are in a high-level language such as C.

At any rate, don't worry so much about the C as the OpenGL function calls and how they are used... or more importantly, what order they are used in ;)

Other than all of that, try utilizing this forum's Search Function or Googling for opengl+asm or and see what comes up ;)
Posted on 2008-01-11 20:18:15 by SpooK