Content moved to Examples archives content (http://www.masmforum.com/simple/index.php?topic=2522.0)
Demos look great hitch. :U
Awesome! :bg
I just updated it with the 2d bitmap stuff.
I'll cover the basic stuff first then move to more advanced topics later.
Added multi-texturing example.
Added Lists_And_Glu_Primitives & Sphere_Mapping.
The archives are now hosted on my site instead, due to their increasing size.
Fixed one or two little things & added Environment_Mapping_Texture.
The 2 archives have been updated so you'll need to download both.
Added Text_Bitmap_2D.
(Both archives updated).
:U I will wait until everything is done. Is everything have done?
I planned approx 30 more examples about various topics, in the end there'll be enough material to create complete 2d or 3d games.
Cool!
Added:
- Flat_Rendering.
- Hidden_Lines.
- Direct_Input.
Also i improved the framework so now it uses Direct Input, i also added a function to turn vsync on/off.
(Both archives updated again).
Added Scissor.
I changed the layout of the archives.
(both updated).
Added Render_To_Texture.
Fixed a bug in wglati.inc.
- Added Vertex_Array_And_WaveFront_Obj.
Updated both archives.
As fast as you're working Hitchhikr, we almost need an RSS feed! :bg
Added Skybox_And_Camera.
(Only Examples.zip updated).
I improved/cleaned up some examples.zip archive files.
Oooh! What about support for GMAX/3dsmax and Rhino3d mesh data? :toothy
Was a sample Lightwave .obj file supposed to be included in the latest release?
Cool stuff Hitchhikr !!!
I'll study OpenGL now. ( still coding in DirectX9 )
Thanks for all the nice examples. :U
I'm attempting to make some custom mouse pointer code for the OGL window, based on the DirectInput example. I tested the original example with MemProof and it reports that CreateBrushIndirect and CreateFont are not being freed. I am unsure how important this is, but adding the following to Fonts.asm seems to fix the font handle:
Create_Font_Bitmap proc Font_Name:dword, Font_Size:dword, Font_Weight:dword
local _Font_List:dword, hFont:dword
; Create the fonts
invoke glGenLists,256
mov _Font_List,eax
.if eax != 0
mov eax, Font_Size
neg eax
invoke CreateFont, eax, 0, 0, 0, Font_Weight, 0 , 0 , 0, ANSI_CHARSET, OUT_OUTLINE_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, FF_DONTCARE, Font_Name
mov hFont,eax
.if eax == 0
invoke Destroy_Font, _Font_List
xor eax,eax
ret
.endif
invoke SelectObject, g_window.hDC, eax
invoke wglUseFontBitmaps, g_window.hDC, 0, 255, _Font_List
mov eax,_Font_List
.endif
invoke DeleteObject,hFont
ret
Create_Font_Bitmap endp
And the Framework.asm - CreateBrushIndirect:
Main proc
...
local hBrush:dword
...
invoke CreateBrushIndirect, addr _SubEditBrush
mov hBrush,eax
mov [ebx + WNDCLASSEX.hbrBackground],eax
...
invoke Deinitialize
invoke ChangeDisplaySettings, NULL, 0
.if g_window.hWnd != 0
.if g_window.hDC != 0
invoke wglMakeCurrent, g_window.hDC, 0
.if g_window.hRC != 0
invoke wglDeleteContext, g_window.hRC
.endif
invoke ReleaseDC, g_window.hWnd, g_window.hDC
.endif
invoke DeleteObject,hBrush
invoke DestroyWindow, g_window.hWnd
.endif
invoke ShowCursor, TRUE
invoke UnregisterClass, addr g_ClassName, g_window.init.application.hInstance
invoke Flush_Event
FallBack:
.if g_Error_Message != NULL
invoke MessageBox, HWND_DESKTOP, g_Error_Message, addr g_WindowName, MB_ICONERROR or MB_OK
.endif
ret
Main endp
I fixed this already and a couple of other ones.
I'm working on an example right now so except an update soon with these two ones corrected.
- Fixed a bug in the coordinates of the 2d bitmap fonts.
- Fixed a bug in DInput_Clamp_Mouse.
- Fixed some memory leaks.
- Added Sprites_Collisions.
Both archives updated.
- Fixed an issue with 32 bits pictures in Targa.asm.
- Renamed Display_2D_Bitmap into Display_TARGA.
- Added Display_BMP.
(Both archives updated).
Hi Hitchikr. :) Couple issues, XP SP2
* display_bitmap.exe - black window, closes with asterisk sound
* sprites_collisions.exe - ditto
* vertex_array_and_wavefront_obj.exe - page fault at 00404386h
This is with EVE (http://www.eve-online.com/) running, this shouldn't be a problem but who knows. :) I'll try without eve running later.
I updated Vertex_Array_And_WaveFront_Obj in the examples.zip.
Make sure that the archives layout is as follow:
OglArchive
|
+- Examples
|
+- Media
The Media directory is located outside the examples one.
Also make sure you have the latest versions of both archives.
I don't know why it produces beeps, maybe there's a problem with an alert messagebox which is not displayed or something.
I'm using XP sp1.
Display_BMP works fine on my computer "XP sp2"
Sprites_Collisions didn't work
Couldn't find sprite1.tga and sprite2.tga
I did make some sprites on my own but they couldn't be loaded into the program.
Vertex_Array_And_WaveFront_Obj
Can you insert the fish2.obj and the sprites in the next upload ??
All other examples are running O.K.
These files are actually in the media.zip archive, there's 15 files in it, always make sure you have the latest one.
Beware of the browser's cache.
Thank you Hitchhikr.
O.K. I did download the "media.zip" archive directly from your page
with all the files in it. :P
The "Example archives content and urls" only have these two links:
http://perso.wanadoo.fr/franck.charlet/Common.zip
http://perso.wanadoo.fr/franck.charlet/Examples.zip
missing the media.zip
Now all examples work fine except "Vertex_Array_And_WaveFront_Obj.exe"
It assembles and links OK but when I run the file it crashes.... :'(
My bad, i forgot to modify the link :green
The only required ones are Examples.zip & Media.zip
Where'n'when does it crash ?
directly at the beginning when the file runs, it opens the window and then it crashes
Quote
directly at the beginning when the file runs, it opens the window and then it crashes
Yeah but what's the message & especially, what the crash's address ?
You can use debug.bat to generate debugging infos for the exe & check in a debugger.
(sorry i clicked on "modify" instead of "reply" on your message :D)
I never used a debugger before but I have put this debug file on my page.
Maybe you can have a look at it.
http://members.home.nl/siekmanski/Vertex_Array_And_WaveFront_Obj.pdb
I've installed all your OpenGL examples on my desktop computer and Yes, Vertex_Array_And_WaveFront_Obj.exe
works fine on that one ( nice looking purple fish.. ). :dance:
So the problem seems to be on my Laptop. ( strange though, all the other files execute perfecly )
That's puzzling.
I'd like to know precisely the message that is displayed when that example crashes (if there's one).
Also knowing what kind of gfxcard that laptop have.
I've made some jpeg's of the error messages
http://members.home.nl/siekmanski/crashpics.zip
In my Laptop I have an NVidia GeforceFX Go 5200 gfx card.
Now i'd like to have the technical infos (the first "click here" on the image2.jpg
(as a text if possible).
Thanks.
It's not possible to copy the report to a text file
I've added the xml file and the other pic
http://members.home.nl/siekmanski/errors.zip
Well, forget it.
yeah we will let it go, if I can solve this strange thing I'll let you know.
Thanks for trying to solve this.
Now it's time to study all your examples and have FUN. :P
All are working now with the newest media.zip and no EVE running. :)
Quote from: hitchhikr on August 22, 2005, 07:17:44 PM
My bad, i forgot to modify the link :green
The only required ones are Examples.zip & Media.zip
Where'n'when does it crash ?
It crash after the black screen appears. It should work but fish2.obj is missing.
Hello Farabi
All the media-files including the fish2.obj you can download here..
http://perso.wanadoo.fr/franck.charlet/Media.zip
Sorry to trouble you, but are all of your OpenGl sample files posted anywhere else other than the
persno.wanadoo.fr..... site as I can't seem to access the site. Could be something to do with comoany firewall and anti malware code.
So I will try from a cyber cafe at a later stage.
Thanks
Quote
Sorry to trouble you, but are all of your OpenGl sample files posted anywhere else other than the
persno.wanadoo.fr..... site as I can't seem to access the site. Could be something to do with comoany firewall and anti malware code.
So I will try from a cyber cafe at a later stage.
No they aren't and i can do nothing about this.
- Added Sprites_Animations (use arrows to control sprite1).
- Changed all pictures to bmp format.
(Both archives updated).
Tathams, you can try downloading today's build from: http://heliosstudios.net/temp/Franck's_GL_Files_2005-08-23.zip (2.79MB)
This is only temporary and will not be updated (unless some autonomous method can be implemented, since Franck codes new versions so darn fast.) :bg
Thanks you very much 'Mark Jones' :thumbu I was able to access your URL with out any problems. Will still try the cyber cafe route when I can pry myself away from my desk. I have been looking for simplified openGL code, without tons of bloatware. I am trying to visually show prolog solving a constraint problem with all of its rollback and redo activity.
Again thanks for your upload
Updated the framework with anti-aliasing capability.
Due to this the startup messagebox have been replaced with a dialogbox allowing the user to select various options.
(Only Examples.zip updated).
Quote(unless some autonomous method can be implemented, since Franck codes new versions so darn fast.)
I only have a suguestion :), why not use a version system???
Why not do some CVS or SVN? in that way, they can have a folder for his things... and link them here... also that will serve for have a track of the person in the things that they do...
Tought I dont unse them widely, I guess can be a good option, perhaps or will be overhead to use another tool :).
Here you can find some about CVS and SVN... http://www.tortoisecvs.org/otherstuff.shtml, they only need open the client and see if something new there is... also that will preserve, for example what things you have added for the anti alias thing... ;).
Tought exactly I dont know how to use at the server side, the more that I have done with CVS is do a local repository and work there.... and yes you can go back and to the actual version ;)... also the complete repository can be distributed for off-line access ;) (If Im not wrong).
- Added Display_JPG (after Siekmanski's Display_PICTURE).
(Both archives updated).
Quote
I only have a suguestion :), why not use a version system???
Why not do some CVS or SVN? in that way, they can have a folder for his things... and link them here... also that will serve for have a track of the person in the things that they do...
Tought I dont unse them widely, I guess can be a good option, perhaps or will be overhead to use another tool :).
Here you can find some about CVS and SVN... http://www.tortoisecvs.org/otherstuff.shtml, they only need open the client and see if something new there is... also that will preserve, for example what things you have added for the anti alias thing... ;).
Tought exactly I dont know how to use at the server side, the more that I have done with CVS is do a local repository and work there.... and yes you can go back and to the actual version ;)... also the complete repository can be distributed for off-line access ;) (If Im not wrong).
Apart from the Display_JPG example i just included,
there's only one person behind this & it's me. It shall remain that way.
Furthermore i'll had to ask for some space on some opensource website to obtain a cvs server or something because i don't have the ability to run such
gadget tool.
- Added Custom_Sound_Mixer & Play_Sounds.
- Expanded DInput.asm with DInput_Get_Key_NoRepeat.
(Both archives updated).
- Added Texture_Matrix
- Added Bump_Mapping.
(Only examples.zip updated).
- Modified Bump_Mapping so it works with the lousy cards with only 2 textures units (like the gf4mx).
- Modified Bump_Bitmap so it loads the object from disk (a simple txt format) & it creates the tangent & binormals automagically.
- Fixed Siekmanski's picture.asm.
(Both archives updated).
Is Mario supposed to be moving in the Sprites_Animation demo?
Yes, with the help of the arrows keys.
Hitchickr:
Hai. Nice .obj loader. But I dont know how to use it. Maybe you can made it as a single procedure?
- Added Horizontal_ScrollText (i don't know if this one will be smooth on other machines, so some feedback would be required).
(both archives updated).
Quote
Hai. Nice .obj loader. But I dont know how to use it. Maybe you can made it as a single procedure?
There's an example about how to use it.
Quote from: Mark Jones on August 23, 2005, 06:04:33 PM
... from: http://heliosstudios.net/temp/Franck's_GL_Files_2005-08-23.zip (2.79MB)
I don't know what is wrong but all examples on my [WinXP]+[Athlon XP 1800]+[512Mb RAM]+[ATI 9550 128Mb] use ~90% of CPU...even "Base.exe".
That's normal.
Trippy scrolltext. :) Nice and smooth. Uses about 5% cpu of AMD XP 2500+ / nVidia GeForce FX5600 ultra 256MB
Quote from: hitchhikr on August 29, 2005, 03:51:15 PM
That's normal.
That's damn abnormal !
Maybe this happens because of the way you update scene (to frequently). I use SetTimer and this seems to work without eating all resource.
Note that when minimized the window won't take such amount of cpu time.
Standard timers are unnacceptable due to their granularity and multimedia ones are a pain in the ass.
If that really bother you you can still put a sleep(10) inside the main loop but that will slaughter the animation each time the os have to process a message (like moving the mouse for example) so this is not acceptable either.
In reality, games are always trying to obtain as much cpu as possible.
So i repeat: that's normal.
if you want to know more about that read this:
http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/dnargame/html/msdn_dos2win.asp
I' new in this, i need easy examples to understand how this program work. can you send me examples with the simple operations (add, substract, multiplication and division +,-,*,/).
if you have with 1 digit o 2 digits better.
Thanxxx ! :U
You better ask questions about the assembly language itself here:
http://www.masmforum.com/simple/index.php?board=1.0
and you can browse this aswell:
http://www.faqs.org/faqs/assembly-language/
Horizontal_ScrollText runs smooth on my pc "PIV 2.6 and NVIDIA GeForceFX Go 5200 videocard" uses 5 % of the cpu
Quote from: chola on August 29, 2005, 09:21:40 PM
I' new in this, i need easy examples to understand how this program work. can you send me examples with the simple operations (add, substract, multiplication and division +,-,*,/).
if you have with 1 digit o 2 digits better.
Thanxxx ! :U
Simple operation like that cannot be used if you want to use only integer. You must use FPU. I can made you a simple example to add it.
- Updated examples.zip, so examples should assemble with older version of windows.inc.
- Added Calc_FPS function in FrameWork.asm to use during Update:
invoke Calc_FPS, FrameRate
It'll return the number of frames per second in eax.
Hello Hitch!
It is astonishing what you acomplished there!!!
I have a AMD 2500+ @2GHz with a NVIDIA 6600GT, my question is: is it normal that your intros/demos I found on your website run not so smoothly,seems to have a slightly less FPS than in windowed mode. "Is this normal?" :)
Greets, Gábor
Maybe, i don't know, i'm not sure to understand what you mean.
I meant in full screen mode it does not run so smoothly as in windowed mode. The difference is very small, but noticable... The same "effect" I found in Winamp's visualization FXs.
Maybe something with my configuration is not perfect...
I think this phenomenon can be simply ignored. :)
Greets, Gábor
gabor,
It probably has something to do with the fill rate from the video card and the monitor refresh rate. Full screen mode requires more pixels to be filled in one frame.
A geforce 6600 is largely enough to run everything as smooth as possible.
If there's a jerky animation in fullscreen (or window mode) then you definitely have a problem with your computer,
i don't remember if the user can set the speed of the AGP speed/transfers with NVIDIA drivers (it's possible with ATI's) but i know that i always have to install a patch for the motherboard each time i upgrade the drivers in order to enable the agp accelerations and fast writes again.
It's also possible that you're running some sort of tools in the background that takes too much cpu cycles/memory which can slowdown the animation from time to time.
Make sure your drivers are up-to-date.
Nice link bookmark. I hope there are many something like that. Do you know freeCnC hitchikr?
nVidia SDK need MSVC++ so I dont think it is important except nVidia decide to support MASM32 by creating the include file.
I didn't know freecnc (and i'm not really interested by it).
Nvidia isn't providing anything that can't be obtained elsewhere.
http://perso.wanadoo.fr/franck.charlet/Media.zip
http://perso.wanadoo.fr/franck.charlet/Examples.zip
plz hitchhikr, I cant download it ::). Can U upload it to rapidshare or megaupload ... ect.
Plz, I very like it.
just thnks 2 u.
maybe more luck here :
http://ghirai.com/hutch/mmi.html
Why can't you download these files anyway ?
wow, so beauty ...
thnks a lotz.
I will resume the series very soon.
Excellent! :U
- Added Display_DDS: display compressed dds textures.
- Modified the way to calculate 2d matrices coordinates.
- Made various tweaks in framework.asm.
Both archives modified.
All the examples are working with wine under linux (not in fullscreen as there's severe problems with that in wine anyway).
- Added gluLookAt_Camera: "Elite" (spaceship game) like camera handling.
- Macros.asm created (exported from framework.asm).
Both archives updated.
- Created the necessary routines to handle shaders.
- Added Pixel_Shader_Simple: An example about how to use pixel shaders to modify textures dynamically.
- Fixed some stack issues in Direct_Input example.
Both archives updated.
- Fixed Hidden_Lines example slowdown under nvidia cards.
- Fixed shaders errors handling.
- Upgraded opengl includes.
Both archives updated.
good work :U
- Added support for GLSL.
- Added support for rectangular pictures loading.
- Added GLSL_Shaders_Toon example.
- Fixed some bugs in glm.lib.
- Merged both archives.
- Added Vertex_Shader_Simple.
- Modified the batch files and integrated savage's floating point variables redundance checking, so produced executables are now smaller
(and have a slightly better compression ratio).
Superb stuff, thank you!! :U