Jump to content
  • Advertisement

Evil Steve

GDNet Emeritus
  • Content Count

    15897
  • Joined

  • Last visited

Community Reputation

2019 Excellent

1 Follower

About Evil Steve

  • Rank
    Moderator Emeritus

Personal Information

  • Interests
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Evil Steve

    OpenSSL tutorials?

    That requires more effort than just pasting a Dropbox link though ;)
  2. Evil Steve

    OpenSSL tutorials?

    So I set up libCurl, and wow - it's awesome. I don't know why I've not been using it already. I don't mind not being able to use my existing socket code; libcurl is amazingly simple to use and a lot more configurable than I thought it was.   Security isn't really a concern for me, since I'm only using it as an HTTP[S] client, and I'm not sending or receiving particularly sensitive data. I know ot should be a concern, but... meh   EDIT: Share and enjoy: https://www.dropbox.com/s/n2ccfcl2i307w7c/PWebRequest.h?dl=0 https://www.dropbox.com/s/rgekny0gmsb7644/PWebRequest.cpp?dl=0 https://www.dropbox.com/s/r7gv0dd47ww4h6n/PWebRequestFactory.h?dl=0 https://www.dropbox.com/s/obweuojfrxxxggc/PWebRequestFactory.cpp?dl=0   Cheers, Steve
  3. Evil Steve

    OpenSSL tutorials?

    Interesting, I didn't know WinHTTP existed. I've been looking into libcurl, and it seems to do exactly what I need with the minimum of fuss. I've got no compunction in stripping out my existing HTTP code, since it's far from perfect, and was just quickly knocked together - I recently added chunked request support to it, since that wasn't supported before, and Facebook sends some responses back as chunked - so there's no doubt loads of other things it doesn't support that will break in the future. Cheers, Steve
  4. Evil Steve

    OpenSSL tutorials?

    Thanks for the replies; libCurl is probably a good option now I think about it. I had a quick look on google, but most of the tutorials I've found are very high level introductions.   I somehow missed the wiki completely too - I'll have a look through that also.   Cheers, Steve
  5. Evil Steve

    OpenSSL tutorials?

    Hi, I'm trying to add SSL support to my server app, written in C++ and running on Windows. The primary use for SSL is for making HTTPS requests to Facebook and Twitter for social interaction. Currently I'm proxying HTTPS via my Apache web server, but I'd like to be able to do the HTTPS directly without needing a proxy. I'm well versed with socket programming, using BSD sockets, WinSock, and IOCP, with the server using IOCP currently. However, I'm very new to SSL. Firstly, does anyone know of any good tutorials for OpenSSL? I've got a *very* simple connection going by following this tutorial, but it's a bit... lacking: http://www.ibm.com/developerworks/library/l-openssl/ (And x64 OpenSSL 1.0.1i I think) I'd like to avoid using the BIO interface if possible, and I'd prefer to layer SSL over my existing socket layer, since that will require minimal code changes. Secondly, I understand that I need to have a store of CAs to verify the certificates used by a server, which I believe is done with the SSL_CTX_load_verify_locations function. However, if I'm just making client connections, is this call and the CA store required, or is this only if I'm writing an SSL server? Thanks, Steve
  6.   It's not possible to use 16-bit floats with FVF codes; you need to use shaders. Also be aware that converting from 32-bit float to 16-bit float isn't trivial since there's no built-in half type in C++. Also what ankhd said - generally you only want to use 16-bit floats for texture coordinates and maybe normals - elements with a limited range.
  7. D3DXLoadSurfaceFromSurface() is not something you want to be calling every frame. You should load your cursor frames at startup, and then just call SetCursorProperties() once per frame.
  8. Generally you give each object a different Z value, and use the Z-buffer to do the culling for you. The Z-buffer is created (Well, usually) when you create the D3D device, if you set the EnableAutoDepthStencil member of the D3DPRESENT_PARAMETERS struct to TRUE, and set the AutoDepthStencilFormat member to a valid format. That allows you to draw the objects in any order, and the Z-buffer keeps track of the depth of each pixel and correctly occludes pixels as required.   As Jason said however - for alpha'd objects, you still need to render them in back-to-front order for the blending to work correctly.
  9. Evil Steve

    Camera Zooming In and Out

    Don't you want to decrease the FOV to zoom in, rather than increase it?
  10. Are you setting the new window style *after* resetting the device? All you need to do after resetting the device is call SetWindowLong() to set the new window style, and then SetWindowPos() with the SWP_FRAMECHANGED flag to flush the changes.
  11. Evil Steve

    D3D resources and Multithreading

    No, you shouldn't be passing any D3D resources to the worker thread, which means not using D3DXLoadSurfaceFromMemory(). One (messy) option is to create your own class that inherits from IDirect3DSurface9, and pass an instance of that class to D3DXLoadSurfaceFromMemory(). Your class should implement all of the IDirect3DSurface9 functions. You can then implement your class to store the ARGB pixel data internally, and then after calling D3DXLoadSurfaceFromMemory(), you can copy that ARGB data into the real surface (Which should be locked in the D3D thread and the pointer passed to the worker thread). Or, just not use D3DXLoadSurfaceFromMemory()
  12. Evil Steve

    mouse input

    Nooooooooooooo! Never use DirectInput for keyboard or mouse input. Just use WM_MOUSEMOVE, WM_LBUTTONDOWN and so on. Using DirectInput will remove pointer ballistics, which will make your mouse pointer feel extremely sluggish. It's also hundreds of lines of code to set up and use, where as window messages are "free". And finally, it's actually slower than using window messages - DirectInput spawns another thread to process raw input messages, meaning it has a higher overhead. If you're just doing this to learn DirectInput, then go ahead - but never use DirectInput for keyboard or mouse input in a shipping product. EDIT: From here: http://msdn.microsoft.com/en-us/library/ee418864.aspx: Summary Overall, the best method to receive high-definition mouse movement data is WM_INPUT. If your users are just moving a mouse pointer, then consider using WM_MOUSEMOVE to avoid needing to perform pointer ballistics. Both of these window messages will work well even if the mouse isn't a high-definition mouse. By supporting high definition, Windows games can offer more precise control to users.
  13. Evil Steve

    win32 dialog menu with DirectX

    Are you calling IDirect3DDevice9::SetDialogBoxMode()?
  14. Personally I like dropping the comma operator into functions just to upset people who have to read my code.
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!