Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 26

Thread: Which OpenGL Version to use for 2d games

  1. #11
    Ok, so if using a lazarus for is not a good idea, what would you suggest, as I am on a mac, so I can't do any of the win32 stuff. Also, if I were to use lazarus, how would I go about doing that?

  2. #12
    Quote Originally Posted by Carver413 View Post
    it would not be my first choice and I dont think it is opengl 3.0+ ready so you will have to open an extended content yourself for all supported platforms.
    It is OpenGL 3 ready. Afterall you do the library loading with dglOpenGL functions, not FPC ones.

    All i can say is that the executable size may be bigger, over 1mb or something, with added possibility to use LCL components. This means you can have TPanel's and stuff on the form, and it's very useful if you plan to make editor for game that uses OpenGL.
    Last edited by User137; 22-03-2013 at 09:07 PM.

  3. #13
    How do I load the dglopengl.pas file into my game as there is no .lpk?

  4. #14
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    you can make your own .lpk and add it to the list

  5. #15
    Since it's not including any components or such there is no need for a package. Just add it to your uses clausel and put it in a directory where Lazarus can find (either where your game's sources are located or any of Lazarus' search paths).

  6. #16
    sorry, me again - how do I load shaders in fpc? Because in tutorials I see shader = new Shader("shader.vert", "shader.frag");

  7. #17
    If you want to study ready source code, i'm happy to show you few weeks ago rewritten shader classes from nxPascal
    https://code.google.com/p/nxpascal/s...c/nxGL.pas#177
    TShaderSource, TShaderProgram and TGLShader are responsible of creating, loading and using the shader with OpenGL with all imaginative ways possible. Also reporting errors and compile-errors that might come up.

    Usage is simple (adding error reporting there's a full demo):
    Code:
    shader:=TGLShader.Create;
    shader.AddDefault3D(true);
    shader.Link;
    shader.Enable;

  8. #18
    PGD Staff / News Reporter phibermon's Avatar
    Join Date
    Sep 2009
    Location
    England
    Posts
    524
    I don't believe that TLazOpenGLContext is OpenGL 3.x+ compatible, there's special things you need to do at window + context creation time, IE in windows you need to destroy/create a new window after you've checked various capabilities to support multisampling. Also on OSX there's only two ways to get an OpenGL 3.x context, either via a full screen/'windowless' process (CGL) or via opengl 'widgets' in Cocoa. (they annoyingly provide no such functionality for Carbon) So again, you're only going to be having GL3 in a Window on OSX by using cocoa. (and even then you're going to have to deal with the highly buggy GL3.2 implementation that apple decided to grace the world with)

    So yeah, don't use TLazOpenGLContext unless you mind loosing multi-sampling, not being fully cross platform for 3.x and having no fine grain control over the garunteed issues you'll have with various hardware/driver/OS combos. You'd be much better off with somthing like Zen, nxPascal, my engine (shameless plug) or anything else that does Window/Context management by itself, sets up multi-sampled windows etc
    When the moon hits your eye like a big pizza pie - that's an extinction level impact event.

  9. #19
    Well, whatever engine you use it's most likely possible to create the window yourself, as needed per special project.

    And all these problems only come into question if you are dealing with Apple's products... of which i'm almost a sworn hater of. Always going their own way, not a trace of backwards compatibility with anything. Draining money from you with all imaginative ways with no shame at all. At least microsoft is doing much better job at keeping old stuff working, and more modular.

  10. #20
    PGDCE Developer Carver413's Avatar
    Join Date
    Jun 2010
    Location
    Spokane,WA,Usa
    Posts
    206
    Go Linux, be free

Page 2 of 3 FirstFirst 123 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •