flat assembler
Message board for the users of flat assembler.
![]() Goto page Previous 1, 2, 3, 4 |
Author |
|
Netherus 31 May 2012, 21:26
This is really nice! I am really interested in learning this. I have some OpenGL GLUT tutorials on the Pelles C site www.smorgasbordet.com. I am under Source Code -> Windows Samples -> OpenGL Graphics -> Christopher Hill Tutorials. I have no clue about assembly. Trying to figure out where to start. I think I am in the right place though.
|
|||
![]() |
|
bzdashek 01 Jun 2012, 09:42
I'd suggest to start with opengl example in fasm distribution, it outputs simple graphics. (FASM\EXAMPLES\OPENGL)
|
|||
![]() |
|
Fred 17 Oct 2012, 21:21
I'm currently writing a nes emulator in fasm and i'm not certain how to integrate what i have with windows code... hehe. I guess i'll look through this cool example and probably ask questions about it later.
![]() For now though, I'll just share one way of using openGL functions that aren't part of the opengl32.inc thing. Code: glGenBuffers dq ? invoke wglGetProcAddress,"glGenBuffers" mov [glGenBuffers],rax Replace dq and rax with dd and eax if you're doing 32 bit stuff. If it fails it should return null, so you could probably check for that if you want. Constants like GL_ARRAY_BUFFER can be found here for example. |
|||
![]() |
|
Fred 19 Oct 2012, 23:10
So... hm. For now, I just want a smaller window, but I think i can do that. But basically I set up openGL stuff somewhere near the start of the code, and then run my code after that (near the .fontloop)... not sure what the .waitmessage is, maybe the "don't hog cpu" thing mentioned? Then I call .update when i want to draw something.
Is that the layman explanation somewhat correct? ![]() Edit: looks like the peekmessage was all i needed. After that, I placed the emulation code below that loop, some malloc and openGL stuff in .wmcreate and then invalidateRect and swapBuffers and such in .wmpaint. |
|||
![]() |
|
Goto page Previous 1, 2, 3, 4 < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.