Jump to content

WesleyThomas

Members
  • Posts

    10
  • Joined

  • Last visited

Recent Profile Visitors

157 profile views

WesleyThomas's Achievements

Seeker

Seeker (1/7)

2

Reputation

  1. I started writing an OpenGL library and from it have built an entire 3D modelling program. I did upload my Library and some starter examples on my OpenGL thread. I haven't made much progress with it lately due to some time constraints but I'd encourage people to push on with it as it has some great potential. The Irrlicht engine is great but having an OpenGL Library so that autoit can call it directly offers so much more potential. When I get the time I will upload an updated Library and an example of the modelling program I wrote. It is designed to map in areas of a game and I have included A* Pathfinding so that a shortest path can be generated to get between any 2 points specified on the map you draw in 3 dimensions. It can save and load maps in a standard .Obj format too. If people are interested I will try to commit more time to the project again
  2. The idea of this project was to use Autoit to access OpenGL directly with no intermediate plugin. I have been away for a while but plan to carry on with this. If nothing else this is a great way to learn OpenGL and understand how the graphics pipeline works without having all the hard work done in a plugin. I have already made many improvements. This is my first experience with graphics and I am happy where it is heading with the little programming experience I have being a self taught hobbiest
  3. Thats great, just tested and it works. Thank you very much. You have saved me hours of trolling! It seemed the sort of problem that would have a straight forward setting option to resolve it but I guess I would have found it long ago if so. Thanks again for the help
  4. Thanks very much. Will try it tomorrow. I guess there is no default option I can set to turn it off so it would be eliminated on everyone's machine that run the program?
  5. Like the beep you get when a Messagebox appears
  6. Here is an example, run it and press w key to change colour of the square. You get a beep. If you run it after removing the Global $hButton = GUICtrlCreateButton("GO!", 610, 10, 50, 20) line, then there is no beep. #include <WindowsConstants.au3> #include <Misc.au3> Opt("GUIOnEventMode", 1) Global Const $hUSER32 = DllOpen("user32.dll") Global $hGUI = GUICreate("GL GUI", 800, 600, 0, 0, BitOr($Gui_SS_DEFAULT_GUI,$WS_CLIPCHILDREN)) Global $hButton = GUICtrlCreateButton("GO!", 610, 10, 50, 20) GUISetOnEvent(-3, "Terminate", $hGUI) ; on exit GUISetState(@SW_SHOW, $hGUI) Global $hGUIGraphics = GUICreate("", 600, 600, 0, 0, $WS_CHILD, 0, $hGUI) Global $Label = GUICtrlCreateLabel(" Press W Key", 10, 10, 100, 100) GUICtrlSetBkColor($Label, 0x808080) GUISetState() GUISetState(@SW_SHOW, $hGUIGraphics) While 1 Sleep(100) If _IsPressed(57, $hUSER32) Then;if w is pressed Local $String = "0x"&Hex(Random(0,255, 1),2)&Hex(Random(0,255, 1),2)&Hex(Random(0,255, 1),2) GUICtrlSetBkColor($Label, $String) GUISetState() EndIf WEnd Func Terminate() DllClose($hUSER32) Exit EndFunc
  7. Hopefully just a quicky guys. I have been writing a graphical program and have embedded a child GUI into my main gui and I am using the standard wasd key setup to do some animation in my child window. All is going fine but now I have decided to add some buttons to the main GUI for other controls and all of a sudden I am getting a beep when I press my keys to animate my graphics. If I press and hold w to move forward I get a succession of beeps. The graphical side is still working fine, just can't get rid of these annoying beeps. Probably something simple, I just have to ask as I have spent over 3 hours trying different things. It even does it if I add a label to the main GUI. If I have a clear GUI, with no controls added then I do not get any beeps and all works fine. Just happens when I have a control. Any ideas? Can add a sample code if required, just think someone will know what i'm talking about straight away as it seems so simple. Regards, Wez
  8. Been hard at work and got a few more functions and features down. Added smoothed points so they appear as circles, put a line stipple on which gives a dashed appearence to lines, but the main feature I have got working is the VertexArrays features which enable editing of Vertices on the fly. This can also be used for colour, surface normals, texture coordinates, and such, but at the moment only I have only put an example of Vertex Coordinate editing. Just to warn I have not been adding error checking. I have been writing a basic model editing program for quite a while and have been avoiding tackling OpenGL. Unfortunatley you are limited with GDI+ as it is so slow., just a few hundred vertices and you are looking at seconds per frame, not frames per second. When I was adding and debugging the VertexArray functions I tested a structure of 1 million float variables which would allocate 333,333 vertices and frames per second are still great. I will update the GLFunctions/Constants files above and add the new examples. I have started to add a few more lines in to explain but I'm mainly researching and testing things out when I get the time, which is limited with a baby in the house. My next area of investigation is going to be tackling how to selected a vertex, or picking as it's known. Im not sure how or if it can be done while using VertexArray but I'm guessing it can. 1M verts test.au3 Vertex Array Animation.au3 Not sure how to edit my first post so I will add the functions and constants below... ;DataType enum: Global Const $GL_BYTE = 0x1400 Global Const $GL_UNSIGNED_BYTE = 0x1401 Global Const $GL_SHORT = 0x1402 Global Const $GL_UNSIGNED_SHORT = 0x1403 Global Const $GL_INT = 0x1404 Global Const $GL_UNSIGNED_INT = 0x1405 Global Const $GL_FLOAT = 0x1406 Global Const $GL_2_BYTES = 0x1407 Global Const $GL_3_BYTES = 0x1408 Global Const $GL_4_BYTES = 0x1409 Global Const $GL_DOUBLE = 0x140A Global Const $GL_DOUBLE_EXT = 0x140A Func GLDisableClientState($iCap) DllCall($hOPENGL32, "none", "glDisableClientState", "uint", $iCap) EndFunc ;==>GLDisableClientState Func GLEnableClientState($iCap) DllCall($hOPENGL32, "none", "glEnableClientState", "uint", $iCap) EndFunc Func GLDrawArrays($iMode, $iFirst, $iCount) DllCall($hOPENGL32, "none", "glDrawArrays", "uint", $iMode, "uint", $iFirst, "uint", $iCount) EndFunc ;==>GLDrawArrays Func GLVertexPointer($iSize, $iType, $iStride, $aPtr) DllCall($hOPENGL32, "none", "glVertexPointer", "uint", $iSize, "uint", $iType, "int", $iStride, "ptr", $aPtr) EndFunc Func GLLineStipple($iFactor, $iPattern) DllCall($hOPENGL32, "none", "glLineStipple", "int", $iFactor, "ushort", $iPattern) EndFunc ;==>GLLineStipple Func GLLineWidth($fWidth) DllCall($hOPENGL32, "none", "glLineWidth", "float", $fWidth) EndFunc ;==>GLLineWidth Func GLPolygonStipple($iMask) DllCall($hOPENGL32, "none", "glPolygonStipple", "ubyte*", $iMask) EndFunc ;==>GLPolygonStipple
  9. Since struggling with writing some OpenGL stuff in autoit due to the fact of me being newish to the whole programming game and the fact that I really don't have a clue on how to write or use plugins, I thought I would share some of my code I have made that demonstrates using OpenGL with purely autoit and dll calls directly with opengl32 and glu32. I have made a start writing a GLConstants.au3 and GLFunctions.au3 files that I think should be a standard library by now in the Autoit Include folder. Any feedback would be nice Right clicking on the GUI moves the Camera around (while holding), w and s moves forward/backward and a and d spins left and right. Enjoy GLConstants.au3 GLFunctions.au3 3D Viewport.au3
  10. Hey. I have built some model editing graphical program's with GDI+ and since finding this wrapper have been considering converting to using Irrlicht. I have played with A. Percy's stuff and in particular the function for embedding the graphics window into an autoit GUI is very appealing. Is there a way to do it with Irrlicht2? I'm guessing it will need adding to the driver if not and this is beyond my capabilities. I really like the autoit GUI layout and would prefer to convert my program to look similar. Any feedback would be appreciated. I have accomplished it with child and parent GUIs but would prefer to use just 1
×
×
  • Create New...